Skip to content

hccnm/pocket-skills

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pocket Skills

English | 中文

A curated collection of AI-friendly skills for code analysis, documentation generation, and more. Each skill is self-contained with platform adapters for Claude Code, Cursor, Codex, and Gemini CLI.

Why Pocket Skills?

  • Self-contained — Each skill bundles its own instructions, references, and platform adapters
  • Multi-platform — Works with Claude Code, Cursor, Codex, and Gemini CLI
  • One-command install — Interactive installer with checkbox selection
  • Evidence-backed — Skills produce structured, verifiable outputs

Available Skills

Reverse-engineer a codebase into a business-first PRD (Product Requirement Document). Supports two modes:

  • Source-driven — Explore repository structure, routes, services, entities, menus, and docs directly to infer product scope
  • Frontend-enhanced — Crawl a live UI to capture pages, fields, and flows, then trace them back to source logic for a complete frontend-backend closed loop

Output: AI context overview + main PRD + per-module appendices + coverage checklist.

Recreate the OpenSpec project.md workflow for the current repository — first classify the workspace as frontend, backend, full-stack, or unclear, then generate a reuse-aware docs/project.md plus only the matching technical document(s) for the detected side.

Pocket Copilot Workflow Skills

A six-stage workflow for progressive Spec-driven collaboration inside a target repository:

  • copilot-init — initialize pocket-copilot/ with safe-merge templates and prefilled context
  • copilot-propose — create spec.md, tasks.md, and log.md for a change
  • copilot-apply — execute tasks strictly against the prepared plan
  • copilot-fix — perform incremental post-review fixes and sync docs
  • copilot-review — run two-phase review: spec compliance, then code quality
  • copilot-archive — extract reusable knowledge and archive the finished change

Recommended order:

pocket-copilot-init -> pocket-copilot-propose -> pocket-copilot-apply -> pocket-copilot-fix -> pocket-copilot-review -> pocket-copilot-archive

Quick Start

1. Install

# macOS / Linux
./install.sh

# Windows
install.bat

# Or directly with Python
python3 install.py

2. Use in Claude Code

# Generate a PRD from the current project
/pocket-generate-prd-from-code

# Generate docs/project.md and the matching technical doc(s) from the current project
/pocket-project-md-reconstructor

# Initialize pocket-copilot in the current repository
/pocket-copilot-init

# Create a change proposal and then execute the workflow
/pocket-copilot-propose
/pocket-copilot-apply
/pocket-copilot-fix
/pocket-copilot-review
/pocket-copilot-archive

3. Use in Cursor

Copy the .cursorrules from the skill's platform adapter to your project root:

cp skills/generate-prd-from-code/platforms/cursor/.cursorrules /path/to/your/project/

4. Use in Codex / Gemini CLI

After installation, skills are available under:

  • Codex: ~/.codex/skills/pocket-<skill-name>/
  • Gemini CLI: ~/.gemini/commands/pocket-<skill-name>.toml

Installation

Requirements

Interactive Mode

The installer walks you through:

  1. Choose Install or Uninstall
  2. Select skills via checkbox (Space to toggle, Enter to confirm)
  3. Select target tools
  4. Confirm and execute
pip install questionary   # Required for interactive mode

Command Line Mode

# Install specific skills to specific tools
python3 install.py --skills generate-prd-from-code --tools claude-code

# Install all skills to all tools
python3 install.py --skills all --tools all

# Skip confirmation
python3 install.py --skills generate-prd-from-code --tools all --yes

# Uninstall
python3 install.py --uninstall --skills all --tools all --yes

# Help
python3 install.py --help
Parameter Description
--skills Comma-separated skill names, or all
--tools claude-code, cursor, codex, gemini-code, or all
--uninstall Switch to uninstall mode
--yes, -y Skip confirmation prompts

Manual Usage

Skills can also be used without the installer:

  1. Open the target repository in your coding agent.
  2. Invoke generate-prd-from-code.
  3. Let the agent inspect the workspace first and decide whether the currently available evidence is enough.
  4. If a frontend URL is available, provide it so the agent can capture live page evidence.
  5. Review the generated files under docs/prd/.

For the pocket-copilot workflow skills, the target repository will contain:

pocket-copilot/
├── rules/
├── knowledge/
├── agents/
├── changes/templates/
└── archives/

pocket-copilot-init is idempotent by design:

  • it creates only missing directories and files
  • it does not overwrite existing files
  • it reports created / skipped / needs-manual-review

Repository Layout

pocket-skills/
├── skills/                          # Skill collection
│   ├── generate-prd-from-code/
│   │   ├── SKILL.md                 # Skill definition
│   │   ├── references/              # Templates & rules
│   │   └── platforms/               # Platform adapters
│   │       ├── claude-code/
│   │       ├── cursor/
│   │       ├── codex/
│   │       └── gemini-code/
│   └── project-md-reconstructor/
│       ├── SKILL.md
│       ├── references/
│       └── platforms/
│   ├── copilot-init/
│   ├── copilot-propose/
│   ├── copilot-apply/
│   ├── copilot-fix/
│   ├── copilot-review/
│   └── copilot-archive/
├── install.py                       # Installer
├── install.sh / install.bat         # Launchers
└── docs/                            # Documentation

Adding New Skills

  1. Create a directory under skills/ (kebab-case naming)
  2. Add SKILL.md with YAML frontmatter
  3. Add the supporting resources the skill actually needs, such as references/, platforms/, agents/, or optional scripts/
  4. The installer auto-discovers new skills

Contributing

Contributions are welcome! See CONTRIBUTING.md for details.

License

MIT License - see LICENSE for details.

About

No description, website, or topics provided.

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages