| name | create-components |
| description | Scaffold individual CC components (skills, agents, commands, hooks) with proper frontmatter, naming, and template compliance. Triggers: add skill, add agent, create command, add hook, extend project with new component. |
| argument-hint | Component type and name (e.g., 'skill analyzing-data' or 'agent code-reviewer') |
| allowed-tools | Read, Write, Edit, Glob |
| effort | medium |
Component Creation
Overview
This skill helps create properly structured Claude Code components (skills, agents, commands, hooks) following official specifications.
Instructions
Identify Component Type
| Component | User Says | Invocation | Purpose |
|---|
| Skill | "add skill", "create capability" | Model-invoked | Procedural knowledge |
| Agent | "add agent", "create assistant" | Model/user | Specialized delegation |
| Command | "add command", "create shortcut" | User-invoked | Explicit shortcuts |
| Hook | "add hook", "add automation" | Event-driven | Automated actions |
Creating a Skill
-
Gather information:
- Skill name (gerund form:
analyzing-data)
- What it does (for description)
- When to trigger (for description)
- Key instructions
-
Create structure (detect project type first):
mkdir -p skills/{{skill-name}}
mkdir -p .claude/skills/{{skill-name}}
-
Generate SKILL.md from template:
---
name: {{skill-name}}
description: {{what-it-does}}. Use when {{trigger-conditions}}.
---
{{step-by-step-guidance}}
{{trigger-conditions-detailed}}
{{expected-output-structure}}
-
Validate: Check naming rules (max 64 chars, lowercase+hyphens only)
Creating an Agent
-
Gather information:
- Agent name (lowercase-hyphens)
- Specialization/purpose
- Tools needed (or inherit all)
- Model preference (sonnet/opus/haiku/inherit)
-
Generate agent file in agents/:
---
name: {{agent-name}}
description: {{specialization}}. Use when {{delegation-triggers}}.
tools: {{tool-list or omit}}
model: {{model-alias or omit}}
---
You are a specialized agent for {{purpose}}.
{{methodology}}
{{boundaries}}
{{expected-output}}
Creating a Command
-
Gather information:
- Command name (what user types after
/)
- What it does
- Arguments needed
- Tools to restrict (optional)
-
Generate command file in commands/:
---
description: {{brief-description-for-help}}
allowed-tools: {{tool-list or omit}}
---
{{what-claude-should-do}}
User provided: $ARGUMENTS
First argument: $1
Second argument: $2
Creating a Hook
-
Gather information:
- Event to hook (PreToolUse, PostToolUse, etc.)
- Matcher pattern (which tools/actions)
- Action type (command, validation, notification)
- Script or command to run
-
Update hooks/hooks.json:
{
"hooks": {
"{{Event}}": [
{
"matcher": "{{pattern}}",
"hooks": [
{
"type": "command",
"command": "{{script-path}}"
}
]
}
]
}
}
Validation Checks
After creating any component:
| Component | Validation |
|---|
| Skill | Name ≤64 chars, lowercase+hyphens, description ≤1024 chars |
| Agent | Name unique, tools valid if specified |
| Command | File in commands/ (plugin) or .claude/commands/ (standalone), description present |
| Hook | Valid event name, script exists and executable |
Templates Reference
templates/skill.template/SKILL.md.template
templates/agent.template/agent.md.template
templates/command.template/command.md.template
See Also
knowledge/components/agent-skills.md — Skill deep dive
knowledge/components/subagents.md — Agent deep dive
knowledge/components/custom-commands.md — Command deep dive
knowledge/components/hooks.md — Hooks deep dive