plugins/compound-engineering/skills/create-agent-skills/SKILL.md
Expert guidance for creating Claude Code skills and slash commands. Use when working with SKILL.md files, authoring new skills, improving existing skills, creating slash commands, or understanding skill structure and best practices.
npx skillsauth add the-rabak/compound-engineering-plugin create-agent-skillsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill teaches how to create effective Claude Code skills following the official specification from code.claude.com/docs/en/skills.
Custom slash commands have been merged into skills. A file at .claude/commands/review.md and a skill at .claude/skills/review/SKILL.md both create /review and work the same way. Existing .claude/commands/ files keep working. Skills add optional features: a directory for supporting files, frontmatter to control invocation, and automatic context loading.
If a skill and a command share the same name, the skill takes precedence.
Use a command file (commands/name.md) when:
Use a skill directory (skills/name/SKILL.md) when:
Both use identical YAML frontmatter and markdown content format.
Use YAML frontmatter + markdown body with standard markdown headings. Keep it clean and direct.
---
name: my-skill-name
description: What it does and when to use it
---
# My Skill Name
## Quick Start
Immediate actionable guidance...
## Instructions
Step-by-step procedures...
## Examples
Concrete usage examples...
All fields are optional. Only description is recommended.
| Field | Required | Description |
|-------|----------|-------------|
| name | No | Display name. Lowercase letters, numbers, hyphens (max 64 chars). Defaults to directory name. |
| description | Recommended | What it does AND when to use it. Claude uses this for auto-discovery. Max 1024 chars. |
| argument-hint | No | Hint shown during autocomplete. Example: [issue-number] |
| disable-model-invocation | No | Set true to prevent Claude auto-loading. Use for manual workflows like /deploy, /commit. Default: false. |
| user-invocable | No | Set false to hide from / menu. Use for background knowledge. Default: true. |
| allowed-tools | No | Tools Claude can use without permission prompts. Example: Read, Bash(git *) |
| model | No | Model to use. Prefer explicit IDs. In this repo, default reasoning work to claude-sonnet-5, heavier code/review work to claude-sonnet-5, and reserve claude-haiku-4-5-20251001 for lightweight search or research tasks. |
| context | No | Set fork to run in isolated subagent context. |
| agent | No | Subagent type when context: fork. Options: Explore, Plan, general-purpose, or custom agent name. |
| Frontmatter | User can invoke | Claude can invoke | When loaded |
|-------------|----------------|-------------------|-------------|
| (default) | Yes | Yes | Description always in context, full content loads when invoked |
| disable-model-invocation: true | Yes | No | Description not in context, loads only when user invokes |
| user-invocable: false | No | Yes | Description always in context, loads when relevant |
Use disable-model-invocation: true for workflows with side effects: /deploy, /commit, /triage-prs, /send-slack-message. You don't want Claude deciding to deploy because your code looks ready.
Use user-invocable: false for background knowledge that isn't a meaningful user action: coding conventions, domain context, legacy system docs.
Use $ARGUMENTS placeholder for user input. If not present in content, arguments are appended automatically.
---
name: fix-issue
description: Fix a GitHub issue
disable-model-invocation: true
---
Fix GitHub issue $ARGUMENTS following our coding standards.
Access individual args: $ARGUMENTS[0] or shorthand $0, $1, $2.
The !`command` syntax runs shell commands before content is sent to Claude:
---
name: pr-summary
description: Summarize changes in a pull request
context: fork
agent: Explore
---
## Context
- Branch diff: !`git diff main...HEAD`
- Changed files: !`git diff --name-only main...HEAD`
Summarize this pull request...
Add context: fork to run in isolation. The skill content becomes the subagent's prompt. It won't have conversation history.
---
name: deep-research
description: Research a topic thoroughly
context: fork
agent: Explore
---
Research $ARGUMENTS thoroughly:
1. Find relevant files
2. Analyze the code
3. Summarize findings
Keep SKILL.md under 500 lines. Split detailed content into reference files:
my-skill/
├── SKILL.md # Entry point (required, overview + navigation)
├── reference.md # Detailed docs (loaded when needed)
├── examples.md # Usage examples (loaded when needed)
└── scripts/
└── helper.py # Utility script (executed, not loaded)
Link from SKILL.md: For API details, see [reference.md](reference.md).
Keep references one level deep from SKILL.md. Avoid nested chains.
If your skill or command launches subagents, be explicit about the source of truth for their prompts:
/workflows:review, not spawned directly from ad hoc prompts.workflows:work workflow's bundled execution-agent-prompt.md reference file before dispatch. Require the orchestrator to quote the first non-empty line, record the source, and stop if the template cannot be loaded.The description enables skill discovery. Include both what it does and when to use it.
Good:
description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
Bad:
description: Helps with documents
Ask: Is this a manual workflow (deploy, commit, triage) or background knowledge (conventions, patterns)?
disable-model-invocation: truedisable-model-invocationCommand:
---
name: my-command
description: What this command does
argument-hint: [expected arguments]
disable-model-invocation: true
allowed-tools: Bash(gh *), Read
---
# Command Title
## Workflow
### Step 1: Gather Context
...
### Step 2: Execute
...
## Success Criteria
- [ ] Expected outcome 1
- [ ] Expected outcome 2
Skill:
---
name: my-skill
description: What it does. Use when [trigger conditions].
---
# Skill Title
## Quick Start
[Immediate actionable example]
## Instructions
[Core guidance]
## Examples
[Concrete input/output pairs]
Link from SKILL.md to detailed content:
For API reference, see [reference.md](reference.md).
For form filling guide, see [forms.md](forms.md).
/skill-name to verifydisable-model-invocation: true if it has side effectsallowed-tools set if specific tools neededdisable-model-invocation: trueFor detailed guidance, see:
development
Mutates a single field or content region of an existing self-contained HTML artifact in place (island-first, no-added-facts, injection-safe) without regenerating the document from scratch. Invoked by a workflow command whenever it needs to back-write into an artifact it already composed -- e.g. a ref/status update, or a content rewrite that must re-project the affected view -- never by the user directly.
development
Composes a self-contained, interactive HTML artifact (island-first, single file, token-layer themed, injection-safe) from a workflow command's structured plan payload. Invoked by a workflow command at its artifact-write step -- currently `/workflows:plan` -- never by the user directly.
development
Mutates a single field or content region of an existing self-contained HTML artifact in place (island-first, no-added-facts, injection-safe) without regenerating the document from scratch. Invoked by a workflow command whenever it needs to back-write into an artifact it already composed -- e.g. a ref/status update, or a content rewrite that must re-project the affected view -- never by the user directly.
development
Composes a self-contained, interactive HTML artifact (island-first, single file, token-layer themed, injection-safe) from a workflow command's structured plan payload. Invoked by a workflow command at its artifact-write step -- currently `/workflows:plan` -- never by the user directly.