项目文件夹

文件
wehub-resource-sync bb5c75ce05
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:58 +08:00

1 行
5.4 KiB
JSON

{"content": "---\nname: plugin-forge\ndescription: Create and manage Claude Code plugins with proper structure, manifests, and marketplace integration. Use when creating plugins for a marketplace, adding plugin components (commands, agents, hooks), bumping plugin versions, or working with plugin.json/marketplace.json manifests.\n---\n\n# CC Plugin Forge\n\n## Purpose\n\nBuild and manage Claude Code plugins with correct structure, manifests, and marketplace integration. Includes workflows, automation scripts, and reference docs.\n\n## When to Use\n\n- Creating new plugins for a marketplace\n- Adding/modifying plugin components (commands, skills, agents, hooks)\n- Updating plugin versions\n- Working with plugin or marketplace manifests\n- Setting up local plugin testing\n- Publishing plugins\n\n## Getting Started\n\n### Create New Plugin\n\nUse `create_plugin.py` to generate plugin structure:\n\n```bash\npython scripts/create_plugin.py plugin-name \\\n --marketplace-root /path/to/marketplace \\\n --author-name \"Your Name\" \\\n --author-email \"your.email@example.com\" \\\n --description \"Plugin description\" \\\n --keywords \"keyword1,keyword2\" \\\n --category \"productivity\"\n```\n\nThis automatically:\n\n- Creates plugin directory structure\n- Generates `plugin.json` manifest\n- Creates README template\n- Updates `marketplace.json`\n\n### Bump Version\n\nUse `bump_version.py` to update versions in both manifests:\n\n```bash\npython scripts/bump_version.py plugin-name major|minor|patch \\\n --marketplace-root /path/to/marketplace\n```\n\nSemantic versioning:\n\n- **major**: Breaking changes (1.0.0 → 2.0.0)\n- **minor**: New features, refactoring (1.0.0 → 1.1.0)\n- **patch**: Bug fixes, docs (1.0.0 → 1.0.1)\n\n## Development Workflow\n\n### 1. Create Structure\n\nManual approach (if not using script):\n\n```bash\nmkdir -p plugins/plugin-name/.claude-plugin\nmkdir -p plugins/plugin-name/commands\nmkdir -p plugins/plugin-name/skills\n```\n\n### 2. Plugin Manifest\n\nFile: `plugins/plugin-name/.claude-plugin/plugin.json`\n\n```json\n{\n \"name\": \"plugin-name\",\n \"version\": \"0.1.0\",\n \"description\": \"Plugin description\",\n \"author\": {\n \"name\": \"Your Name\",\n \"email\": \"your.email@example.com\"\n },\n \"keywords\": [\"keyword1\", \"keyword2\"]\n}\n```\n\n### 3. Register in Marketplace\n\nUpdate `.claude-plugin/marketplace.json`:\n\n```json\n{\n \"name\": \"plugin-name\",\n \"source\": \"./plugins/plugin-name\",\n \"description\": \"Plugin description\",\n \"version\": \"0.1.0\",\n \"keywords\": [\"keyword1\", \"keyword2\"],\n \"category\": \"productivity\"\n}\n```\n\n### 4. Add Components\n\nCreate in respective directories:\n\n| Component | Location | Format |\n|-----------|----------|--------|\n| Commands | `commands/` | Markdown with frontmatter |\n| Skills | `skills/<name>/` | Directory with `SKILL.md` |\n| Agents | `agents/` | Markdown definitions |\n| Hooks | `hooks/hooks.json` | Event handlers |\n| MCP Servers | `.mcp.json` | External integrations |\n\n### 5. Local Testing\n\n```bash\n# Add marketplace\n/plugin marketplace add /path/to/marketplace-root\n\n# Install plugin\n/plugin install plugin-name@marketplace-name\n\n# After changes: reinstall\n/plugin uninstall plugin-name@marketplace-name\n/plugin install plugin-name@marketplace-name\n```\n\n## Plugin Patterns\n\n### Framework Plugin\n\nFor framework-specific guidance (React, Vue, etc.):\n\n```\nplugins/framework-name/\n├── .claude-plugin/plugin.json\n├── skills/\n│ └── framework-name/\n│ ├── SKILL.md\n│ └── references/\n├── commands/\n│ └── prime/\n│ ├── components.md\n│ └── framework.md\n└── README.md\n```\n\n### Utility Plugin\n\nFor tools and commands:\n\n```\nplugins/utility-name/\n├── .claude-plugin/plugin.json\n├── commands/\n│ ├── action1.md\n│ └── action2.md\n└── README.md\n```\n\n### Domain Plugin\n\nFor domain-specific knowledge:\n\n```\nplugins/domain-name/\n├── .claude-plugin/plugin.json\n├── skills/\n│ └── domain-name/\n│ ├── SKILL.md\n│ ├── references/\n│ └── scripts/\n└── README.md\n```\n\n## Command Naming\n\nSubdirectory-based namespacing with `:` separator:\n\n- `commands/namespace/command.md` → `/namespace:command`\n- `commands/simple.md` → `/simple`\n\nExamples:\n\n- `commands/prime/vue.md` → `/prime:vue`\n- `commands/docs/generate.md` → `/docs:generate`\n\n## Version Management\n\n**Important:** Update version in BOTH locations:\n\n1. `plugins/<name>/.claude-plugin/plugin.json`\n2. `.claude-plugin/marketplace.json`\n\nUse `bump_version.py` to automate.\n\n## Git Commits\n\nUse conventional commits:\n\n```bash\ngit commit -m \"feat: add new plugin\"\ngit commit -m \"fix: correct plugin manifest\"\ngit commit -m \"docs: update plugin README\"\ngit commit -m \"feat!: breaking change\"\n```\n\n## Reference Docs\n\nDetailed documentation included:\n\n| Reference | Content |\n|-----------|---------|\n| `references/plugin-structure.md` | Directory structure, manifest schema, components |\n| `references/marketplace-schema.md` | Marketplace format, plugin entries, distribution |\n| `references/workflows.md` | Step-by-step workflows, patterns, publishing |\n\n### Scripts\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/create_plugin.py` | Scaffold new plugin |\n| `scripts/bump_version.py` | Update versions |\n"}