create-plugin

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Create Plugin

创建插件

Scaffold a new Claude Code plugin from scratch.
从头开始搭建一个全新的Claude Code插件。

When to use

使用场景

When you want to create a new plugin that extends Claude Code with skills, commands, and agents. This generates the correct directory structure and wires up MCP tools.
当你想要创建一个新插件来扩展Claude Code的技能、命令和Agent时使用。此工具会生成正确的目录结构并对接MCP工具。

Steps

步骤

  1. Get plugin name and description from the user
  2. Check for conflicts — call
    mcp__claude-flow__transfer_plugin-search
    to ensure the name isn't taken
  3. Create directory structure:
    plugins/<name>/
    ├── .claude-plugin/
    │   └── plugin.json
    ├── skills/
    │   └── <skill-name>/
    │       └── SKILL.md
    ├── commands/
    │   └── <command-name>.md
    ├── agents/
    │   └── <agent-name>.md
    └── README.md
  4. Generate plugin.json with name, description, version, author (do NOT include
    skills
    ,
    commands
    , or
    agents
    arrays — Claude Code auto-discovers these from directory structure)
  5. Generate SKILL.md files with proper frontmatter:
    yaml
    ---
    name: skill-name
    description: What this skill does
    allowed-tools: mcp__claude-flow__tool1 mcp__claude-flow__tool2 Bash
    ---
  6. Generate command files with name and description frontmatter
  7. Generate agent files with name, description, and
    model: sonnet
  8. Generate README.md with install instructions, features, commands, and skills
  9. Update marketplace.json if adding to the ruflo marketplace
  1. 从用户处获取插件名称和描述
  2. 检查冲突 — 调用
    mcp__claude-flow__transfer_plugin-search
    确保名称未被占用
  3. 创建目录结构:
    plugins/<name>/
    ├── .claude-plugin/
    │   └── plugin.json
    ├── skills/
    │   └── <skill-name>/
    │       └── SKILL.md
    ├── commands/
    │   └── <command-name>.md
    ├── agents/
    │   └── <agent-name>.md
    └── README.md
  4. 生成plugin.json,包含名称、描述、版本、作者(请勿包含
    skills
    commands
    agents
    数组——Claude Code会从目录结构中自动发现这些内容)
  5. 生成SKILL.md文件,包含正确的前置元数据:
    yaml
    ---
    name: skill-name
    description: What this skill does
    allowed-tools: mcp__claude-flow__tool1 mcp__claude-flow__tool2 Bash
    ---
  6. 生成命令文件,包含名称和描述前置元数据
  7. 生成Agent文件,包含名称、描述和
    model: sonnet
  8. 生成README.md,包含安装说明、功能介绍、命令和技能列表
  9. 若要添加到ruflo市场,更新marketplace.json

Plugin.json schema

plugin.json Schema

Required fields:
  • name
    — plugin identifier (kebab-case)
  • description
    — what the plugin does
  • version
    — semver
Recommended fields:
  • author
    { "name": "...", "url": "..." }
  • homepage
    ,
    license
    ,
    keywords
Do NOT include
skills
,
commands
, or
agents
arrays in plugin.json — these are auto-discovered from the directory structure by Claude Code and will cause validation errors if present.
必填字段:
  • name
    — 插件标识符(短横线命名法)
  • description
    — 插件功能说明
  • version
    — 语义化版本号
推荐字段:
  • author
    { "name": "...", "url": "..." }
  • homepage
    ,
    license
    ,
    keywords
请勿包含
skills
commands
agents
数组在plugin.json中——Claude Code会从目录结构中自动发现这些内容,若手动添加会导致验证错误。

Available MCP tools to wire

可对接的MCP工具

Browse available tools:
mcp__claude-flow__transfer_plugin-info
Common tool categories:
  • memory_*
    — storage, search, retrieval
  • agentdb_*
    — 19 AgentDB controllers
  • neural_*
    — neural training and prediction
  • hooks_*
    — lifecycle hooks and intelligence
  • browser_*
    — browser automation
  • workflow_*
    — workflow management
  • aidefence_*
    — safety scanning
  • embeddings_*
    — vector embeddings
浏览可用工具:
mcp__claude-flow__transfer_plugin-info
常见工具类别:
  • memory_*
    — 存储、搜索、检索
  • agentdb_*
    — 19个AgentDB控制器
  • neural_*
    — 神经网络训练与预测
  • hooks_*
    — 生命周期钩子与智能逻辑
  • browser_*
    — 浏览器自动化
  • workflow_*
    — 工作流管理
  • aidefence_*
    — 安全扫描
  • embeddings_*
    — 向量嵌入