agentsclimarketplace

Claude code slash commands

Skill JamesPrial/claude-plugins/slash-command-guide/skills/claude-code-slash-commands

Create custom slash commands for Claude Code. Use when the user wants to create, generate, or build a slash command (.md file) for Claude Code, or when they ask about slash command syntax, frontmatter options, argument handling, or want help organizing their commands. Triggers on phrases like "make a slash command", "create a command for Claude Code", "write a /command", or questions about $ARGUMENTS, allowed-tools, or command frontmatter.From its SKILL.md

Install
npx -y skills add JamesPrial/claude-plugins --skill claude-code-slash-commands

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.9 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

Claude Code Slash Commands

Create custom slash commands for Claude Code as Markdown files with optional YAML frontmatter.

Quick Reference

LocationScopeDescription Label
.claude/commands/Project (shared via git)(project)
~/.claude/commands/Personal (all projects)(user)

Command Structure

---
allowed-tools: Tool1, Tool2(pattern:*)
argument-hint: [arg1] [arg2]
description: Brief description shown in /help
model: claude-sonnet-4-20250514
disable-model-invocation: false
---

Your prompt instructions here.
Use $ARGUMENTS for all args, or $1, $2, etc. for positional.
Reference files with @path/to/file.
Execute bash inline with !`command`.

Creating Commands

Workflow

  1. Determine scope (project vs personal)
  2. Choose command name (filename without .md)
  3. Write frontmatter (optional but recommended)
  4. Write prompt body with argument placeholders
  5. Save to appropriate location

Frontmatter Options

FieldPurposeDefault
allowed-toolsTools the command can useInherits from conversation
argument-hintShows in autocomplete (e.g., [file] [options])None
descriptionBrief description for /helpFirst line of prompt
modelSpecific model to useInherits from conversation
disable-model-invocationPrevent SlashCommand tool from calling thisfalse

Arguments

All arguments - $ARGUMENTS captures everything:

Fix issue #$ARGUMENTS following our standards
# /fix-issue 123 high-priority → "123 high-priority"

Positional - $1, $2, etc. for specific args:

Review PR #$1 with priority $2 and assign to $3
# /review-pr 456 high alice → $1="456", $2="high", $3="alice"

Bash Execution

Use ! prefix to execute bash and include output in context:

---
allowed-tools: Bash(git:*)
description: Create commit from staged changes
---

## Context
- Status: !`git status --short`
- Diff: !`git diff --cached`
- Branch: !`git branch --show-current`

## Task
Create a commit message for these changes.

Important: Must include allowed-tools with Bash permissions when using ! commands.

File References

Use @ prefix to include file contents:

Review @src/utils/helpers.js for security issues
Compare @old.js with @new.js

Namespacing

Subdirectories organize commands (shown in description, not command name):

  • .claude/commands/frontend/component.md/component (project:frontend)
  • ~/.claude/commands/backend/api.md/api (user:backend)

Examples

Simple Command

# .claude/commands/review.md
Review this code for bugs, security issues, and style violations.

With Arguments

---
argument-hint: [issue-number]
description: Fix GitHub issue
---
# .claude/commands/fix-issue.md
Fix issue #$ARGUMENTS following our coding standards and create a PR.

Git Commit Helper

---
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
argument-hint: [message]
description: Stage and commit changes
---
# .claude/commands/commit.md

## Current State
- Status: !`git status`
- Staged diff: !`git diff --cached`
- Branch: !`git branch --show-current`

## Instructions
Create a commit. If $ARGUMENTS provided, use as message. Otherwise generate from diff.

Code Generation

---
argument-hint: [component-name]
description: Generate React component
allowed-tools: Write
---
# .claude/commands/component.md

Create a React component named $1 with:
- TypeScript
- Tailwind styling
- Unit tests
- Storybook story

Reference our patterns: @src/components/Button.tsx

Multi-file Analysis

---
description: Compare implementations
argument-hint: [file1] [file2]
---
# .claude/commands/compare.md

Compare @$1 with @$2 and identify:
1. Architectural differences
2. Performance implications
3. Suggested improvements

Tips

  • Keep descriptions concise (shown in /help)
  • Use argument-hint for discoverability
  • Prefer $1, $2 when args have distinct roles
  • Use $ARGUMENTS for free-form input
  • Test commands with various argument patterns
  • Use extended thinking keywords for complex analysis

See Also

For complex multi-step workflows with scripts, templates, and reference docs, consider using Agent Skills instead. See references/skills-vs-commands.md.

What ships with it: 3 files

10.6 KB alongside SKILL.md, 1 of them executable

references/

scripts/

Gives 0 of the 12 instructions most context ai engineering skills give in ~1.1k tokens

Counted across 1,328 of the 2,349 authors here whose files we hold, read 2026-09-06

  • Dispatch a fresh subagent for each taskin 76 of 1328, across 59 files
  • Perform spec compliance review before code quality reviewin 44 of 1328, across 34 files
  • Dispatch a final code reviewer after all tasksin 38 of 1328, across 26 files
  • Answer subagent questions before allowing implementationin 36 of 1328, across 26 files
  • Use the least powerful model capable of the taskin 33 of 1328, across 26 files
  • Create a TodoWrite list for all tasksin 32 of 1328, across 22 files
  • Perform a task review after each implementationin 31 of 1328, across 24 files
  • Extract all tasks and context from the planin 29 of 1328, across 20 files
  • Provide full task text to subagentsin 28 of 1328, across 20 files
  • Use git worktrees for isolated workspacesin 25 of 1328, across 20 files
  • Specify the model explicitly when dispatching a subagentin 23 of 1328, across 18 files
  • Execute all tasks from the plan without stoppingin 21 of 1328, across 16 files

Said here and by no other author read

  • determine command scope as project or personal
  • choose command name as filename without extension
  • write prompt body with argument placeholders
  • save command file to appropriate directory
  • include allowed-tools with bash permissions for bash execution
  • use argument-hint for command discoverability

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.