Free Tool

Free Claude Code Slash Command Generator

A Claude Code slash command generator turns plain-English workflows into ready-to-use /commands for Claude Code. Paste a workflow description and instantly get a downloadable .md file with the right frontmatter, allowed tools, and instructions.

Start from a template

Click to load - your edits stay local in your browser.

Command

Runs locally - no API call.
Tokens you can use in the workflow
$ARGUMENTS - the full argument string the user typed after the command.
$1, $2 - positional arguments.
Lines starting with ! run as bash and the output is inlined (e.g. !git diff --staged).
@path/to/file - inlines that file's contents.
Allowed toolsLimits what Claude can run for this command

review-security.md

19 lines · .claude/commands/

---
description: Review staged git changes for security issues.
allowed-tools: Bash, Read, Grep, Bash(git diff:*), Bash(git status:*)
---

Review the currently staged changes for security issues.

Staged diff:
!git diff --staged

Look specifically for:
1. Hardcoded secrets, API keys, or credentials
2. SQL injection, XSS, or command injection risks
3. Missing input validation at trust boundaries
4. Insecure deserialization or unsafe `eval`
5. Logging of sensitive data

Report findings as a prioritized list (critical / high / medium / low) with file path and line number for each issue. If you find nothing, say so explicitly.
Install in one shell command
mkdir -p .claude/commands && cat > .claude/commands/review-security.md <<'EOF'
---
description: Review staged git changes for security issues.
allowed-tools: Bash, Read, Grep, Bash(git diff:*), Bash(git status:*)
---

Review the currently staged changes for security issues.

Staged diff:
!git diff --staged

Look specifically for:
1. Hardcoded secrets, API keys, or credentials
2. SQL injection, XSS, or command injection risks
3. Missing input validation at trust boundaries
4. Insecure deserialization or unsafe `eval`
5. Logging of sensitive data

Report findings as a prioritized list (critical / high / medium / low) with file path and line number for each issue. If you find nothing, say so explicitly.
EOF
Example invocation
/review-security

How to create a Claude Code slash command

  1. Pick a starter template or describe your workflow. Click a template (review staged changes, write tests, generate a commit message) or type the workflow in plain English in the workflow textarea.
  2. Choose scope and restrict tools. Pick project scope (.claude/commands/, shared with the repo) or user scope (~/.claude/commands/, personal). Check the tools the command needs - keep it minimal.
  3. Add argument hints and tokens. If the command takes input, set the argument-hint and reference $ARGUMENTS or $1 in the body. Use ! for shell output (!git diff) and @ for file contents (@src/app/page.tsx).
  4. Copy or download the .md file. Copy the markdown, download the file, or copy the install snippet to drop the file straight into .claude/commands/ from your terminal.
  5. Invoke from Claude Code. Restart Claude Code (or open a new session) and run /your-command-name. The command appears in autocomplete and runs the workflow you defined.

Anatomy of a slash command file

Every slash command is a Markdown file. The YAML frontmatter at the top configures the command - description, autocomplete hint, tool restrictions, and an optional model override. The body is the prompt Claude runs when you invoke it.

Frontmatter keys

  • description - one-sentence summary, shown in /help.
  • argument-hint - placeholder shown in autocomplete (e.g. <file path>).
  • allowed-tools - comma-separated tool list. Use Bash(git diff:*) to scope bash to specific commands.
  • model - optional override for which Claude model runs the command.

Body tokens

  • $ARGUMENTS - everything the user typed after the command name.
  • $1, $2 - positional arguments.
  • !command - run a bash command and inline its output.
  • @path - inline a file's contents.

Frequently Asked Questions

What is a Claude Code slash command?

+

A Claude Code slash command is a reusable prompt stored as a Markdown file with YAML frontmatter. You invoke it from the Claude Code prompt as /command-name (optionally followed by arguments) and Claude runs the workflow defined in the file. It's the cleanest way to turn a one-off prompt you keep retyping into a shortcut.

Where do slash command files go - project or user scope?

+

Project-scoped commands live in .claude/commands/ at the root of your repo and are shared with anyone who clones the project. User-scoped commands live in ~/.claude/commands/ and are personal - available in every project on your machine but not committed. Use project scope for team workflows (review, deploy, test) and user scope for personal shortcuts.

What does `allowed-tools` do in a slash command?

+

The allowed-tools frontmatter restricts which Claude Code tools the command may use. List them comma-separated, for example `allowed-tools: Bash, Read, Edit`. You can also scope Bash to specific commands with patterns like `Bash(git diff:*)` so the command is allowed to read git history but cannot, say, push or rm. Leaving it off means the command inherits Claude's default tool access.

Can I pass arguments to a slash command?

+

Yes. Inside the command body, $ARGUMENTS expands to the full argument string the user typed after the command name, and $1, $2, ... refer to positional arguments. Set the argument-hint frontmatter (for example `argument-hint: <file path>`) so autocomplete shows users what to type. Example: /explain-file src/lib/auth.ts where $1 becomes src/lib/auth.ts.

How do I include shell output or file contents in a command?

+

Prefix a line with `!` to run it as bash and inline the output - for example `!git diff --staged` pulls the staged diff into the prompt. Prefix a path with `@` to inline that file's contents, like `@src/app/page.tsx`. Both expand at invocation time, so the command always operates on fresh data instead of stale text baked into the file.

Slash commands are great. Reliable workflows are better.

Slash commands give you reusable prompts. Tornic gives you deterministic multi-step workflows on top of your existing Claude, Codex, or Cursor CLI - same predictable steps every run, no surprise API bills, no agent drift.

Try Tornic