custom-command-creator
Create and manage custom slash commands in Claude Code. Use when: (1) User wants to create a new slash command, (2) User asks about /commands or custom commands, (3) User wants to automate frequent prompts, (4) User says 'create global command' or 'create local command', (5) User mentions 'command-creator'. Covers creation (global/local), command anatomy, frontmatter, arguments, bash, file references, namespacing, command vs skill comparison.
Best use case
custom-command-creator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create and manage custom slash commands in Claude Code. Use when: (1) User wants to create a new slash command, (2) User asks about /commands or custom commands, (3) User wants to automate frequent prompts, (4) User says 'create global command' or 'create local command', (5) User mentions 'command-creator'. Covers creation (global/local), command anatomy, frontmatter, arguments, bash, file references, namespacing, command vs skill comparison.
Teams using custom-command-creator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/custom-command-creator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How custom-command-creator Compares
| Feature / Agent | custom-command-creator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create and manage custom slash commands in Claude Code. Use when: (1) User wants to create a new slash command, (2) User asks about /commands or custom commands, (3) User wants to automate frequent prompts, (4) User says 'create global command' or 'create local command', (5) User mentions 'command-creator'. Covers creation (global/local), command anatomy, frontmatter, arguments, bash, file references, namespacing, command vs skill comparison.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Custom Command Creator
Guide for creating effective custom slash commands in Claude Code.
## What Are Custom Commands?
Custom slash commands are Markdown files that define reusable prompts. They're simpler than skills - single files for quick, frequently-used prompts.
**Use commands when:**
- Same prompt is used repeatedly
- Prompt fits in one file
- Explicit control over when to run
**Use skills instead when:**
- Claude should auto-detect the capability
- Multiple files or scripts needed
- Complex workflows with validation steps
## Command Locations
| Location | Path | Scope |
|----------|------|-------|
| Project | `.claude/commands/<name>.md` | This project only (shows as "project") |
| Personal | `$HOME/.claude/commands/<name>.md` | All your projects (shows as "user") |
**Priority**: Project commands override personal commands with same name.
## Command Anatomy
Every command is a single Markdown file with optional frontmatter:
```markdown
---
description: Brief description of what the command does
allowed-tools: Bash(git:*), Read
argument-hint: [filename] [options]
---
# Command Instructions
Your prompt content here with $ARGUMENTS placeholder.
```
See [frontmatter.md](references/frontmatter.md) for all available fields.
## Core Features
### Arguments
Pass dynamic values to commands using placeholders:
**All arguments** - `$ARGUMENTS`:
```markdown
Fix issue #$ARGUMENTS following our coding standards
```
Usage: `/fix-issue 123 high-priority` → `$ARGUMENTS` = "123 high-priority"
**Positional arguments** - `$1`, `$2`, etc.:
```markdown
Review PR #$1 with priority $2 and assign to $3
```
Usage: `/review-pr 456 high alice` → `$1`="456", `$2`="high", `$3`="alice"
### Bash Execution
Run shell commands before the prompt is sent using `!`command`` syntax:
```markdown
---
allowed-tools: Bash(git:*)
---
## Context
- Git status: !`git status`
- Current branch: !`git branch --show-current`
- Recent commits: !`git log --oneline -5`
## Task
Create a commit based on the above changes.
```
**Important**: Must include `Bash` in `allowed-tools` for this to work.
### File References
Include file contents using `@` prefix:
```markdown
Review the implementation in @src/utils/helpers.js
Compare @src/old.js with @src/new.js
```
### Extended Thinking
Include [thinking keywords](/ja/common-workflows#use-extended-thinking) to trigger extended thinking mode:
```markdown
Think deeply about the architecture of this codebase.
```
## Namespacing
Use subdirectories to organize related commands:
```
.claude/commands/
├── frontend/
│ └── component.md → /component (project:frontend)
├── backend/
│ └── api.md → /api (project:backend)
└── deploy.md → /deploy (project)
```
Same-named commands in different subdirectories are distinguished by their namespace label.
## Command Creation Workflow
When the user asks to create a command, follow this workflow.
### Step 1: Determine Command Name and Location
If the user provides a name, use it. If they describe what they want, derive an appropriate kebab-case name.
**Choose location based on context:**
- **Global command** (`$HOME/.claude/commands/<name>.md`): User says "global", or wants it available across all projects
- **Local/project command** (`.claude/commands/<name>.md`): User says "local" or "project", or wants it scoped to current repo
- **If unclear**: Ask the user which they prefer
For local commands, find the project root first:
```bash
git rev-parse --show-toplevel # Use repo root, or cwd if not a git repo
```
Ensure the target directory exists before writing.
### Step 2: Gather Details
Ask the user if needed:
- What should the command do?
- Does it need arguments? If so, what arguments?
- Should it use bash execution (`!`command``) for dynamic context?
- Should it restrict allowed tools?
### Step 3: Write the Command File
Create the command file with proper structure:
**Required best practices:**
- Always include frontmatter with `description` field
- Use `argument-hint` if the command accepts arguments (e.g., `[filename]`, `[pr-number]`)
- Use `$ARGUMENTS` for all args or `$1`, `$2` for positional args
- If using bash execution, include `allowed-tools` in frontmatter
- If manual-only invocation needed, add `disable-model-invocation: true`
**Template:**
```markdown
---
description: Brief description of what the command does
argument-hint: [expected-args]
allowed-tools: Bash(git:*), Read
---
# Command Title
Clear instructions for what Claude should do.
## Context (if using bash execution)
- Dynamic info: !`git status --short`
## Task
What to accomplish with $ARGUMENTS.
```
### Step 4: Format the command file
Format the created command file using the mdx-formatter to ensure consistent markdown formatting:
```bash
pnpm dlx @takazudo/mdx-formatter --write <path-to-command-file.md>
```
### Step 5: Verify and Report
After creating the file:
1. Confirm the file exists at the target path
2. Show the user the full content of the created file
3. Tell them they can use it with `/<command-name>`
4. **For global commands**: Remind that project-level commands take priority over global commands with the same name
5. **For local commands**: Suggest committing to git so the team can share it
### Key Rules for Creation
- Command filename must be kebab-case (lowercase, hyphens): `my-command.md`
- Always include `description` in frontmatter - commands without it are harder to discover
- Keep the command focused on a single task
- Use `$ARGUMENTS` / `$1` / `$2` for dynamic values, not hardcoded values
- Don't overcomplicate - a command is a single Markdown file for a reusable prompt
- Local commands are great for project-specific workflows (deploy, test patterns, review checklists)
- **File paths must use `$HOME` instead of `~`**: When command instructions reference home directory paths (e.g., log directories, config files), always write `$HOME/cclogs/...` or `$HOME/.claude/...`, NEVER `$HOME/cclogs/...` or `$HOME/.claude/...`. The `~` character is only expanded by interactive shell login contexts. In Node.js `fs` operations, non-login shells, and many tool contexts, `~` is treated as a literal character, which creates an actual directory named `$HOME/` inside the working directory. This applies to paths in the command body text, bash execution snippets, and any instructions that an agent will follow
## Examples
### Simple Review Command
```markdown
---
description: Quick code review
---
Review this code for:
- Security vulnerabilities
- Performance issues
- Code style violations
```
### Git Commit with Context
```markdown
---
description: Create a git commit with context
allowed-tools: Bash(git:*)
---
## Context
- Status: !`git status`
- Diff: !`git diff HEAD`
- Branch: !`git branch --show-current`
- Recent commits: !`git log --oneline -5`
## Task
Create a single git commit for the staged changes.
Message should be concise and follow conventional commits.
```
### PR Review with Arguments
```markdown
---
description: Review a pull request
argument-hint: [pr-number]
allowed-tools: Bash(gh:*)
---
## PR Context
- PR info: !`gh pr view $1`
- PR diff: !`gh pr diff $1`
- PR comments: !`gh pr view $1 --comments`
## Task
Review PR #$1 for:
1. Code quality and best practices
2. Potential bugs or edge cases
3. Security concerns
4. Test coverage
```
### Model-Specific Command
```markdown
---
description: Complex analysis with specific model
model: claude-sonnet-4-20250514
---
Perform detailed analysis of $ARGUMENTS.
```
## Preventing Auto-Invocation
To prevent Claude from invoking a command automatically via the Skill tool:
```markdown
---
description: Deploy to production (manual only)
disable-model-invocation: true
---
Deploy the application to production.
```
## Command-Scoped Hooks
Define hooks that run only during command execution:
```markdown
---
description: Deploy with validation
hooks:
PreToolUse:
- matcher: "Bash"
hooks:
- type: command
command: "./scripts/validate.sh"
once: true
---
Deploy to staging environment.
```
The `once: true` option runs the hook only once per session.
## Troubleshooting
### Command not appearing
1. Check file is in correct location (`.claude/commands/` or `$HOME/.claude/commands/`)
2. Verify `.md` extension
3. Run `/help` to see available commands
### Arguments not working
1. Use `$ARGUMENTS` for all args or `$1`, `$2` for positional
2. Check for typos in placeholder names
### Bash execution failing
1. Ensure `allowed-tools: Bash(...)` is in frontmatter
2. Check command syntax is correct
3. Verify the shell command works standalone
## Related Resources
- [Skills](/ja/skills): For complex multi-file capabilities
- [Hooks](/ja/hooks): For automated workflows around tool events
- [Permissions](/ja/iam): For controlling tool accessRelated Skills
subagent-creator
Create new Claude Code custom agents (subagents). Use when: (1) User wants to create a new custom agent, (2) User says 'create agent', 'new agent', 'make subagent', (3) User wants a specialized agent for delegation. Covers agent file format, YAML frontmatter, tool restrictions, model selection, permission modes, persistent memory, placement.
skill-creator
Guide for creating new Claude Code skills AND tweaking/fixing existing ones. Use when: (1) User wants to create a new skill, (2) User wants to improve, fix, or tweak an existing skill, (3) User says 'create skill', 'new skill', 'fix skill', 'update skill', 'tweak skill', 'skill not working', or 'skill triggers too often'. Covers skill anatomy (SKILL.md, scripts/, references/, assets/), progressive disclosure, frontmatter, bundled resources, init_skill.py, diagnosing trigger/behavior issues, and iteration.
mermaid-creator
Use proactively whenever generating Mermaid diagram code in any context (markdown blocks, .md files, docs). Covers flowcharts, sequence, class, state, ER, gantt, pie, mindmaps, timelines, and all Mermaid types. Applies strict syntax rules to prevent rendering errors (HTML tags, style directives, invalid escapes). No explicit request needed — load automatically when Mermaid syntax is being produced.
ascii-circuit-diagram-creator
Create and validate ASCII circuit diagrams with automatic rule checking and iterative refinement. Use when the user requests circuit diagrams in ASCII/text format, or when creating technical documentation with embedded schematics. Ensures golden rules (no line crossings without junctions, no lines crossing labels, proper component connections, correct polarity). Includes preview validation using monospace rendering.
zudoesa-articlify
Convert conversation context into an esa article via the zudoesa-writer subagent. ONLY invoke when the user explicitly asks — NEVER proactively propose. Triggers: 'write esa article', 'esa記事', 'esaに書いて', 'articlify for esa', or /zudoesa-articlify. Gathers context, creates a writing brief, delegates to the writer subagent.
zudoesa-apply-voice
Apply Takazudo's esa writing voice and vocabulary rules to text. Use when: (1) User wants to write/rewrite text in Takazudo's esa style, (2) User says 'apply voice', 'esa voice', 'esa文体で', 'esa風に書いて', '文体を適用', (3) User provides text to transform to esa style. Reads writing-style.md and vocabulary-rule.md from takazudo-esa-writing repo and applies the rules.
zudocg-articlify
Convert conversation context into a CodeGrid article via the zudocg-writer subagent. ONLY invoke when the user explicitly asks — NEVER proactively propose. Triggers: 'write codegrid article', 'CodeGrid記事', 'codegridに書いて', 'articlify for codegrid', or /zudocg-articlify. Gathers context, creates a writing brief, delegates to the writer subagent.
zudocg-apply-voice
Apply Takazudo's CodeGrid writing voice and vocabulary rules to text. Use when: (1) User wants to write/rewrite text in Takazudo's CodeGrid style, (2) User says 'apply voice', 'codegrid voice', 'codegrid文体で', 'codegrid風に書いて', '文体を適用', (3) User provides text to transform to CodeGrid style. Reads writing-style.md and vocabulary-rule.md from takazudo-codegrid-writing repo and applies the rules.
zpaper-articlify
Convert conversation context into a zpaper blog article via the zpaper-writer subagent. ONLY invoke when the user explicitly asks — NEVER proactively propose. Triggers: 'write zpaper article', 'zpaper記事', 'zpaperに書いて', 'articlify for zpaper', or /zpaper-articlify. Gathers context, creates a writing brief, delegates to the writer subagent.
zpaper-apply-voice
Apply Takazudo's zpaper blog writing voice and vocabulary rules to text. Use when: (1) User wants to write/rewrite text in Takazudo's zpaper style, (2) User says 'apply voice', 'zpaper voice', 'zpaper文体で', 'zpaper風に書いて', 'ブログ文体を適用', (3) User provides text to transform to zpaper style. Reads writing-style.md and vocabulary-rule.md from the zpaper repo and applies the rules.
xlsx
Spreadsheet creation, editing, and analysis. Use when working with .xlsx, .xlsm, .csv, .tsv files for: (1) Creating spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modifying existing spreadsheets while preserving formulas, (4) Data analysis and visualization, (5) Recalculating formulas.
x
Facade for development workflows. Routes on two axes: plan-first vs implement-now (escalates to /big-plan -a when the request needs research / decomposition / has unclear scope — the appended -a makes the plan chain into implementation in-session), then single vs multi on the ready-to-build fast paths (/x-as-pr single-topic, /x-wt-teams multi-topic parallel). Use when: (1) User says '/x' followed by dev instructions, (2) User wants to start development without choosing the workflow skill, (3) User says 'dev', 'implement', or 'build' with a task. Default option: -v (verify-ui). Review-loop (-l) is opt-in — without -l the downstream skill runs a single /deep-review pass. Forwards -a (autonomy/auto-chain) and -m (merge at the end + cleanup + CI watch) through every route; auto-fix of raised findings (-f) and issue-raising (-ri) are downstream defaults, with -nf/--no-fix and -nori/--no-raise-issues as the forwarded opt-outs. -a and -m are orthogonal — full hands-off end-to-end is -a -m.