smithery.ai

slash-command-creator

Use when authoring a custom Claude Code slash command, debugging slash command syntax, or converting a repetitive prompt into a reusable shortcut under `.claude/commands/`. Covers the reusable Markdown prompt template format, frontmatter configuration, argument handling, variable substitution, and workflow automation patterns. Trigger phrases include "create a slash command", "make a /command", "custom command", "argument-hint", and "my slash command does nothing".

First seen Mar 23, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version0.5.2
LicenseMIT
Declared agents claude-code
More metadata
author
AeyeOps
version
0.5.2
summary
Authoring guide for Claude Code slash commands as reusable Markdown prompt templates.

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,831 B
  • docs SUMMARY.md 338 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

Slash Command Creator

Create effective Claude Code slash commands - reusable prompt templates stored as Markdown files.

Quick Reference

Scope Location Label in /help
Project .claude/commands/*.md (project)
Personal ~/.claude/commands/*.md (user)

File Structure

---
description: Brief description shown in /help
argument-hint: <required> [optional]
allowed-tools: Bash(git *), Read, Edit
model: sonnet
disable-model-invocation: false
---

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

Variables

Variable Description Example
$ARGUMENTS All args as single string /cmd foo bar -> "foo bar"
$1, $2... Positional args /cmd foo bar -> $1="foo", $2="bar"
@path/file Include file contents Review @src/main.py
` !command ` Execute bash, include output ` !git status `

Frontmatter Fields

Field Purpose Default
description Shown in /help, enables discoverability First line of prompt
argument-hint Shows in autocomplete None
allowed-tools Restrict tool access Inherits from conversation
model Override model Inherits from conversation
disable-model-invocation Prevent auto-invocation false

Creation Process

  1. Identify the workflow - What repetitive task needs automation?
  2. Choose scope - Project-specific or personal?
  3. Design the prompt - Keep it focused on one task
  4. Add variables - Use $ARGUMENTS for flexibility
  5. Set frontmatter - Add description and hints
  6. Test and iterate - Refine based on usage

When to Use Slash Commands vs Skills

Use slash commands for:

  • Quick, single-file prompts
  • Frequent manual invocations
  • Simple templates and reminders
  • Team workflows in version control

Use Skills instead for:

  • Multi-file resources (scripts, references, assets)
  • Complex workflows with validation
  • Capabilities Claude should auto-discover
  • Detailed procedural knowledge

Best Practices

  1. Meaningful names - /review-pr not /rp
  2. Clear descriptions - Help discoverability in /help
  3. Single responsibility - One task per command
  4. Use argument hints - Guide users on expected input
  5. Version control - Check into git for team sharing
  6. Abstract patterns - Make commands reusable across scenarios

References

Consult these resources when creating slash commands:

  • [examples.md](references/examples.md) - Read when you need complete working examples or want to show the user reference implementations. Covers git workflows, code review, documentation, testing, scaffolding, and utilities.
  • [patterns.md](references/patterns.md) - Read when implementing specific features: variable handling, file inclusion (@path), bash execution (` !cmd `), tool restrictions, multi-step workflows, or output formatting.
  • [template.md](references/template.md) - Starting template for new commands. Copy and customize the structure.