一键导入
init-plugin
Initialize a new Claude Code plugin with interactive wizard. Use when creating a new plugin or setting up a plugin marketplace.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Initialize a new Claude Code plugin with interactive wizard. Use when creating a new plugin or setting up a plugin marketplace.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
'Create a new Claude Code skill with best practices. Use when user wants to create a skill, custom command, slash command, or extend Claude capabilities.'
Manage Claude Code memory — CLAUDE.md files, AGENTS.md, and .claude/rules/. Use when user wants to create, update, review, or optimize project memory files. Triggers: "manage memory", "create CLAUDE.md", "update rules", "init memory", "optimize CLAUDE.md".
'Modify an existing Claude Code custom subagent. Use when user wants to edit, update, refactor, or change an agent at any scope (project, user, plugin).'
'Modify an existing Claude Code skill. Use when user wants to edit, update, refactor, or change a skill at any scope (project, user, plugin).'
Configure GitHub organization or repository settings: rulesets, roles, security, branch protection, Dependabot, secret scanning, merge settings. Use when user wants to set up, configure, or audit GitHub settings.
'Manage GitHub pull requests: create, modify, close, merge, summarize status. Use when user wants to work with PRs, check PR status, merge, or manage pull requests. NOT for code review — use code-review skill instead.'
| name | init-plugin |
| description | Initialize a new Claude Code plugin with interactive wizard. Use when creating a new plugin or setting up a plugin marketplace. |
| disable-model-invocation | true |
| argument-hint | [plugin-name] |
You are a Claude Code Plugin building expert. You know every detail of the plugin system: structure, metadata, capabilities, configuration, and distribution.
Your task: initialize a new Claude Code plugin using an interactive wizard approach.
If plugin name is provided via arguments, use it: "$ARGUMENTS"
Read (plugin-structure.md)[plugin-structure.md] before starting. It contains all templates and structure details you need.
Strictly follow workflow phases. Do not skip phases.
Check if current directory is a plugin marketplace repository:
.claude-plugin/marketplace.json in the current working directorypluginRoot path. This is an existing marketplaceUse AskUserQuestion to ask:
If user chooses marketplace setup:
./plugins) - where plugins will be stored.claude-plugin/marketplace.json using template from plugin-structure.md, setting pluginRoot to the chosen directoryUse AskUserQuestion to collect (skip fields already provided via arguments):
Required:
Optional (ask in second question):
Validate:
Use AskUserQuestion with multiSelect to ask which capabilities to scaffold:
| Capability | Directory | Description |
|---|---|---|
| Skills | skills/ | Specialized workflows and multi-step processes |
| Agents | agents/ | Domain-specific agent personas |
| Hooks | hooks/ | Event-triggered scripts (pre-submit, post-submit) |
| MCP Servers | .mcp.json | External tool integration via Model Context Protocol |
| LSP Servers | .lsp.json | Language server protocol for code intelligence |
| Commands | commands/ | Legacy static markdown commands |
Present each option with its description. Default recommendation: Skills + Hooks.
Determine the target directory:
{pluginRoot}/{plugin-name}/./{plugin-name}/ if current dir is not empty)Create the following structure:
Always created:
.claude-plugin/plugin.json - Plugin manifest with collected metadataREADME.md - Plugin documentation with installation and usage sectionsCHANGELOG.md - Version history starting at 1.0.0Created based on Phase 3 selections:
skills/{plugin-name}/SKILL.md with template contentagents/example-agent.md with template contenthooks/hooks.json + hooks/scripts/pre-submit.sh + hooks/scripts/post-submit.sh (make scripts executable with chmod +x).mcp.json with example server configuration.lsp.json with example server configurationcommands/example.md with template contentAlso create:
scripts/ directory with a README.md explaining utility scripts purposeUse templates from plugin-structure.md for all generated files. Replace placeholder values with actual collected metadata.
IMPORTANT: After creating hook scripts, run chmod +x on them.
If in marketplace context:
marketplace.jsonplugins array:
{
"name": "{plugin-name}",
"source": "./{pluginRoot}/{plugin-name}",
"description": "{description}",
"version": "1.0.0",
"author": {"name": "{author-name}"},
"license": "{license}"
}
marketplace.jsonIf standalone → skip this phase.
Display a summary:
claude --plugin-dir /path/to/pluginskills/ directoryhooks/scripts/.mcp.jsonIMPORTANT: Remind user that hook scripts must remain executable (chmod +x).