AgentSkillsCN

create-plugin

使用manifest和目录结构搭建新的Claude Code插件。适用于用户想要创建新插件时使用。

SKILL.md
--- frontmatter
name: create-plugin
description: Scaffold a new Claude Code plugin with manifest and directory structure. Use when user wants to create a new plugin.
user-invocable: true

Create Plugin

You are scaffolding a new Claude Code plugin. Follow these steps:

1. Gather Information

Ask the user for:

  • Plugin name (kebab-case, e.g., my-awesome-plugin)
  • Description (what does this plugin do?)
  • Author name (for the manifest)
  • Location (where to create it, default: current directory)

2. Create Directory Structure

code
<plugin-name>/
├── .claude-plugin/
│   └── plugin.json
├── skills/
│   └── (empty, ready for skills)
├── agents/
│   └── (empty, ready for agents)
└── README.md

3. Generate plugin.json

Create the manifest with:

json
{
  "name": "<plugin-name>",
  "version": "1.0.0",
  "description": "<description>",
  "author": {
    "name": "<author-name>"
  },
  "license": "MIT"
}

4. Generate README.md

Create a basic README with:

  • Plugin name and description
  • Installation instructions: claude plugin install <path-or-url>
  • Available skills/agents (empty initially)
  • License

5. Initialize Git

Run git init in the plugin directory.

6. Next Steps

After creation, suggest:

  • Use /add-skill to add skills
  • Use /add-agent to add agents
  • Use /add-hook to add hooks
  • Test with claude --plugin-dir ./<plugin-name>