Claude Code custom slash command generator
A custom slash command in Claude Code is a markdown file: .claude/commands/deploy.md becomes /deploy, and a file in a subfolder becomes /folder:name. Fill in the form to get the file with its frontmatter, $ARGUMENTS placeholders and shell context already written.
Runs in your browser. What you type stays on this page. By Jake Marsh. Checked against Claude Code docs: custom commands and skills on 2026-11-16.
How to use it
- Load an example or start blank, then name the command. The name is the file name and what you type after the slash.
- Pick where it lives: .claude/commands in this project (commit it for your team) or ~/.claude/commands for every project.
- Choose arguments. Free text uses $ARGUMENTS for everything you type; named arguments (issue, file) let you write $issue in the prompt.
- Write the prompt. Add shell commands to run first if the prompt needs live context such as a diff or an issue.
- Check the preview with sample arguments, then copy the file or download it into the path shown above it.
- Type / in Claude Code to find it. If a new file does not show in the menu, start a new session.
What goes in the file
A command file is optional frontmatter between two --- lines, then the prompt. Every frontmatter field is optional, and description is the one worth always setting.
---
description: Read a GitHub issue and fix it on a new branch
argument-hint: "[issue]"
arguments: [issue]
disable-model-invocation: true
allowed-tools: Bash(gh issue *)
---
## Context
- Issue: !`gh issue view $issue`
## Task
Fix GitHub issue $issue using the details above.- description: shown in the / menu and used by Claude to decide when the command applies. Without it Claude Code uses the first non-empty line of the file body.
- argument-hint: the placeholder text shown while you type, such as [issue-number].
- arguments: names for positional arguments, so $issue maps to the first word you type.
- disable-model-invocation: true stops Claude from running the command on its own. Use it for anything with side effects.
- allowed-tools: tools Claude can use without asking during the turn the command runs, such as Bash(git status *).
- model: sonnet, opus, haiku or inherit, applied for that turn.
How arguments are filled in
- $ARGUMENTS is everything you typed after the command name.
- $0, $1, $2 (or $ARGUMENTS[0]) are individual arguments, counted from zero. Quote a phrase to keep it as one argument: /deploy "hello world" staging.
- $issue works for names listed in arguments.
- If the prompt has no placeholder at all, Claude Code appends what you typed as an ARGUMENTS: line.
- To write a literal $ before a digit, such as $1.00, escape it as \$1.00.
Commands, skills and shell context
Custom commands have been merged into skills. Existing .claude/commands files keep working and use the same frontmatter, but a skill at .claude/skills/<name>/SKILL.md can carry supporting files, and if a skill and a command share a name, the skill wins. Switch the format above to get the skill version of the same prompt.
A line like !`git diff --cached` runs before Claude sees the prompt and is replaced with its output. These commands never ask for permission: one your rules do not allow, or one that exits non-zero, aborts the whole run before Claude sees anything. List them in allowed-tools and add || true to commands that may fail. Setting disableSkillShellExecution to true in settings turns this off for user, project and plugin commands.
Questions
- Where do I put the file?
- In .claude/commands/ at the root of your project to share it through git, or in ~/.claude/commands/ to have it in every project. The file name without .md is the command, so deploy.md is /deploy.
- How do I group commands under a prefix?
- Put them in a subfolder. .claude/commands/frontend/component.md is typed as /frontend:component: each slash in the path under commands/ becomes a colon.
- What is the difference between $ARGUMENTS and $1?
- $ARGUMENTS is the whole string you typed. $0, $1 and so on are single arguments split on spaces, counted from zero, with quotes keeping a phrase together. Declare names in the arguments field to use $issue instead of $0.
- Why does Claude run my command without me typing it?
- Claude can start a command when its description fits the task. Add disable-model-invocation: true to the frontmatter and only you can run it. The toggle in the form writes that line.
- Why does my command stop with "Shell command permission check failed"?
- Shell context lines never ask for permission. Outside auto mode, a line your permission rules do not allow aborts the run instead. List the commands in allowed-tools, for example Bash(git diff *), and they run for that turn. The form writes those rules for your context lines when the pre-approve box is ticked.
- Should I write a command or a skill?
- Both work and use the same prompt. The docs recommend a skill for new work because it can bring supporting files along. A single markdown file with no extras is fine as a command.
Sources
Checked 2026-11-16.
Commands start the work. Taskhold shows how it is going.
Once /fix-issue is running on three branches, you want one place to see which step each agent is on and which one is stuck asking you a question. Taskhold is a shared task list for you and your coding agents: steps, progress bars and blocked questions you answer from a live board.
Or connect your agent first, no sign-up: add https://taskhold.com/api/mcp as an MCP server. The first time it uses Taskhold, it gives you the trial link.
Related tools
- CLAUDE.md and AGENTS.md generator
Answer a few questions about your repo (stack, commands, rules, do-nots) and get a starter CLAUDE.md and AGENTS.md, either as one shared file or as two.
- Claude Code subagent generator
Fill in a name, a description and a tool list, or start from a code reviewer, debugger or test runner, and get a ready .claude/agents/ file with the frontmatter checked.
- Claude Code permissions builder
Pick what Claude Code may run, what it must ask about and what it can never touch, and get the allow, ask and deny block for settings.json. Paste an existing file to check it.