Create and edit Claude Code slash commands. Use when the user wants to create a new slash command, add a custom command, or modify an existing command in .claude/commands/.
Slash commands are markdown files that define reusable prompts for Claude Code.
.claude/commands/*.md - shared via version control~/.claude/commands/*.md - user-specificThe filename (without .md) becomes the command name: fix-lint.md → /fix-lint
---
allowed-tools: Read, Grep, Bash(git:*)
argument-hint: [file] [options]
description: Short description shown in /help
model: claude-sonnet-4-5-20250929
---
Command instructions here. Use $ARGUMENTS for all args or $1, $2 for positional.
| Field | Purpose |
|-------|---------|
| allowed-tools | Restrict which tools the command can use |
| argument-hint | Show expected arguments in help (e.g., [filename]) |
| description | Description shown in /help output |
| model | Override model (e.g., claude-3-5-haiku-20241022 for fast tasks) |
$ARGUMENTS - all arguments as single string$1, $2, etc. - positional argumentsInclude shell command output using the bang-backtick syntax.
Syntax: Place an exclamation mark immediately before a backtick-wrapped command.
Examples in a command file:
Current branch: (BANG)(TICK)git branch --show-current(TICK)
Changes: (BANG)(TICK)git diff --stat(TICK)
Where BANG = exclamation mark and TICK = backtick character.
Use @filepath to include file contents:
Review this config: @tsconfig.json
Subdirectories organize commands:
.claude/commands/
├── git/
│ ├── commit.md # /commit (project:git)
│ └── pr.md # /pr (project:git)
└── test.md # /test (project)
---
description: Run all tests
---
Run the test suite and fix any failures.
---
allowed-tools: Bash(npm test:*), Read, Edit
argument-hint: [test-pattern]
description: Run tests matching pattern
---
Run tests matching: $ARGUMENTS
If tests fail, analyze and fix them.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer