Agent skill

Slash Command Builder

by pr-pm in pr-pm/prpm

A skill your agent uses when creating, improving, or troubleshooting Claude Code slash commands.

MITAuto-check passedAgent Workflows

Install Slash Command Builder

skills CLI
$ npx skills add pr-pm/prpm --skill slash-command-builder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pr-pm/prpm slash-command-builder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pr-pm/prpm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/slash-command-builder .claude/skills/slash-command-builder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
slash-command-builder
GitHub stars
122
Token cost
~2.7k tokens
SKILL.md length
771 words
Files
4
Skills in repo
35
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when creating, improving, or troubleshooting Claude Code slash commands.

  • Works in 12 steps: Identify the Use Case → Choose Command Name → Design the Prompt → …
  • Troubleshooting Claude Code slash commands
  • SKILL.md covers When to Use This Skill, Quick Reference, Creating Effective Slash… and Advanced Features, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Slash Command Builder is an agent skill from pr-pm/prpm. Use when creating, improving, or troubleshooting Claude Code slash commands. Expert guidance on command structure, arguments, frontmatter, tool permissions, and best practices for building effective custom commands.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `EXAMPLES.md`, `FRONTMATTER.md` and `PATTERNS.md`).

It sits in Agent Workflows, covering Hooks and plugins. The repository describes itself as: The universal registry for AI coding tools. The licence is MIT.

When your agent uses it

  • Troubleshooting Claude Code slash commands
  • Tasks that involve Hooks and plugins

Example prompts

  • “/slash-command-builder”

Requirements

  • Node.js

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Identify the Use Case
  2. Choose Command Name
  3. Design the Prompt
  4. Add Frontmatter Configuration
  5. Test the Command
  6. Keep Commands Focused
  7. Use Clear Argument Hints
  8. Document Expected Output
  9. Include Examples
  10. Be Specific with Tool Permissions
  11. Test with Edge Cases
  12. Version Control Commands

What it can do on your machine

Read from SKILL.md and the folder at commit 5f993e6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Slash Command Builder loads about 2.7k tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 771 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pr-pm/prpm at commit 5f993e6, republished under its MIT licence (© pr-pm). 771 words, ~2,700 tokens.

Download SKILL.mdSave it as .claude/skills/slash-command-builder/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
slash-command-builder
description
Use when creating, improving, or troubleshooting Claude Code slash commands. Expert guidance on command structure, arguments, frontmatter, tool permissions, and best practices for building effective custom commands.

Slash Command Builder - Claude Code Command Expert

Use this skill when creating, improving, or troubleshooting Claude Code slash commands. Provides expert guidance on command structure, syntax, frontmatter configuration, and best practices.

When to Use This Skill

Activate this skill when:

  • User asks to create a new slash command
  • User wants to improve an existing command
  • User needs help with command arguments or frontmatter
  • User is troubleshooting command invocation issues
  • User wants to understand slash command capabilities
  • User asks about the difference between commands and skills

Quick Reference

Command File Structure
markdown
---
description: Brief description shown in autocomplete
argument-hint: [arg1] [arg2] <optional-arg>
allowed-tools: Bash(git *), Read, Write
model: claude-sonnet-4-6
disable-model-invocation: false
---

Your command prompt here with $ARGUMENTS or $1, $2, etc.

Use !`command` for bash execution
Use @file.txt for file references
File Locations

Project commands (shared with team):

.claude/commands/my-command.md

Personal commands (individual use):

~/.claude/commands/my-command.md

Organized commands (namespaced):

.claude/commands/frontend/component.md  → /component (project:frontend)

Creating Effective Slash Commands

Step 1: Identify the Use Case

Good candidates for slash commands:

  • Frequently repeated prompts
  • Simple, single-purpose tasks
  • Quick code reviews or analyses
  • Common git workflows
  • Standard documentation tasks

NOT good for slash commands (use Skills instead):

  • Complex multi-step workflows
  • Context-aware behavior
  • Team standardization needs
  • Workflows requiring multiple files
Step 2: Choose Command Name

Best practices:

  • Use lowercase with hyphens: /review-pr, /optimize-code
  • Make it memorable and intuitive
  • Avoid conflicts with built-in commands
  • Keep it short (2-3 words max)

Examples:

  • ✅ /review-pr - Clear, concise
  • ✅ /fix-lint - Action-oriented
  • ❌ /review-pull-request-thoroughly - Too verbose
  • ❌ /rpr - Too cryptic
Step 3: Design the Prompt

Simple command (no arguments):

markdown
---
description: Analyze code for performance bottlenecks
---

Analyze the current file for performance issues:
1. Identify O(n²) or worse algorithms
2. Find unnecessary re-renders or computations
3. Check for memory leaks
4. Suggest optimizations with code examples

Command with all arguments:

markdown
---
description: Generate component boilerplate
argument-hint: <component-name> <type>
---

Create a $ARGUMENTS component following our style guide:
- Use TypeScript with strict types
- Include prop interfaces
- Add JSDoc comments
- Export as default

Command with positional arguments:

markdown
---
description: Review pull request
argument-hint: [pr-number] [reviewer]
---

Review PR #$1 and assign to @$2:
1. Check code quality and style
2. Verify tests are included
3. Look for security issues
4. Suggest improvements
5. Add comments in GitHub
Step 4: Add Frontmatter Configuration

See FRONTMATTER.md in this skill directory for complete frontmatter options.

Minimal frontmatter:

yaml
---
description: What this command does
---

Full-featured frontmatter:

yaml
---
description: Complete command with all options
argument-hint: [required] <optional>
allowed-tools: Bash(git *), Read(**/*.ts), Write
model: claude-sonnet-4-6
disable-model-invocation: false
---
Step 5: Test the Command
  1. Save the file to .claude/commands/
  2. Invoke with /command-name
  3. Check argument substitution works
  4. Verify tool permissions if using allowed-tools
  5. Test edge cases (missing args, wrong types)

Advanced Features

Bash Execution

Execute shell commands inline with ! prefix:

markdown
---
description: Show git status
allowed-tools: Bash(git status:*)
---

Current repository status:

!`git status`

Recent commits:

!`git log --oneline -5`
File References

Include file contents with @ prefix:

markdown
---
description: Review specific file
argument-hint: <file-path>
---

Review this file for code quality:

@$1

Focus on:
- Type safety
- Error handling
- Performance
- Maintainability
Tool Permissions

Restrict which tools Claude can use:

markdown
---
description: Safe git status check
allowed-tools: Bash(git status:*), Bash(git diff:*)
---

Show current changes:

!`git status`
!`git diff --stat`

Tool permission syntax:

  • Bash(command:*) - Allow specific command with any args
  • Read(path/to/*.ts) - Allow reading TypeScript files in path
  • Write - Allow writing any file
  • Glob, Grep, Edit - Other available tools
Model Selection

Override default model for specific commands:

markdown
---
description: Quick syntax fix
model: claude-haiku-4-5-20251001
---

Fix syntax errors in the current file quickly.

When to use different models:

  • claude-haiku-4-5-20251001 - Fast, simple tasks
  • claude-sonnet-4-6 - General purpose (default)
  • claude-opus-4-8 - Complex reasoning
Disable Auto-Invocation

Prevent Claude from calling command automatically:

markdown
---
description: Destructive operation
disable-model-invocation: true
---

!`rm -rf node_modules`
!`npm install`

Common Patterns

Code Review Command
markdown
---
description: Review code changes
argument-hint: [file-or-pr]
allowed-tools: Bash(git *), Read, Grep
---

Review $ARGUMENTS for:

1. **Code Quality**
   - Clean, readable code
   - Proper naming conventions
   - DRY principle

2. **Security**
   - Input validation
   - SQL injection risks
   - XSS vulnerabilities

3. **Performance**
   - Inefficient algorithms
   - Unnecessary computations
   - Memory leaks

4. **Tests**
   - Unit test coverage
   - Edge cases handled
   - Integration tests

Provide specific file:line references for all issues.
Git Workflow Command
markdown
---
description: Create feature branch
argument-hint: <feature-name>
allowed-tools: Bash(git *)
---

Create and switch to feature branch:

!`git checkout -b feature/$1`
!`git push -u origin feature/$1`

Branch feature/$1 created and pushed to origin.
Documentation Generator
markdown
---
description: Generate API docs
argument-hint: <file-path>
allowed-tools: Read
---

Generate comprehensive API documentation for:

@$1

Include:
- Function signatures with types
- Parameter descriptions
- Return value documentation
- Usage examples
- Error cases
Test Generator
markdown
---
description: Generate test cases
argument-hint: <file-to-test>
allowed-tools: Read, Write
---

Generate test cases for:

@$1

Create tests covering:
- Happy path scenarios
- Edge cases
- Error conditions
- Boundary values

Use the existing test framework style.

Troubleshooting

Command Not Found

Problem: /my-command doesn't autocomplete

Solutions:

  1. Check file is in .claude/commands/ or ~/.claude/commands/
  2. Verify filename matches command (.claude/commands/my-command.md)
  3. Restart Claude Code to reload commands
  4. Check for syntax errors in frontmatter
Arguments Not Substituting

Problem: $1 appears literally instead of being replaced

Solutions:

  1. Ensure arguments are passed: /command arg1 arg2
  2. Check you're using $1, $2 (not ${1})
  3. For all args, use $ARGUMENTS instead
  4. Verify argument-hint frontmatter is correct
Tool Permission Denied

Problem: Command can't execute bash or read files

Solutions:

  1. Add allowed-tools frontmatter
  2. Use specific tool patterns: Bash(git *)
  3. Check tool name capitalization (e.g., Bash, not bash)
  4. For file operations, use glob patterns: Read(**/*.ts)
Show full SKILL.md (289 more words)Show less
Command Invokes at Wrong Time

Problem: Claude calls command when you don't want it to

Solutions:

  1. Add disable-model-invocation: true to frontmatter
  2. Ensure description is specific to avoid false triggers
  3. Use more explicit command names

Commands vs. Skills

Use Slash Commands When:
  • ✅ Task is simple and focused
  • ✅ Prompt fits in one Markdown file
  • ✅ Need quick, explicit invocation
  • ✅ Personal productivity shortcuts
Use Skills When:
  • ✅ Complex, multi-step workflows
  • ✅ Context-aware automatic activation
  • ✅ Team needs standardization
  • ✅ Multiple supporting files needed
  • ✅ Sophisticated conditional logic

Example:

  • Command: /review-pr - Quick PR review prompt
  • Skill: code-reviewer - Comprehensive review framework with security.md, performance.md, style.md, and scripts

Best Practices

1. Keep Commands Focused

Each command should do ONE thing well. Don't create Swiss Army knife commands.

2. Use Clear Argument Hints
yaml
argument-hint: [required] <optional> [choices: a|b|c]
3. Document Expected Output

Tell Claude what format you want:

markdown
Generate a JSON response with this structure:
{
  "issues": [],
  "suggestions": []
}
4. Include Examples

Show Claude what good output looks like:

markdown
Example output:

## Security Issues
- **SQL Injection** (file.ts:42) - Use parameterized queries
5. Be Specific with Tool Permissions

Don't use allowed-tools: Bash - use allowed-tools: Bash(git *)

6. Test with Edge Cases
  • Missing arguments
  • Wrong argument types
  • Files that don't exist
  • Empty repositories
7. Version Control Commands

Store .claude/commands/ in git for team collaboration

8. Organize with Namespaces

Use subdirectories for related commands:

.claude/commands/
├── git/
│   ├── feature.md
│   ├── fix.md
│   └── release.md
└── testing/
    ├── unit.md
    └── e2e.md
  • FRONTMATTER.md - Complete frontmatter reference
  • EXAMPLES.md - Real-world command examples
  • PATTERNS.md - Common command patterns

Checklist for New Commands

Before finalizing a slash command:

  • Command name is clear and concise
  • Description frontmatter is specific
  • Argument hints are provided if needed
  • Tool permissions are minimal and specific
  • Prompt is focused on one task
  • Examples are included in prompt
  • Expected output format is specified
  • Edge cases are considered
  • Command has been tested
  • File is in correct directory

Remember: Great slash commands are simple, focused, and make frequent tasks effortless. If you find yourself adding complexity, consider creating a Skill instead.

© pr-pm, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in .claude/skills/slash-command-builder of pr-pm/prpm.

  • SKILL.md
  • EXAMPLES.md
  • FRONTMATTER.md
  • PATTERNS.md

Open the folder on GitHubat commit 5f993e6

Compare with similar skills

Slash Command Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Slash Command Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Slash Command Builder this skillpr-pm/prpm122—~2.7kAutomated safety check: PassMIT
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official37k11 repos~4.1kAutomated safety check: NotesApache-2.0
Claude Code Agent Developmentanthropics/claude-plugins-official37k8 repos~2.8kAutomated safety check: PassApache-2.0
Claude Code Skill Developer Guidediet103/claude-code-infrastructure-showcase10k10 repos~3.5kAutomated safety check: PassMIT
Plugin Settings Patternanthropics/claude-plugins-official37k7 repos~3kAutomated safety check: PassApache-2.0
MCP Integration for Pluginsanthropics/claude-plugins-official37k11 repos~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    37k GitHub starsUsed in 11 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    37k GitHub starsUsed in 8 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Skill Developer Guide

    diet103/claude-code-infrastructure-showcase

    A guide to creating and managing Claude Code skills with auto-activation: skill-rules.json triggers, hooks, enforcement levels, YAML frontmatter and progressive disclosure.

    10k GitHub starsUsed in 10 repos~3.5k tokens
    Agent WorkflowsAuto-check passed
  • Plugin Settings Pattern

    anthropics/claude-plugins-official

    Official

    Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.

    37k GitHub starsUsed in 7 repos~3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    37k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Command Development

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code slash commands: Markdown files with YAML frontmatter, arguments, file references, bash context and interactive prompts.

    37k GitHub starsUsed in 10 repos~4.8k tokens
    Agent WorkflowsAuto-check passed

More from pr-pm/prpm

All 35 skills in this repo
  • Reference for writing Claude Code agent files: location, frontmatter fields, validation limits, tool and model choices, and the required content format.

    122 GitHub starsUsed in 3 repos~4k tokens
    Auto-check passed
  • Covers how to build, configure and publish Claude Code hooks: event types, exit codes, JSON I/O, and PRPM packaging.

    122 GitHub starsUsed in 2 repos~3.9k tokens
    Auto-check: notes
  • Shows how to write .claude/rules/ files correctly: paths frontmatter instead of globs, quoted glob patterns, global rules and conversion of Cursor rules.

    122 GitHub starsUsed in 2 repos~551 tokens
    Auto-check passed
  • Reference for writing portable Agent Skills packages, covering SKILL.md frontmatter limits, name rules, directory layout and where Codex CLI, GitHub Copilot and Amp look for skills.

    122 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • A skill your agent uses when building custom Kiro AI agents or when user asks for agent configurations - provides JSON structure, tool configuration, prompt patterns, and security best practices for…

    122 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • A skill your agent uses when creating OpenCode agents - provides markdown format with YAML frontmatter, mode/tools/permission configuration, and best practices for specialized AI assistants

    122 GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed

Categories

Questions about Slash Command Builder

What does Slash Command Builder do?

A skill your agent uses when creating, improving, or troubleshooting Claude Code slash commands. Slash Command Builder is an agent skill from pr-pm/prpm. Use when creating, improving, or troubleshooting Claude Code slash commands.

When should I use Slash Command Builder?

Slash Command Builder fits situations like: troubleshooting Claude Code slash commands; tasks that involve Hooks and plugins.

How do I install Slash Command Builder in Claude Code?

Run `npx skills add pr-pm/prpm --skill slash-command-builder -a claude-code`. Or copy the skill folder (.claude/skills/slash-command-builder in pr-pm/prpm) into .claude/skills/slash-command-builder in your project. Claude Code loads it when a task matches its description.

How do I install Slash Command Builder in Codex?

Run `npx skills add pr-pm/prpm --skill slash-command-builder -a codex`. Or copy the skill folder (.claude/skills/slash-command-builder in pr-pm/prpm) into .agents/skills/slash-command-builder in your project. Codex loads it when a task matches its description.

Can I use Slash Command Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pr-pm/prpm --skill slash-command-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/slash-command-builder, .gemini/skills/slash-command-builder, .github/skills/slash-command-builder and .opencode/skills/slash-command-builder in your project.

What does Slash Command Builder need to run?

SKILL.md names no scripts, command-line tools or credentials: Slash Command Builder is instructions for the agent only. Our summary lists: Node.js.

Does Slash Command Builder access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Slash Command Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Slash Command Builder use?

Slash Command Builder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Slash Command Builder use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Slash Command Builder?

Skills that share tags, products or a category with Slash Command Builder: Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 37k stars), Claude Code Agent Development (anthropics/claude-plugins-official, 37k stars), Claude Code Skill Developer Guide (diet103/claude-code-infrastructure-showcase, 10k stars) and Plugin Settings Pattern (anthropics/claude-plugins-official, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Slash Command Builder?

pr-pm (a GitHub organization) maintains it in pr-pm/prpm, which has 122 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 6, 2026.

Source: pr-pm/prpm on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.