Help us improve
Share bugs, ideas, or general feedback.
From ac
Create Claude Code commands with phase-based structure and agent delegation. Use when building /plugin:command slash commands for Claude Code plugins.
npx claudepluginhub anilcancakir/claude-code-plugin --plugin acHow this skill is triggered — by the user, by Claude, or both
Slash command
/ac:command-creatoropusThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create Claude Code commands — user-invocable workflows that orchestrate agents, interview users, and delegate complex work through structured phases.
Guides creation of Claude Code slash commands with frontmatter templates, TodoWrite tracking, parallel Task invocations, sequential/conditional patterns, and multi-agent coordination.
Guides developers on creating, structuring, and organizing slash commands for Claude Code. Covers YAML frontmatter, dynamic arguments, bash execution, user interactions, and best practices for reusable command workflows.
Guides creating slash commands for Claude Code: structure, YAML frontmatter, dynamic arguments, file references, bash execution, user interactions, organization, and best practices.
Share bugs, ideas, or general feedback.
Create Claude Code commands — user-invocable workflows that orchestrate agents, interview users, and delegate complex work through structured phases.
1. Classify Command Scope
Determine structure before drafting:
2. Research Existing Commands
Launch ac:explore to find similar commands in the target project:
Agent(subagent_type: "ac:explore", prompt: "CONTEXT: Creating a new command. GOAL: Find existing command files and their structure. REQUEST: List all commands in commands/ directory. Return 2-3 representative examples with their phase structure, frontmatter, and agent delegation patterns.")
Read 2-3 existing commands (e.g., plan.md, execute.md, commit.md) to calibrate structure depth and phase naming conventions.
3. Dedup Audit
Read ${CLAUDE_SKILL_DIR}/../prompt-writer/references/cc-dedup-guide.md before drafting.
Key dedup rules for commands:
4. Draft Command
Follow phase-based structure from references/command-patterns.md. Each phase uses:
## Phase N: Name
**Goal**: One sentence — what this phase achieves.
**Actions**:
1. First action
2. Second action
3. Third action (with sub-steps if needed)
Rules:
$ARGUMENTS for user-supplied input.${CLAUDE_PLUGIN_ROOT} for paths to bundled templates.5. Frontmatter
---
description: "Short, action-oriented. What does this command do? ≤250 chars."
argument-hint: "[expected-input]"
effort: low | medium | high
allowed-tools:
- AskUserQuestion
- Agent
- Read
- Bash
---
Notes:
allowed-tools (allowlist) — different from agents which use disallowedTools.AskUserQuestion and Agent if the command interviews users or delegates to agents.effort signals expected token budget: low (single task, <5 phases), medium (multi-agent, 5-7 phases), high (full orchestration, 7+ phases).model to command frontmatter — commands inherit the session model. Only agents have model routing.6. Review
Present draft. Verify before finalizing:
$ARGUMENTS referenced at the right phase (usually Phase 1)?allowed-tools matches every tool used in the body?All agents in a single message block — CC waits automatically:
Agent(subagent_type: "ac:explore", prompt: "...")
Agent(subagent_type: "ac:librarian", prompt: "...")
Use when results are needed before proceeding. Do NOT advance to the next phase until all agents complete.
Agent(subagent_type: "ac:plan-worker", run_in_background: true, prompt: "...")
Agent(subagent_type: "ac:plan-worker", run_in_background: true, prompt: "...")
Use only when you have independent work to continue while agents run. Collect all completion notifications before the next phase.
Pass model: to override per agent — do not upgrade all agents to Opus:
| Task type | Model |
|---|---|
| Search, file reading, fast lookup | haiku |
| Standard execution, analysis | sonnet |
| Planning, architecture, deep review | opus |
Every agent delegation follows this structure:
TASK: [What the agent must accomplish — one clear sentence]
EXPECTED OUTCOME: [What the agent returns — file:line refs, verdict, structured output]
MUST DO:
- [Specific constraint 1]
- [Specific constraint 2]
MUST NOT DO:
- [What to exclude or avoid]
CONTEXT: [Relevant state — plan path, conventions, prior findings]
Variables available in command bodies (replaced at load time by CC):
| Variable | Where | Description |
|---|---|---|
$ARGUMENTS | Commands | All arguments passed on invocation |
${CLAUDE_PLUGIN_ROOT} | Commands | Absolute path to the plugin's root directory |
${CLAUDE_SKILL_DIR} | Skills only | Absolute path to the skill's directory — NOT available in commands |
Use ${CLAUDE_PLUGIN_ROOT} to reference bundled templates:
Read template from `${CLAUDE_PLUGIN_ROOT}/references/my-template.md`
| Topic | File | When to read |
|---|---|---|
| Command templates | command-patterns.md | Before drafting — full phase template, AskUserQuestion patterns, pipeline profiles, agent spawning examples |
| Dedup guide | ${CLAUDE_SKILL_DIR}/../prompt-writer/references/cc-dedup-guide.md | Before drafting — what not to repeat from global CLAUDE.md and auto-loaded context |
| Frontmatter schemas | ${CLAUDE_SKILL_DIR}/../prompt-writer/references/frontmatter-schemas.md | During frontmatter validation — field schemas, invocation control, tool control semantics |