From plugin-management
Use when creating a new plugin for agentic AI assistants, scaffolding plugin directory structures, starting a new plugin project from scratch, or porting existing skills from another repository
How this skill is triggered — by the user, by Claude, or both
Slash command
/plugin-management:create-pluginThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide users through creating a complete plugin for agentic AI assistants (Claude Code, Cursor, CodeX, OpenCode) via a structured conversational workflow. Produces a fully scaffolded plugin directory with platform configs, first component, and validation.
Guide users through creating a complete plugin for agentic AI assistants (Claude Code, Cursor, CodeX, OpenCode) via a structured conversational workflow. Produces a fully scaffolded plugin directory with platform configs, first component, and validation.
You MUST create a task for each phase and complete them in order:
Ask these questions one at a time:
~~placeholder support, will generate CONNECTORS.mdCapture:
plugin_name (kebab-case)description (one sentence)author_name (default: "Moonsong Labs")is_distributable (boolean)platforms (list)Ask: "Are you creating components from scratch, or porting existing ones from another source (e.g. a GitHub repo)?"
Ask: "What components does your plugin need?"
Present options:
For each selected type, ask for names (kebab-case). Present a confirmation table:
| Component | Count | Names |
|-----------|-------|------------------------------|
| Skills | 2 | sprint-planning, code-review |
| Agents | 1 | sprint-reviewer |
| Commands | 0 | - |
| Hooks | 0 | - |
Get user confirmation before proceeding.
Skip this phase if porting existing components — all content already exists and will be written directly in Phase 4.
Pick the first component from the plan (prefer skills, then agents, then commands).
For a skill:
For an agent:
For a command:
Present the designed component for user approval before proceeding.
Determine plugin location:
.claude-plugin/marketplace.json in parent directories): create as sibling to existing pluginsGenerate files in this order:
Create all directories based on the component plan.
Generate for each selected platform. See references/component-schemas.md for exact formats.
Claude Code (.claude-plugin/plugin.json):
name, description, version (start at 0.1.0), authorCursor (.cursor-plugin/plugin.json):
displayName and path fields for each component typeCodeX (.codex/INSTALL.md):
OpenCode (.opencode/INSTALL.md):
If porting: Fetch all component files from the source and write them directly. No stubs needed — all content is complete.
If creating from scratch:
Write the first component (full content) as designed in Phase 3. For each remaining component, create a stub file with TODO markers:
Skill stub:
---
name: skill-name
description: "TODO: Use when [specific triggering conditions]"
---
# Skill Name
## Overview
TODO: Core principle in 1-2 sentences.
## When to Use
TODO: Bullet list with symptoms and use cases.
Agent stub:
---
name: agent-name
description: "TODO: Use this agent when [condition]"
model: inherit
---
TODO: Define agent role and capabilities.
Command stub:
---
description: "TODO: Brief description"
disable-model-invocation: true
---
TODO: Invoke the appropriate skill.
Generate based on any ~~placeholder references found in the designed component, plus ask if additional placeholders are needed.
If the plugin specifies a license in plugin.json, create the corresponding license file(s):
MIT) → create LICENSEMIT OR Apache-2.0) → create LICENSE-MIT and LICENSE-APACHEGenerate a README with:
## Installation
**Note:** Installation differs by platform. Claude Code and Cursor have built-in plugin marketplaces. Codex and OpenCode require manual setup.
### Claude Code (via Plugin Marketplace)
In Claude Code, register the marketplace first:
\`\`\`bash
/plugin marketplace add <org>/<repo>
\`\`\`
Then install the plugin:
\`\`\`bash
/plugin install <plugin-name>@<marketplace-name>
\`\`\`
### Cursor
Cursor automatically detects plugins installed by Claude Code. Install via Claude Code first, then restart Cursor.
### Codex
Tell Codex:
\`\`\`text
Fetch and follow instructions from https://raw.githubusercontent.com/<org>/<repo>/refs/heads/main/<plugin-name>/.codex/INSTALL.md
\`\`\`
### OpenCode
Tell OpenCode:
\`\`\`text
Fetch and follow instructions from https://raw.githubusercontent.com/<org>/<repo>/refs/heads/main/<plugin-name>/.opencode/INSTALL.md
\`\`\`
Run these checks and report results:
Structure check - all required files exist:
.claude-plugin/plugin.json exists and has name field.cursor-plugin/plugin.json exists (if Cursor platform selected).codex/INSTALL.md exists (if CodeX platform selected).opencode/INSTALL.md exists (if OpenCode platform selected)SKILL.md validation (for each skill):
NAME-01, FRONTMATTER-01, TRIGGER-01, and TRIGGER-02 from references/skill-standards/README.mdConnector validation (if distributable):
~~placeholder in content files has an entry in CONNECTORS.md~~placeholder usageReport - present results as:
Validation Results:
[PASS] Structure: all required files present
[PASS] Skills: frontmatter valid (2/2)
[WARN] Connectors: ~~chat tool defined but not used in any file
Local testing - suggest testing the plugin locally:
claude --plugin-dir ./<plugin-name>
After validation, if inside the monorepo, ask whether to register in marketplace.json.
Detect the runtime environment to determine available installation paths:
Detection method:
mcp__cowork__present_files tool is available → CoworkStep 1: Package as .plugin and install
Package the plugin as a .plugin zip with all contents at the root of the archive (not nested inside a parent folder). The archive must contain .claude-plugin/plugin.json at root level.
# IMPORTANT: zip from inside the plugin directory so contents are at root
cd <plugin-dir>
zip -r /tmp/<plugin-name>.plugin . -x "*.DS_Store"
Then save a copy to the outputs folder AND present the file to the user:
cp /tmp/<plugin-name>.plugin <outputs-dir>/<plugin-name>.plugin
mcp__cowork__present_files([{ "file_path": "<outputs-dir>/<plugin-name>.plugin" }])
Tell the user: "Click 'Copy to your plugins' to install. It will be available in your next session."
If present_files fails or the user reports an installation error, provide the computer:// download link as a fallback:
[Download your plugin](computer://<outputs-dir>/<plugin-name>.plugin)
Tell the user they can drag and drop the downloaded .plugin file into a Cowork conversation to install it.
Step 2: Offer sharing options
Ask if the user wants to share the plugin with others. If yes, offer:
.plugin file and share it directly with teammatesStep 1: Install locally
claude --plugin-dir ./<plugin-name>
Step 2: Offer publishing options
Ask if the user wants to publish or share the plugin:
gh pr create.plugin package — Package as a .plugin zip (same as Cowork path) for sharing with Cowork usersAfter validation passes
│
▼
Detect environment
│
├─── Cowork ──► .plugin zip → present_files
│ → "Copy to your plugins"
│ │
│ ▼
│ Ask: "Want to share?"
│ ├─── Yes ──► GitHub PR to marketplace / manual share
│ └─── No ──► Done
│
└─── CLI ────► claude --plugin-dir
│
▼
Ask: "Want to publish?"
├─── Marketplace PR
└─── .plugin package
.plugin sharing only).skill is for single skills (requires SKILL.md at root). .plugin is for full plugins (requires .claude-plugin/plugin.json at root). Prefer .plugin since create-plugin produces full pluginsIf the plugin is created inside the knowledge-work-plugins repo, also:
Add entry to /.claude-plugin/marketplace.json:
{
"name": "plugin-name",
"description": "Plugin description",
"version": "0.1.0",
"source": "./plugin-name",
"author": { "name": "Author Name" }
}
Add entry to root README.md under the Plugins section
CODEOWNERS — if a CODEOWNERS file exists at the repo root, ask the user if the new plugin needs a dedicated owner entry (e.g. a GitHub team). If so, add a rule like /plugin-name/ @org/team. If no CODEOWNERS file exists, ask if the user wants one created.
Remind user to follow writing-skills skill's TDD process for each skill stub
npx claudepluginhub moonsong-labs/knowledge-work-plugins --plugin plugin-managementOrchestrates agentic workflow to create new Claude Code plugins from scratch: prerequisite checks, research, design verification, atomic implementation, validation, documentation.
Creates, converts, validates, and publishes Claude Code plugins with Agent Skills, hooks, agents, and servers. Automates manifest generation, scanning, structure validation, and marketplace prep.
Guides building Claude Code plugins from scratch in Cowork: discovery, planning, design, implementation, and packaging into .plugin files.