skills/custom-command-creator/SKILL.md
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.
npx skillsauth add takazudo/claude-resources custom-command-creatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guide for creating effective custom slash commands in Claude Code.
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:
Use skills instead when:
| 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: Enterprise > Personal > Project. When commands share a name across levels, personal ($HOME/.claude/commands/) overrides project (.claude/commands/) — commands follow the same precedence as skills, since custom commands are a skill variant. See Skills for the full precedence rule.
Every command is a single Markdown file with optional frontmatter:
---
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 for all available fields.
Pass dynamic values to commands using placeholders:
All arguments - $ARGUMENTS:
Fix issue #$ARGUMENTS following our coding standards
Usage: /fix-issue 123 high-priority → $ARGUMENTS = "123 high-priority"
Positional arguments - $1, $2, etc.:
Review PR #$1 with priority $2 and assign to $3
Usage: /review-pr 456 high alice → $1="456", $2="high", $3="alice"
Run shell commands before the prompt is sent using !command`` syntax:
---
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.
Include file contents using @ prefix:
Review the implementation in @src/utils/helpers.js
Compare @src/old.js with @src/new.js
Set the effort frontmatter field (low–max) to control reasoning depth — see references/frontmatter.md. The old "thinking keywords" prompting pattern ("think hard", "ultrathink") is superseded; current docs no longer document it.
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.
When the user asks to create a command, follow this workflow.
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:
$HOME/.claude/commands/<name>.md): User says "global", or wants it available across all projects.claude/commands/<name>.md): User says "local" or "project", or wants it scoped to current repoFor local commands, find the project root first:
git rev-parse --show-toplevel # Use repo root, or cwd if not a git repo
Ensure the target directory exists before writing.
Ask the user if needed:
!command``) for dynamic context?Create the command file with proper structure:
Required best practices:
description fieldargument-hint if the command accepts arguments (e.g., [filename], [pr-number])$ARGUMENTS for all args or $1, $2 for positional argsallowed-tools in frontmatterdisable-model-invocation: trueTemplate:
---
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.
Format the created command file using the mdx-formatter to ensure consistent markdown formatting:
pnpm dlx @takazudo/mdx-formatter --write <path-to-command-file.md>
After creating the file:
/<command-name>my-command.mddescription in frontmatter - commands without it are harder to discover$ARGUMENTS / $1 / $2 for dynamic values, not hardcoded values$HOME instead of ~: When command instructions reference home directory paths (e.g., log directories, config files), always write $HOME/cclogs/... or $HOME/.claude/..., never ~/cclogs/... or ~/.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 ~/ inside the working directory instead of resolving to the user's home directory. This applies to paths in the command body text, bash execution snippets, and any instructions that an agent will follow. (Guard note: the ~/... forms above are the deliberate NEVER-case this rule warns against — a future blanket ~→$HOME find-and-replace must skip this line, or it destroys the contrast the rule depends on.)---
description: Quick code review
---
Review this code for:
- Security vulnerabilities
- Performance issues
- Code style violations
---
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.
---
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
Most commands should omit model and inherit the session's active model. Pin a model only when the command's task clearly calls for it, e.g. a cheap, high-volume task that doesn't need a large model:
---
description: Quick lint-style pass over the diff
model: claude-haiku-4-5-20251001
---
Perform a lint-style pass on $ARGUMENTS.
To prevent Claude from invoking a command automatically via the Skill tool:
---
description: Deploy to production (manual only)
disable-model-invocation: true
---
Deploy the application to production.
Define hooks that run only during command execution:
---
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.
.claude/commands/ or $HOME/.claude/commands/).md extension/help to see available commands$ARGUMENTS for all args or $1, $2 for positionalallowed-tools: Bash(...) is in frontmattertools
Acceptance gate for a branch produced by an OpenAI Codex CLI run — usually Codex implementing a /big-plan epic that was handed off to it. Codex reports the work 'done' (or the user flags it WIP with corrections); this skill confirms the branch actually fulfils the original spec, fixes what falls short, and routes larger discoveries into GitHub issues. Use when: (1) User says '/finalize-codex-work', 'finalize codex work', 'confirm the codex work', 'check the codex branch', or 'codex said it's done', (2) A branch is the result of a Codex CLI session and needs verification against its spec issue/PR, (3) After assigning a /big-plan epic to Codex CLI. Pass -m/--merge to run /pr-complete -c at the end.
tools
Read a Figma design node directly from a share URL via the Figma REST API — no Dev Mode subscription, no MCP, no desktop app. Renders the node to PNG and dumps its full style/layout JSON so the design can be described, compared, or implemented. Use whenever the user gives a Figma design URL (figma.com/design/... or /file/...) and wants to see, read, inspect, reference, or implement that node — including `/fig-url-refer <url>`. This is the URL-based counterpart to `/figrefer` (which needs a Dev-plan desktop MCP); prefer this one when the input is a URL rather than a live desktop selection.
tools
Sync the user's Claude Code workflow skills into the OpenAI Codex CLI settings repo ($HOME/.codex) as Codex-native ports, fix the Codex .gitignore for new local state, then commit and push. Use when: (1) user says '/dev-codex-sync-settings-from-claude', 'sync codex settings', 'sync claude skills to codex', 'port skills to codex', or 'update codex from claude'; (2) after updating ~/.claude workflow skills (big-plan, x, x-as-pr, x-wt-teams) and Codex should catch up; (3) the $HOME/.codex repo has drifted behind $HOME/.claude. The ports are condensed Codex-native REWRITES, never file copies.
development
Analyze a video file (mov, mp4, webm, etc.) or a YouTube video by extracting still frames with ffmpeg and reading them chronologically with vision — Claude cannot ingest video files directly. Use whenever the user provides a video file path or YouTube URL and wants to know what happens in it: "read this video", "watch this video", "check this recording", "what happens in this .mov/.mp4", analyzing a screen recording of a UI bug, or verifying UI behavior captured in a video, even if they don't name this skill.