create
The /create command is a unified entry point for generating Claude Code extensions including prompts, slash commands, agents, skills, and hooks. Use it when building new components for Claude Code by specifying the extension type and description, such as "/create prompt sentiment analyzer" or "/create command fetch-data", and the command routes to specialized skills that provide structured templates, best practices guidance, and validation patterns for each extension category.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/marcusgoll/Spec-Flow/HEAD/.claude/commands/meta/create.md -o ~/.claude/commands/create.mdcreate.md
# /create — Consolidated Creation Command
<context>
**Arguments**: $ARGUMENTS
</context>
<objective>
Unified entry point for creating Claude Code extensions with expert guidance:
- `/create prompt <desc>` → Generate optimized Claude prompts
- `/create command <desc>` → Create new slash command with best practices
- `/create agent <desc>` → Create specialized subagent configuration
- `/create skill <desc>` → Create agent skill with progressive disclosure
- `/create hook` → Create event-driven hook
All creation commands provide expert guidance on structure, best practices, and validation.
</objective>
<process>
## Step 1: Parse Type Argument
**Extract first argument as type:**
```
$type = first word of $ARGUMENTS
$remaining = rest of $ARGUMENTS
```
**If no type provided:**
Use AskUserQuestion to ask:
```json
{
"question": "What would you like to create?",
"header": "Extension Type",
"multiSelect": false,
"options": [
{
"label": "prompt",
"description": "Optimized Claude prompt with XML structure"
},
{
"label": "command",
"description": "New slash command following best practices"
},
{
"label": "agent",
"description": "Specialized subagent configuration"
},
{
"label": "skill",
"description": "Agent skill file with progressive disclosure"
},
{
"label": "hook",
"description": "Event-driven hook for tool/session events"
}
]
}
```
## Step 2: Invoke Appropriate Skill
<when_argument_is value="prompt">
### Create Prompt
**Purpose**: Generate optimized, XML-structured prompts with intelligent depth selection.
**Invoke skill**:
```
Skill: create-meta-prompts
```
Pass remaining arguments to skill for prompt generation.
**What the skill provides**:
- XML-structured prompt templates
- Intelligent depth selection (quick/standard/comprehensive)
- Context engineering best practices
- Progressive disclosure patterns
- Example outputs and validation
</when_argument_is>
<when_argument_is value="command">
### Create Slash Command
**Purpose**: Create new slash command following Claude Code best practices.
**Invoke skill**:
```
Skill: create-slash-commands
```
Pass remaining arguments for slash command creation.
**What the skill provides**:
- YAML frontmatter structure
- Argument parsing patterns
- Tool restrictions and allowed-tools configuration
- Dynamic context integration
- Progressive disclosure via skills
- Validation and testing guidance
</when_argument_is>
<when_argument_is value="agent">
### Create Subagent
**Purpose**: Create specialized subagent configuration with role definition and tool selection.
**Invoke skill**:
```
Skill: create-subagents
```
Pass remaining arguments for subagent creation.
**What the skill provides**:
- Subagent configuration structure
- Role and objective definition
- Tool selection guidance
- Prompt engineering for agent prompts
- XML structure compliance
- Integration with Task tool
</when_argument_is>
<when_argument_is value="skill">
### Create Agent Skill
**Purpose**: Create agent skill file with progressive disclosure and best practices.
**Invoke skill**:
```
Skill: create-agent-skills
```
Pass remaining arguments for skill creation.
**What the skill provides**:
- SKILL.md structure and organization
- Progressive disclosure patterns
- Reference documentation separation
- Example patterns and anti-patterns
- Validation rules
- Testing and quality guidance
</when_argument_is>
<when_argument_is value="hook">
### Create Hook
**Purpose**: Create event-driven hook for tool use, session events, or user prompts.
**Invoke skill**:
```
Skill: create-hooks
```
Pass remaining arguments for hook creation.
**What the skill provides**:
- Hook types (PreToolUse, PostToolUse, Stop, SessionStart, etc.)
- Configuration structure
- Matcher patterns
- Command vs inline hooks
- Error handling
- Testing and debugging guidance
</when_argument_is>
</process>
<success_criteria>
- Type correctly identified from arguments
- Appropriate skill invoked
- All remaining arguments passed through
- Expert guidance provided by skill
- Created extension follows best practices
- Validation rules met
</success_criteria>
---
## Quick Reference
| Command | Purpose | Skill Used |
|---------|---------|------------|
| `/create prompt <desc>` | Generate Claude prompt | create-meta-prompts |
| `/create command <desc>` | Create slash command | create-slash-commands |
| `/create agent <desc>` | Create subagent config | create-subagents |
| `/create skill <desc>` | Create skill file | create-agent-skills |
| `/create hook` | Create hook config | create-hooks |
## Examples
```bash
# Create optimized prompt
/create prompt "analyze code quality and suggest improvements"
# Create new slash command
/create command "deploy to staging environment"
# Create specialized subagent
/create agent "database migration specialist with rollback capability"
# Create agent skill
/create skill "TDD workflow with red-green-refactor cycle"
# Create event hook
/create hook
# (Will prompt for hook type and configuration)
```
## What Each Extension Type Provides
**Prompt** (create-meta-prompts):
- XML-structured templates
- Intelligent depth selection
- Context engineering patterns
- Progressive disclosure
- Research → Plan → Implement workflows
**Command** (create-slash-commands):
- YAML frontmatter configuration
- Argument hint and description
- Tool restrictions (allowed-tools)
- Dynamic context integration
- Skill integration for complex logic
**Agent** (create-subagents):
- Role and objective definition
- Tool selection for agent capabilities
- Prompt engineering for agent instructions
- Integration with Task tool
- XML structure compliance
**Skill** (create-agent-skills):
- Progressive disclosure structure
- Main SKILL.md with essential info
- Reference docs for deep dives
- Example patterns and anti-patterns
- Quality validation rules
**Hook** (create-hooks):
- EventExecute multiple sprints in parallel based on dependency graph from sprint-plan.md
Build and validate locally for projects without remote deployment (prototypes, experiments, local-only dev)
Execute multi-sprint epic workflow from interactive scoping through deployment with parallel sprint execution and self-improvement
Execute feature development workflow from specification through production deployment with automated quality gates
Analyze workflow state and provide context-aware guidance with visual progress indicators and recommended next steps
Initialize project documentation, preferences, or design tokens
Implement small bug fixes and features (<100 LOC) without full workflow. Use for single-file changes, bug fixes, refactors, and minor enhancements that can be completed in under 30 minutes.
Enter deep craftsman mode - question everything, plan like Da Vinci, craft insanely great solutions, then materialize to roadmap