plugin-forge
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCC Plugin Forge
CC 插件锻造工具
Purpose
用途
Build and manage Claude Code plugins with correct structure, manifests, and marketplace integration. Includes workflows, automation scripts, and reference docs.
构建并管理具有正确结构、清单文件和市场集成的Claude Code插件。包含工作流、自动化脚本和参考文档。
When to Use
适用场景
- Creating new plugins for a marketplace
- Adding/modifying plugin components (commands, skills, agents, hooks)
- Updating plugin versions
- Working with plugin or marketplace manifests
- Setting up local plugin testing
- Publishing plugins
- 为插件市场创建新插件
- 添加/修改插件组件(命令、Skill、Agent、钩子)
- 更新插件版本
- 处理插件或市场清单文件
- 设置本地插件测试环境
- 发布插件
Getting Started
快速开始
Create New Plugin
创建新插件
Use to generate plugin structure:
create_plugin.pybash
python scripts/create_plugin.py plugin-name \
--marketplace-root /path/to/marketplace \
--author-name "Your Name" \
--author-email "your.email@example.com" \
--description "Plugin description" \
--keywords "keyword1,keyword2" \
--category "productivity"This automatically:
- Creates plugin directory structure
- Generates manifest
plugin.json - Creates README template
- Updates
marketplace.json
使用生成插件结构:
create_plugin.pybash
python scripts/create_plugin.py plugin-name \
--marketplace-root /path/to/marketplace \
--author-name "Your Name" \
--author-email "your.email@example.com" \
--description "Plugin description" \
--keywords "keyword1,keyword2" \
--category "productivity"该脚本会自动完成以下操作:
- 创建插件目录结构
- 生成清单文件
plugin.json - 创建README模板
- 更新
marketplace.json
Bump Version
版本更新
Use to update versions in both manifests:
bump_version.pybash
python scripts/bump_version.py plugin-name major|minor|patch \
--marketplace-root /path/to/marketplaceSemantic versioning:
- major: Breaking changes (1.0.0 → 2.0.0)
- minor: New features, refactoring (1.0.0 → 1.1.0)
- patch: Bug fixes, docs (1.0.0 → 1.0.1)
使用更新两个清单文件中的版本:
bump_version.pybash
python scripts/bump_version.py plugin-name major|minor|patch \
--marketplace-root /path/to/marketplace语义化版本规则:
- major:破坏性变更(1.0.0 → 2.0.0)
- minor:新增功能、重构(1.0.0 → 1.1.0)
- patch:Bug修复、文档更新(1.0.0 → 1.0.1)
Development Workflow
开发工作流
1. Create Structure
1. 创建目录结构
Manual approach (if not using script):
bash
mkdir -p plugins/plugin-name/.claude-plugin
mkdir -p plugins/plugin-name/commands
mkdir -p plugins/plugin-name/skills手动创建方式(不使用脚本时):
bash
mkdir -p plugins/plugin-name/.claude-plugin
mkdir -p plugins/plugin-name/commands
mkdir -p plugins/plugin-name/skills2. Plugin Manifest
2. 插件清单文件
File:
plugins/plugin-name/.claude-plugin/plugin.jsonjson
{
"name": "plugin-name",
"version": "0.1.0",
"description": "Plugin description",
"author": {
"name": "Your Name",
"email": "your.email@example.com"
},
"keywords": ["keyword1", "keyword2"]
}文件路径:
plugins/plugin-name/.claude-plugin/plugin.jsonjson
{
"name": "plugin-name",
"version": "0.1.0",
"description": "Plugin description",
"author": {
"name": "Your Name",
"email": "your.email@example.com"
},
"keywords": ["keyword1", "keyword2"]
}3. Register in Marketplace
3. 在市场中注册
Update :
.claude-plugin/marketplace.jsonjson
{
"name": "plugin-name",
"source": "./plugins/plugin-name",
"description": "Plugin description",
"version": "0.1.0",
"keywords": ["keyword1", "keyword2"],
"category": "productivity"
}更新:
.claude-plugin/marketplace.jsonjson
{
"name": "plugin-name",
"source": "./plugins/plugin-name",
"description": "Plugin description",
"version": "0.1.0",
"keywords": ["keyword1", "keyword2"],
"category": "productivity"
}4. Add Components
4. 添加组件
Create in respective directories:
| Component | Location | Format |
|---|---|---|
| Commands | | Markdown with frontmatter |
| Skills | | Directory with |
| Agents | | Markdown definitions |
| Hooks | | Event handlers |
| MCP Servers | | External integrations |
在对应目录中创建组件:
| 组件 | 位置 | 格式 |
|---|---|---|
| 命令 | | 带前置元数据的Markdown文件 |
| Skill | | 包含 |
| Agent | | Markdown定义文件 |
| 钩子 | | 事件处理器 |
| MCP服务器 | | 外部集成配置 |
5. Local Testing
5. 本地测试
bash
undefinedbash
undefinedAdd marketplace
添加插件市场
/plugin marketplace add /path/to/marketplace-root
/plugin marketplace add /path/to/marketplace-root
Install plugin
安装插件
/plugin install plugin-name@marketplace-name
/plugin install plugin-name@marketplace-name
After changes: reinstall
修改后:重新安装
/plugin uninstall plugin-name@marketplace-name
/plugin install plugin-name@marketplace-name
undefined/plugin uninstall plugin-name@marketplace-name
/plugin install plugin-name@marketplace-name
undefinedPlugin Patterns
插件模式
Framework Plugin
框架插件
For framework-specific guidance (React, Vue, etc.):
plugins/framework-name/
├── .claude-plugin/plugin.json
├── skills/
│ └── framework-name/
│ ├── SKILL.md
│ └── references/
├── commands/
│ └── prime/
│ ├── components.md
│ └── framework.md
└── README.md针对特定框架(React、Vue等)的插件结构:
plugins/framework-name/
├── .claude-plugin/plugin.json
├── skills/
│ └── framework-name/
│ ├── SKILL.md
│ └── references/
├── commands/
│ └── prime/
│ ├── components.md
│ └── framework.md
└── README.mdUtility Plugin
实用工具插件
For tools and commands:
plugins/utility-name/
├── .claude-plugin/plugin.json
├── commands/
│ ├── action1.md
│ └── action2.md
└── README.md针对工具和命令的插件结构:
plugins/utility-name/
├── .claude-plugin/plugin.json
├── commands/
│ ├── action1.md
│ └── action2.md
└── README.mdDomain Plugin
领域专属插件
For domain-specific knowledge:
plugins/domain-name/
├── .claude-plugin/plugin.json
├── skills/
│ └── domain-name/
│ ├── SKILL.md
│ ├── references/
│ └── scripts/
└── README.md针对特定领域知识的插件结构:
plugins/domain-name/
├── .claude-plugin/plugin.json
├── skills/
│ └── domain-name/
│ ├── SKILL.md
│ ├── references/
│ └── scripts/
└── README.mdCommand Naming
命令命名规则
Subdirectory-based namespacing with separator:
:- →
commands/namespace/command.md/namespace:command - →
commands/simple.md/simple
Examples:
- →
commands/prime/vue.md/prime:vue - →
commands/docs/generate.md/docs:generate
基于子目录的命名空间,使用作为分隔符:
:- →
commands/namespace/command.md/namespace:command - →
commands/simple.md/simple
示例:
- →
commands/prime/vue.md/prime:vue - →
commands/docs/generate.md/docs:generate
Version Management
版本管理
Important: Update version in BOTH locations:
plugins/<name>/.claude-plugin/plugin.json.claude-plugin/marketplace.json
Use to automate.
bump_version.py重要提示: 需要在两个位置同时更新版本:
plugins/<name>/.claude-plugin/plugin.json.claude-plugin/marketplace.json
使用脚本可自动完成该操作。
bump_version.pyGit Commits
Git提交规范
Use conventional commits:
bash
git commit -m "feat: add new plugin"
git commit -m "fix: correct plugin manifest"
git commit -m "docs: update plugin README"
git commit -m "feat!: breaking change"使用约定式提交格式:
bash
git commit -m "feat: add new plugin"
git commit -m "fix: correct plugin manifest"
git commit -m "docs: update plugin README"
git commit -m "feat!: breaking change"Reference Docs
参考文档
Detailed documentation included:
| Reference | Content |
|---|---|
| Directory structure, manifest schema, components |
| Marketplace format, plugin entries, distribution |
| Step-by-step workflows, patterns, publishing |
包含以下详细文档:
| 参考文档 | 内容 |
|---|---|
| 目录结构、清单文件 Schema、组件说明 |
| 市场格式、插件条目、分发说明 |
| 分步工作流、插件模式、发布指南 |
Scripts
脚本说明
| Script | Purpose |
|---|---|
| Scaffold new plugin |
| Update versions |
| 脚本 | 用途 |
|---|---|
| 快速搭建新插件脚手架 |
| 更新插件版本 |
undefined