Agent Skill
2/7/2026

meta-command

Guide for creating and validating Claude Code slash commands. USE WHEN: - "create a command", "new command", "make a command" - "command spec", "command format", "frontmatter" - "allowed-tools", "argument-hint" - validating or organizing commands DO NOT USE WHEN: - Creating skills or agents (use meta-skill, meta-agent) - General markdown formatting

P
practical
1GitHub Stars
1Views
npx skills add practical-stack/astro-blog-kit

SKILL.md

Namemeta-command
DescriptionGuide for creating and validating Claude Code slash commands. USE WHEN: - "create a command", "new command", "make a command" - "command spec", "command format", "frontmatter" - "allowed-tools", "argument-hint" - validating or organizing commands DO NOT USE WHEN: - Creating skills or agents (use meta-skill, meta-agent) - General markdown formatting

name: meta-command description: | Guide for creating and validating Claude Code slash commands.

USE WHEN:

  • "create a command", "new command", "make a command"
  • "command spec", "command format", "frontmatter"
  • "allowed-tools", "argument-hint"
  • validating or organizing commands

DO NOT USE WHEN:

  • Creating skills or agents (use meta-skill, meta-agent)
  • General markdown formatting

Meta-Command

A meta-skill for creating and validating Claude Code slash commands. Supports Claude Code and OpenCode platforms.

Output Language: All generated command content will be in English.

Workflow Routing

IntentReference
Create a new command (full process)workflows/create-command.md
Official field specificationreferences/official-spec.md
Best practices & patternsreferences/best-practices.md
Real-world examplesreferences/examples.md

Quick Start

Create a New Command

  1. Determine command category (see below)
  2. Create file: .claude/commands/{name}.md
  3. Add frontmatter + content
  4. Test with /command-name

Validate Commands

/organize-command .claude/commands/my-command.md
/organize-command --all

Command Categories

Choose the appropriate category based on purpose:

CategoryPurposeToolsExamples
orchestratorMulti-phase pipelineRead, Write, Glob/organize-, /create-
actionExecute specific taskBash(cmd:*), Write/deploy, /build
queryGather informationRead, Grep, Glob/search, /analyze
generatorCreate files/contentWrite, Read/init-*, /scaffold
interactiveUser input workflowQuestion, Read, Write/setup, /configure

Command Creation Workflow (5 Phases)

PhaseGoalKey Output
1. DEFINEClarify purposeName + description
2. CLASSIFYSelect categoryCategory + tools
3. DESIGNWrite structureFrontmatter + body
4. INTEGRATEAdd skill references@skill links
5. TESTValidateWorking command

Phase 1: DEFINE

Questions to answer:

  • What does this command do?
  • Who triggers it? (always human)
  • What inputs does it need?
  • What outputs does it produce?

Phase 2: CLASSIFY

Select category and determine:

  • allowed-tools based on category
  • model if specific reasoning needed
  • disable-model-invocation for destructive commands

Phase 3: DESIGN

Write the command file:

---
description: Brief purpose (shown in command list)
allowed-tools: Tool1, Tool2, Bash(cmd:*)
argument-hint: [required] [--optional]
---

# Command Title

## Arguments
$ARGUMENTS
- **required**: Description
- **--optional**: Description

## Instructions
[Step-by-step procedure]

## Output
### Success
[Format]
### Failure
[Format]

## Safety
| Check | Action |
|-------|--------|
| Risk | Mitigation |

Phase 4: INTEGRATE

Add skill references for domain knowledge:

## Instructions

1. Read @.claude/skills/meta-command/SKILL.md
2. Apply validation rules from skill

Key Principle: Command orchestrates; Skill provides knowledge only.

Phase 5: TEST

  • Run command with valid arguments
  • Run with missing/invalid arguments
  • Verify tool restrictions work
  • Check output format

Frontmatter Fields

FieldRequiredTypeDescription
descriptionYesstringBrief description shown in command list
allowed-toolsNostring/arrayTool restrictions
argument-hintNostringPlaceholder: [arg1] [--flag]
modelNostringhaiku, sonnet, opus
disable-model-invocationNobooleanPrevent programmatic invocation

Tool Scoping Patterns

NeedPattern
Git operationsBash(git:*)
npm scriptsBash(npm:*)
DockerBash(docker:*)
All bash (not recommended)Bash

Dynamic Content Syntax

SyntaxPurposeExample
$ARGUMENTSAll arguments as stringReview $ARGUMENTS
$1, $2, ...Positional argumentsDeploy $1 to $2
@path/to/fileFile reference@.claude/skills/skill/SKILL.md
!`command`Embedded bash!`git status`

Command Structure Template

---
description: Brief purpose description
allowed-tools: Tool1, Tool2, Bash(cmd:*)
argument-hint: [required-arg] [--optional-flag]
---

# Command Title

Brief explanation of what this command does.

## Arguments

$ARGUMENTS

- **required-arg**: Description
- **--optional-flag**: Description

## Pipeline Overview (for orchestrator commands)

Phase 1: ACTION └─ Description Phase 2: ACTION └─ Description


## Instructions

### Phase 1: Name

[Steps, skill references]

### Phase 2: Name

[Steps]

## Output

### Success

[Expected output format]


### Failure

[Error format with suggestions]


## Safety

| Check | Action |
|-------|--------|
| [Safety concern] | [How to handle] |

## Key Principle

[Important design note]

## Related

- @.claude/skills/relevant-skill/SKILL.md
- @.claude/commands/related-command.md

Relationship Patterns

Command + Skill

⚡ COMMAND: Orchestrates flow
    ↓
📚 SKILL: Provides knowledge (read-only)
    ↓
🔧 TOOL: Executes operations

Command + Agent

For complex reasoning, commands can delegate:

## Instructions

For complex analysis, consult oracle agent:
1. Gather context
2. Delegate reasoning to oracle
3. Apply recommendations

Anti-Patterns to Avoid

Anti-PatternProblemSolution
Missing descriptionNot discoverableAdd meaningful description
allowed-tools: BashToo permissiveUse Bash(cmd:*) pattern
Hardcoded domain knowledgeNot reusableExtract to skill
Missing output examplesUnclear expectationsAdd Output section
No safety sectionRisk of damageAdd Safety for side effects
Skill orchestrationWrong patternSkills inform, commands orchestrate

Validation Checklist

Frontmatter

  • description present and meaningful
  • allowed-tools properly scoped
  • argument-hint if command takes args
  • disable-model-invocation: true for destructive

Structure

  • ## Arguments if argument-hint present
  • ## Instructions with clear steps
  • ## Output with examples
  • ## Safety for side effects

Integration

  • Skills use @.claude/skills/... syntax
  • Referenced skills exist
  • Pipeline ownership respected

Platform Support

PlatformLocationStatus
Claude Code.claude/commands/Full Support
OpenCode.opencode/commands/Full Support
Skills Info
Original Name:meta-commandAuthor:practical