create-slash-command

A command that creates a Claude Code slash command, which is a reusable instruction invoked with a slash and a name. It places the command in the project's .claude/commands folder with the required metadata.

In plain words
What is it for?
Use it to create commands with arguments, file references, shell commands, model settings, tool permissions, and organized subfolders.
Why use it?
It avoids manually assembling the command file structure and helps include only the tools and inputs the command needs.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/pr-pm/prpm/create-slash-command
Clone the repo
git clone --depth 1 https://github.com/pr-pm/prpm

Made for: Claude Code.

Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 857 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00010 $0.00857
Opus 5 $0.00005 $0.00428
Sonnet 5 $0.00002 $0.00171
Haiku 4.5 $0.00001 $0.00086

Measured yesterday against content hash 8570e5a3e503, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-slash-command scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/create-slash-command.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🔨 Slash Command Generator

Create a new Claude Code slash command following best practices and latest features.

Command to Create

Name: $1 Description: $2 (or $ARGUMENTS if multi-word)

Requirements

  1. Location: Create in .claude/commands/$1.md

  2. Structure: Include proper frontmatter with:

    • description - Clear, actionable description
    • allowed-tools - Minimal required tools
    • argument-hint - If command takes arguments
    • model - Appropriate model selection
    • commandType: slash-command - For PRPM compatibility
  3. Features to Consider:

    • Arguments: Use $ARGUMENTS, $1, $2, etc. for user input
    • File References: Use @filepath to reference files
    • Bash Execution: Use !command`` for inline bash (requires Bash in allowed-tools)
    • Namespacing: Use subdirectories for organization (.claude/commands/category/name.md)

Template Structure

---
description: [Brief, actionable description]
allowed-tools: [Minimal list: Read, Write, Edit, Bash, etc.]
argument-hint: [Expected arguments format]
model: [sonnet|haiku|opus|inherit]
commandType: slash-command
---

# [Icon] [Title]

[Clear description of what this command does]

## Instructions

- [Specific, actionable steps]
- [What the command should analyze/generate/modify]

## Output Format

[Describe expected output format, with examples if helpful]

Validation Checklist

Before creating, verify:

  • Command name is clear and follows kebab-case
  • Description is specific and actionable (not generic)
  • Tool permissions are minimal and necessary
  • Argument hints provided if arguments expected
  • Model selection appropriate for task complexity
  • Includes helpful examples or output format guidance
  • Uses special features where appropriate (@, !, $ARGUMENTS)

Examples

Simple Command (no arguments)

---
description: Review current file for security issues
allowed-tools: Read, Grep
---

# 🔒 Security Review

Review the current file for common security vulnerabilities:
- SQL injection
- XSS vulnerabilities
- Authentication issues
- Insecure dependencies

Read the full file on GitHub · 156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 156 lines · 10 tokens per session scan A 8570e5a3e503

Subscribe to this mod's changes

create-slash-command is a command published in the GitHub repository pr-pm/prpm (120 stars, last pushed 2mo ago), licensed MIT. It adds 10 tokens to every session and 857 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.