Build custom extensions for your AI assistant through a guided conversation that handles every step from planning to final packaging. You will receive a ready-to-install file that adds new skills or agents to your workflow without needing to manage technical details. Reach for this whenever you want to create a new plugin from scratch to expand what your AI can do.
name: create-cowork-plugin
description: >
Guide users through creating a new plugin from scratch in a cowork session.
Use when users want to create a plugin, build a plugin, make a new plugin, develop a plugin, scaffold a plugin, start a plugin from scratch, or design a plugin.
This skill requires Cowork mode with access to the outputs directory for delivering the final .plugin file.
compatibility: Requires Cowork desktop app environment with access to the outputs directory for delivering .plugin files.
Create Cowork Plugin
Build a new plugin from scratch through guided conversation. Walk the user through discovery, planning, design, implementation, and packaging — delivering a ready-to-install .plugin file at the end.
Overview
A plugin is a self-contained directory that extends Claude’s capabilities with skills, agents, hooks, and MCP server integrations. This skill encodes the full plugin architecture and a five-phase workflow for creating one conversationally.
The process:
Discovery — understand what the user wants to build
Component Planning — determine which component types are needed
Design & Clarifying Questions — specify each component in detail
Implementation — create all plugin files
Review & Package — deliver the .plugin file
Nontechnical output: Keep all user-facing conversation in plain language. Do not expose implementation details like file paths, directory structures, or schema fields unless the user asks. Frame everything in terms of what the plugin will do.
Legacy commands/ format: Older plugins may include a commands/ directory with single-file .md slash commands. This format still works, but new plugins should use skills/*/SKILL.md instead — the Cowork UI presents both as a single “Skills” concept, and the skills format supports progressive disclosure via references/.
Rules:
.claude-plugin/plugin.json is always required
Component directories (skills/, agents/) go at the plugin root, not inside .claude-plugin/
Only create directories for components the plugin actually uses
Use kebab-case for all directory and file names
plugin.json Manifest
Located at .claude-plugin/plugin.json. Minimal required field is name.
Detailed schemas for each component type are in references/component-schemas.md. Summary:
Component
Location
Format
Skills
skills/*/SKILL.md
Markdown + YAML frontmatter
MCP Servers
.mcp.json
JSON
Agents (uncommonly used in Cowork)
agents/*.md
Markdown + YAML frontmatter
Hooks (rarely used in Cowork)
hooks/hooks.json
JSON
Commands (legacy)
commands/*.md
Markdown + YAML frontmatter
This schema is shared with Claude Code’s plugin system, but you’re creating a plugin for Claude Cowork, a desktop app for doing knowledge work.
Cowork users will usually find skills the most useful. Scaffold new plugins with skills/*/SKILL.md — do not create commands/ unless the user explicitly needs the legacy single-file format.
Customizable plugins with ~~ placeholders
Do not use or ask about this pattern by default. Only introduce ~~ placeholders if the user explicitly says they want people outside their organization to use the plugin.
You can mention this is an option if it seems like the user wants to distribute the plugin externally, but do not proactively ask about this with AskUserQuestion.
When a plugin is intended to be shared with others outside their company, it might have parts that need to be adapted to individual users.
You might need to reference external tools by category rather than specific product (e.g., “project tracker” instead of “Jira”).
When sharing is needed, use generic language and mark these as requiring customization with two tilde characters such as create an issue in ~~project tracker.
If used any tool categories, write a CONNECTORS.md file at the plugin root to explain:
# Connectors## How tool references workPlugin files use `~~category` as a placeholder for whatever tool the userconnects in that category. Plugins are tool-agnostic — they describeworkflows in terms of categories rather than specific products.## Connectors for this plugin| Category | Placeholder | Options || --------------- | ------------------- | ------------------------------- || Chat | `~~chat` | Slack, Microsoft Teams, Discord || Project tracker | `~~project tracker` | Linear, Asana, Jira |
${CLAUDE_PLUGIN_ROOT} Variable
Use ${CLAUDE_PLUGIN_ROOT} for all intra-plugin path references in hooks and MCP configs. Never hardcode absolute paths.
Guided Workflow
When you ask the user something, use AskUserQuestion. Don’t assume “industry standard” defaults are correct. Note: AskUserQuestion always includes a Skip button and a free-text input box for custom answers, so do not include None or Other as options.
Phase 1: Discovery
Goal: Understand what the user wants to build and why.
Ask (only what is unclear — skip questions if the user’s initial request already answers them):
What should this plugin do? What problem does it solve?
Who will use it and in what context?
Does it integrate with any external tools or services?
Is there a similar plugin or workflow to reference?
Summarize understanding and confirm before proceeding.
Output: Clear statement of plugin purpose and scope.
Phase 2: Component Planning
Goal: Determine which component types the plugin needs.
Based on the discovery answers, determine:
Skills — Does it need specialized knowledge that Claude should load on-demand, or user-initiated actions? (domain expertise, reference schemas, workflow guides, deploy/configure/analyze/review actions)
MCP Servers — Does it need external service integration? (databases, APIs, SaaS tools)
Agents (uncommon) — Are there autonomous multi-step tasks? (validation, generation, analysis)
Hooks (rare) — Should something happen automatically on certain events? (enforce policies, load context, validate operations)
Present a component plan table, including component types you decided not to create:
| Component | Count | Purpose ||-----------|-------|---------|| Skills | 3 | Domain knowledge for X, /do-thing, /check-thing || Agents | 0 | Not needed || Hooks | 1 | Validate writes || MCP | 1 | Connect to service Y |
Get user confirmation or adjustments before proceeding.
Output: Confirmed list of components to create.
Phase 3: Design & Clarifying Questions
Goal: Specify each component in detail. Resolve all ambiguities before implementation.
For each component type in the plan, ask targeted design questions. Present questions grouped by component type. Wait for answers before proceeding.
Skills:
What user queries should trigger this skill?
What knowledge domains does it cover?
Should it include reference files for detailed content?
If the skill represents a user-initiated action: what arguments does it accept, and what tools does it need? (Read, Write, Bash, Grep, etc.)
Agents:
Should each agent trigger proactively or only when requested?
What tools does it need?
What should the output format be?
Hooks:
Which events? (PreToolUse, PostToolUse, Stop, SessionStart, etc.)
What behavior — validate, block, modify, add context?
Prompt-based (LLM-driven) or command-based (deterministic script)?
MCP Servers:
What server type? (stdio for local, SSE for hosted with OAuth, HTTP for REST APIs)
What authentication method?
What tools should be exposed?
If the user says “whatever you think is best,” provide specific recommendations and get explicit confirmation.
Output: Detailed specification for every component.
Phase 4: Implementation
Goal: Create all plugin files following best practices.
Order of operations:
Create the plugin directory structure
Create plugin.json manifest
Create each component (see references/component-schemas.md for exact formats)
Create README.md documenting the plugin
Implementation guidelines:
Skills use progressive disclosure: lean SKILL.md body (under 3,000 words), detailed content in references/. Frontmatter description must be third-person with specific trigger phrases. Skill bodies are instructions FOR Claude, not messages to the user — write them as directives about what to do.
Agents need a description with <example> blocks showing triggering conditions, plus a system prompt in the markdown body.
Hooks config goes in hooks/hooks.json. Use ${CLAUDE_PLUGIN_ROOT} for script paths. Prefer prompt-based hooks for complex logic.
MCP configs go in .mcp.json at plugin root. Use ${CLAUDE_PLUGIN_ROOT} for local server paths. Document required env vars in README.
Phase 5: Review & Package
Goal: Deliver the finished plugin.
Summarize what was created — list each component and its purpose
Ask if the user wants any adjustments
Run claude plugin validate <path-to-plugin-json>; fix any errors and warnings
Package as a .plugin file:
cd /path/to/plugin-dir && zip -r /tmp/plugin-name.plugin . -x "*.DS_Store" && cp /tmp/plugin-name.plugin /path/to/outputs/plugin-name.plugin
Important: Always create the zip in /tmp/ first, then copy to the outputs folder. Writing directly to the outputs folder may fail due to permissions.
Naming: Use the plugin name from plugin.json for the .plugin file (e.g., if name is code-reviewer, output code-reviewer.plugin).
The .plugin file will appear in the chat as a rich preview where the user can browse the files and accept the plugin by pressing a button.
Best Practices
Start small: Begin with the minimum viable set of components. A plugin with one well-crafted skill is more useful than one with five half-baked components.
Progressive disclosure for skills: Core knowledge in SKILL.md, detailed reference material in references/, working examples in examples/.
Clear trigger phrases: Skill descriptions should include specific phrases users would say. Agent descriptions should include <example> blocks.
Skills are for Claude: Write skill body content as instructions for Claude to follow, not documentation for the user to read.
Imperative writing style: Use verb-first instructions in skills (“Parse the config file,” not “You should parse the config file”).
Portability: Always use ${CLAUDE_PLUGIN_ROOT} for intra-plugin paths, never hardcoded paths.
Security: Use environment variables for credentials, HTTPS for remote servers, least-privilege tool access.
Additional Resources
references/component-schemas.md — Detailed format specifications for every component type (skills, agents, hooks, MCP, legacy commands, CONNECTORS.md)
references/example-plugins.md — Three complete example plugin structures at different complexity levels
Component Schemas
Detailed format specifications for every plugin component type. Reference this when implementing components in Phase 4.
Skills
Location: skills/skill-name/SKILL.mdFormat: Markdown with YAML frontmatter
Frontmatter Fields
Field
Required
Type
Description
name
Yes
String
Skill identifier (lowercase, hyphens; matches dir name)
description
Yes
String
Third-person description with trigger phrases
metadata
No
Map
Arbitrary key-value pairs (e.g., version, author)
Example Skill
---name: api-designdescription: > This skill should be used when the user asks to "design an API", "create API endpoints", "review API structure", or needs guidance on REST API best practices, endpoint naming, or request/response design.metadata: version: "0.1.0"---
Writing Style Rules
Frontmatter description: Third-person ("This skill should be used when..."), with specific trigger phrases in quotes.
Body: Imperative/infinitive form ("Parse the config file," not "You should parse the config file").
Length: Keep SKILL.md body under 3,000 words (ideally 1,500-2,000). Move detailed content to references/.
Location: agents/agent-name.mdFormat: Markdown with YAML frontmatter
Frontmatter Fields
Field
Required
Type
Description
name
Yes
String
Lowercase, hyphens, 3-50 chars
description
Yes
String
Triggering conditions with <example> blocks
model
Yes
String
inherit, sonnet, opus, or haiku
color
Yes
String
blue, cyan, green, yellow, magenta, red
tools
No
Array
Restrict to specific tools
Example Agent
---name: code-reviewerdescription: Use this agent when the user asks for a thorough code review or wants detailed analysis of code quality, security, and best practices.<example>Context: User has just written a new moduleuser: "Can you do a deep review of this code?"assistant: "I'll use the code-reviewer agent to provide a thorough analysis."<commentary>User explicitly requested a detailed review, which matches this agent's specialty.</commentary></example><example>Context: User is about to merge a PRuser: "Review this before I merge"assistant: "Let me run a comprehensive review using the code-reviewer agent."<commentary>Pre-merge review benefits from the agent's structured analysis process.</commentary></example>model: inheritcolor: bluetools: ["Read", "Grep", "Glob"]---You are a code review specialist focused on identifying issues across security, performance, maintainability, and correctness.**Your Core Responsibilities:**1. Analyze code structure and organization2. Identify security vulnerabilities3. Flag performance concerns4. Check adherence to best practices**Analysis Process:**1. Read all files in scope2. Identify patterns and anti-patterns3. Categorize findings by severity4. Provide specific remediation suggestions**Output Format:**Present findings grouped by severity (Critical, Warning, Info) with:- File path and line number- Description of the issue- Suggested fix
${CLAUDE_PLUGIN_ROOT} — plugin directory (always use for portability)
${ANY_ENV_VAR} — user environment variables
Document all required environment variables in the plugin README.
Directory Servers Without a URL
Some MCP directory entries have no url because the endpoint is dynamic. Plugins can reference these servers by name instead — if the server name in the plugin's MCP config matches the directory entry name, it is treated the same as a URL match.
Commands (Legacy)
Prefer skills/*/SKILL.md for new plugins. The Cowork UI now presents commands and skills as a single "Skills" concept. The commands/ format still works, but only use it if you specifically need the single-file format with $ARGUMENTS/$1 substitution and inline bash execution.
Location: commands/command-name.mdFormat: Markdown with optional YAML frontmatter
Frontmatter Fields
Field
Required
Type
Description
description
No
String
Brief description shown in /help (under 60 chars)
allowed-tools
No
String or Array
Tools the command can use
model
No
String
Model override: sonnet, opus, haiku
argument-hint
No
String
Documents expected arguments for autocomplete
Example Command
---description: Review code for security issuesallowed-tools: Read, Grep, Bash(git:*)argument-hint: [file-path]---Review @$1 for security vulnerabilities including:- SQL injection- XSS attacks- Authentication bypass- Insecure data handlingProvide specific line numbers, severity ratings, and remediation suggestions.
Key Rules
Commands are instructions FOR Claude, not messages for the user. Write them as directives.
$ARGUMENTS captures all arguments as a single string; $1, $2, $3 capture positional arguments.
@path syntax includes file contents in the command context.
Use ${CLAUDE_PLUGIN_ROOT} to reference plugin files portably.
allowed-tools Patterns
# Specific toolsallowed-tools: Read, Write, Edit, Bash(git:*)# Bash with specific commands onlyallowed-tools: Bash(npm:*), Read# MCP tools (specific)allowed-tools: ["mcp__plugin_name_server__tool_name"]
CONNECTORS.md
Location: Plugin root
When to create: When the plugin references external tools by category rather than specific product
Format
# Connectors## How tool references workPlugin files use `~~category` as a placeholder for whatever tool the userconnects in that category. For example, `~~project tracker` might meanAsana, Linear, Jira, or any other project tracker with an MCP server.Plugins are tool-agnostic — they describe workflows in terms of categoriesrather than specific products.## Connectors for this plugin| Category | Placeholder | Included servers | Other options || --------------- | ------------------- | ---------------- | ------------------------ || Chat | `~~chat` | Slack | Microsoft Teams, Discord || Project tracker | `~~project tracker` | Linear | Asana, Jira, Monday |
Using ~~ Placeholders
In plugin files (skills, agents), reference tools generically:
Check ~~project tracker for open tickets assigned to the user.Post a summary to ~~chat in the team channel.
During customization (via the cowork-plugin-customizer skill), these get replaced with specific tool names.
README.md
Every plugin should include a README with:
Overview — what the plugin does
Components — list of skills, agents, hooks, MCP servers
Setup — any required environment variables or configuration
Usage — how to trigger each skill
Customization — if CONNECTORS.md exists, mention it
Example Plugins
Three complete plugin structures at different complexity levels. Use these as templates when implementing in Phase 4.
Minimal Plugin: Single Skill
A simple plugin with one skill and no other components.
---name: meeting-notesdescription: > Generate structured meeting notes from a transcript. Use when the user asks to "summarize this meeting", "create meeting notes", "extract action items from this transcript", or provides a meeting transcript file.---Read the transcript file the user provided and generate structured meeting notes.Include these sections:1. **Attendees** — list all participants mentioned2. **Summary** — 2-3 sentence overview of the meeting3. **Key Decisions** — numbered list of decisions made4. **Action Items** — table with columns: Owner, Task, Due Date5. **Open Questions** — anything unresolvedWrite the notes to a new file named after the transcript with `-notes` appended.
Standard Plugin: Skills + MCP
A plugin that combines domain knowledge, user-initiated actions, and external service integration.
{ "name": "code-quality", "version": "0.1.0", "description": "Enforce coding standards with reviews, linting, and style guidance", "author": { "name": "User" }}
skills/review-changes/SKILL.md
---name: review-changesdescription: > Review code changes for style and quality issues. Use when the user asks to "review my changes", "check this diff", "review for style violations", or wants a code quality pass on uncommitted work.---Run `git diff --name-only` to get the list of changed files.For each changed file:1. Read the file2. Check against the coding-standards skill for style violations3. Identify potential bugs or anti-patterns4. Flag any security concernsPresent a summary with:- File path- Issue severity (Error, Warning, Info)- Description and suggested fix
skills/fix-lint/SKILL.md
---name: fix-lintdescription: > Auto-fix linting issues in changed files. Use when the user asks to "fix lint errors", "clean up linting", or "auto-fix my lint issues".---Run the linter: `npm run lint -- --format json 2>&1`Parse the linter output and fix each issue:- For auto-fixable issues, apply the fix directly- For manual-fix issues, make the correction following project conventions- Skip issues that require architectural changesAfter all fixes, run the linter again to confirm clean output.
skills/coding-standards/SKILL.md
---name: coding-standardsdescription: > This skill should be used when the user asks about "coding standards", "style guide", "naming conventions", "code formatting rules", or needs guidance on project-specific code quality expectations.metadata: version: "0.1.0"---
# Coding StandardsProject coding standards and conventions for consistent, high-quality code.## Core Rules- Use camelCase for variables and functions- Use PascalCase for classes and types- Prefer const over let; avoid var- Maximum line length: 100 characters- Use explicit return types on all exported functions## Import Order1. External packages2. Internal packages (aliased with @/)3. Relative imports4. Type-only imports last## Additional Resources- **`references/style-rules.md`** — complete style rules by language
---name: ticket-analyzerdescription: Use this agent when the user needs to analyze tickets, triage incoming issues, or prioritize a backlog.<example>Context: User is preparing for sprint planninguser: "Help me triage these new tickets"assistant: "I'll use the ticket-analyzer agent to review and categorize the tickets."<commentary>Ticket triage requires systematic analysis across multiple dimensions, making the agent appropriate.</commentary></example><example>Context: User has a large backloguser: "Prioritize my backlog for next sprint"assistant: "Let me analyze the backlog using the ticket-analyzer agent to recommend priorities."<commentary>Backlog prioritization is a multi-step autonomous task well-suited for the agent.</commentary></example>model: inheritcolor: cyantools: ["Read", "Grep"]---You are a ticket analysis specialist. Analyze tickets for priority, effort, and dependencies.**Your Core Responsibilities:**1. Categorize tickets by type (bug, feature, tech debt, improvement)2. Estimate relative effort (S, M, L, XL)3. Identify dependencies between tickets4. Recommend priority ordering**Analysis Process:**1. Read all ticket descriptions2. Categorize each by type3. Estimate effort based on scope4. Map dependencies5. Rank by impact-to-effort ratio**Output Format:**| Ticket | Type | Effort | Dependencies | Priority ||--------|------|--------|-------------|----------|| ... | ... | ... | ... | ... |Followed by a brief rationale for the top 5 priorities.
hooks/hooks.json
{ "SessionStart": [ { "matcher": "", "hooks": [ { "type": "command", "command": "echo '## Team Context\n\nSprint cycle: 2 weeks. Standup: daily at 9:30 AM. Use ~~project tracker for ticket management.'", "timeout": 5 } ] } ]}
CONNECTORS.md
# Connectors## How tool references workPlugin files use `~~category` as a placeholder for whatever tool the userconnects in that category. Plugins are tool-agnostic.## Connectors for this plugin| Category | Placeholder | Included servers | Other options || --------------- | ------------------- | ---------------- | ------------------- || Project tracker | `~~project tracker` | Linear | Asana, Jira, Monday || Chat | `~~chat` | Slack | Microsoft Teams || Source control | `~~source control` | GitHub | GitLab, Bitbucket |