create-command
Interactive assistant for creating new Claude commands with proper structure, patterns, and MCP tool integration
What this skill does
# Command Creator Assistant
<task>
You are a command creation specialist. Help create new Claude commands by understanding requirements, determining the appropriate pattern, and generating well-structured commands that follow Scopecraft conventions.
</task>
<context>
CRITICAL: Read the command creation guide first: @/docs/claude-commands-guide.md
This meta-command helps create other commands by:
1. Understanding the command's purpose
2. Determining its category and pattern
3. Choosing command location (project vs user)
4. Generating the command file
5. Creating supporting resources
6. Updating documentation
</context>
<command_categories>
1. **Planning Commands** (Specialized)
- Feature ideation, proposals, PRDs
- Complex workflows with distinct stages
- Interactive, conversational style
- Create documentation artifacts
- Examples: @/.claude/commands/01_brainstorm-feature.md
@/.claude/commands/02_feature-proposal.md
2. **Implementation Commands** (Generic with Modes)
- Technical execution tasks
- Mode-based variations (ui, core, mcp, etc.)
- Follow established patterns
- Update task states
- Example: @/.claude/commands/implement.md
3. **Analysis Commands** (Specialized)
- Review, audit, analyze
- Generate reports or insights
- Read-heavy operations
- Provide recommendations
- Example: @/.claude/commands/review.md
4. **Workflow Commands** (Specialized)
- Orchestrate multiple steps
- Coordinate between areas
- Manage dependencies
- Track progress
- Example: @/.claude/commands/04_feature-planning.md
5. **Utility Commands** (Generic or Specialized)
- Tools, helpers, maintenance
- Simple operations
- May or may not need modes
</command_categories>
<command_frontmatter>
## CRITICAL: Every Command Must Start with Frontmatter
**All command files MUST begin with YAML frontmatter** enclosed in `---` delimiters:
```markdown
---
description: Brief description of what the command does
argument-hint: Description of expected arguments (optional)
---
```
### Frontmatter Fields
1. **`description`** (REQUIRED):
- One-line summary of the command's purpose
- Clear, concise, action-oriented
- Example: "Guided feature development with codebase understanding and architecture focus"
2. **`argument-hint`** (OPTIONAL):
- Describes what arguments the command accepts
- Examples:
- "Optional feature description"
- "File path to analyze"
- "Component name and location"
- "None required - interactive mode"
### Example Frontmatter by Command Type
```markdown
# Planning Command
---
description: Interactive brainstorming session for new feature ideas
argument-hint: Optional initial feature concept
---
# Implementation Command
---
description: Implements features using mode-based patterns (ui, core, mcp)
argument-hint: Mode and feature description (e.g., 'ui: add dark mode toggle')
---
# Analysis Command
---
description: Comprehensive code review with quality assessment
argument-hint: Optional file or directory path to review
---
# Utility Command
---
description: Validates API documentation against OpenAPI standards
argument-hint: Path to OpenAPI spec file
---
```
### Placement
- Frontmatter MUST be the **very first content** in the file
- No blank lines before the opening `---`
- One blank line after the closing `---` before content begins
</command_frontmatter>
<command_features>
## Slash Command Features
### Namespacing
Use subdirectories to group related commands. Subdirectories appear in the command description but don't affect the command name.
**Example:**
- `.claude/commands/frontend/component.md` creates `/component` with description "(project:frontend)"
- `~/.claude/commands/component.md` creates `/component` with description "(user)"
**Priority:** If a project command and user command share the same name, the project command takes precedence.
### Arguments
#### All Arguments with `$ARGUMENTS`
Captures all arguments passed to the command:
```bash
# Command definition
echo 'Fix issue #$ARGUMENTS following our coding standards' > .claude/commands/fix-issue.md
# Usage
> /fix-issue 123 high-priority
# $ARGUMENTS becomes: "123 high-priority"
```
#### Individual Arguments with `$1`, `$2`, etc.
Access specific arguments individually using positional parameters:
```bash
# Command definition
echo 'Review PR #$1 with priority $2 and assign to $3' > .claude/commands/review-pr.md
# Usage
> /review-pr 456 high alice
# $1 becomes "456", $2 becomes "high", $3 becomes "alice"
```
### Bash Command Execution
Execute bash commands before the slash command runs using the `!` prefix. The output is included in the command context.
**Note:** You must include `allowed-tools` with the `Bash` tool.
```markdown
---
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
description: Create a git commit
---
## Context
- Current git status: !`git status`
- Current git diff: !`git diff HEAD`
- Current branch: !`git branch --show-current`
- Recent commits: !`git log --oneline -10`
```
### File References
Include file contents using the `@` prefix to reference files:
```markdown
Review the implementation in @src/utils/helpers.js
Compare @src/old-version.js with @src/new-version.js
```
### Thinking Mode
Slash commands can trigger extended thinking by including extended thinking keywords.
### Frontmatter Options
| Frontmatter | Purpose | Default |
|-------------|---------|---------|
| `allowed-tools` | List of tools the command can use | Inherits from conversation |
| `argument-hint` | Expected arguments for auto-completion | None |
| `description` | Brief description of the command | First line from prompt |
| `model` | Specific model string | Inherits from conversation |
| `disable-model-invocation` | Prevent `Skill` tool from calling this command | false |
**Example with all frontmatter options:**
```markdown
---
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
argument-hint: [message]
description: Create a git commit
model: claude-3-5-haiku-20241022
---
Create a git commit with message: $ARGUMENTS
```
</command_features>
<pattern_research>
## Before Creating: Study Similar Commands
1. **List existing commands in target directory**:
```bash
# For project commands
ls -la /.claude/commands/
# For user commands
ls -la ~/.claude/commands/
```
2. **Read similar commands for patterns**:
- Check the frontmatter (description and argument-hint)
- How do they structure <task> sections?
- What MCP tools do they use?
- How do they handle arguments?
- What documentation do they reference?
3. **Common patterns to look for**:
```markdown
# MCP tool usage for tasks
Use tool: mcp__scopecraft-cmd__task_create
Use tool: mcp__scopecraft-cmd__task_update
Use tool: mcp__scopecraft-cmd__task_list
# NOT CLI commands
❌ Run: scopecraft task list
✅ Use tool: mcp__scopecraft-cmd__task_list
```
4. **Standard references to include**:
- @/docs/organizational-structure-guide.md
- @/docs/command-resources/{relevant-templates}
- @/docs/claude-commands-guide.md
</pattern_research>
<interview_process>
## Phase 1: Understanding Purpose
"Let's create a new command. First, let me check what similar commands exist..."
*Use Glob to find existing commands in the target category*
"Based on existing patterns, please describe:"
1. What problem does this command solve?
2. Who will use it and when?
3. What's the expected output?
4. Is it interactive or batch?
## Phase 2: Category Classification
Based on responses and existing examples:
- Is this like existing planning commands? (Check: brainstorm-feature, feature-proposal)
- Is this like implementation commands? (Check: implement.md)
- Does it need mode variations?
- Should it follow analysis patterns? (Check: review.md)
## Phase 3: Pattern Selection
**Study similar commands first**:
```markdown
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.