claude-code-slash-commands
This skill should be used when the user asks to "create a command", "write a slash command", "build a plugin command", or wants to add custom commands to Claude Code.
Best use case
claude-code-slash-commands is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
This skill should be used when the user asks to "create a command", "write a slash command", "build a plugin command", or wants to add custom commands to Claude Code.
Teams using claude-code-slash-commands should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/claude-code-slash-commands/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How claude-code-slash-commands Compares
| Feature / Agent | claude-code-slash-commands | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
This skill should be used when the user asks to "create a command", "write a slash command", "build a plugin command", or wants to add custom commands to Claude Code.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Slash Command Development Create custom slash commands for Claude Code. ## Quick Reference You MUST read these references for detailed guidance: - [Official Documentation](./references/official-docs.md) - Anthropic's slash command guide ## Command Structure Commands are Markdown files in specific locations: | Scope | Location | Description suffix | |-------|----------|-------------------| | Project | `.claude/commands/` | `(project)` | | Personal | `~/.claude/commands/` | `(user)` | | Plugin | `commands/` in plugin root | `(plugin)` | ## Basic Command ```markdown --- description: Brief description of what this command does --- Your prompt instructions here. ``` ## Frontmatter Options ```yaml --- allowed-tools: Bash(git:*), Read argument-hint: [filename] [options] description: What this command does model: claude-3-5-haiku-20241022 disable-model-invocation: false context: fork --- ``` | Field | Purpose | |-------|---------| | `allowed-tools` | Tools the command can use | | `argument-hint` | Shows in autocomplete (e.g., `[message]`) | | `description` | Brief description (required for SlashCommand tool) | | `model` | Specific model to use | | `disable-model-invocation` | Prevent programmatic invocation | | `context: fork` | Run in isolated sub-agent context, preventing side effects on main agent state | ## Arguments **All arguments:** ```markdown Fix issue #$ARGUMENTS following our coding standards ``` **Positional arguments:** ```markdown Review PR #$1 with priority $2 and assign to $3 ``` ## Dynamic Content <!-- NOTE: Avoid isolated special chars in backticks due to bug #12762 --> <!-- See: https://github.com/anthropics/claude-code/issues/12762 --> **Bash execution** (prefix with exclamation mark): ```text Current branch: EXCLAMATION`git branch --show-current` Recent commits: EXCLAMATION`git log --oneline -5` ``` Replace EXCLAMATION with the exclamation mark character - workaround for [bug #12762](https://github.com/anthropics/claude-code/issues/12762). **File references** (prefix with at-sign): ```markdown Review the implementation in @src/utils/helpers.js ``` ## Namespacing Subdirectories group related commands: - `.claude/commands/frontend/test.md` → `/test` shows `(project:frontend)` - `.claude/commands/backend/test.md` → `/test` shows `(project:backend)` ## Checklist - [ ] Description filled in frontmatter - [ ] `argument-hint` if command takes arguments - [ ] `allowed-tools` if using Bash or specific tools - [ ] Test with `/command-name --help` style invocation
Related Skills
developing-claude-code-plugins
Build, test, and distribute Claude Code plugins with slash commands, agents, skills, hooks, MCP servers, and LSP servers. MUST be loaded when creating, reviewing, debugging, or distributing plugins. Use PROACTIVELY when user mentions plugins, extensions, marketplaces, or wants to add custom commands/agents to Claude Code.
claude-skill-creator
Guide for creating effective Claude Code skills with proper YAML frontmatter, directory structure, and best practices. Use when creating new skills, updating existing skills, or learning about skill development.
claude-settings-audit
Analyze a repository to generate recommended Claude Code settings.json permissions. Use when setting up a new project, auditing existing settings, or determining which read-only bash commands to allow. Detects tech stack, build tools, and monorepo structure.
claude-plan
Anthropic 風格的專業計畫管理 Skill - 自然語言驅動、預設並行、全自動 GitHub 整合
claude-md-editor
Edit and maintain CLAUDE.md and project documentation files. Use when modifying documentation, asking about best practices, or performing documentation maintenance tasks.
claude-improve-config
Self-reflect on the current session to identify mistakes and propose improvements to .claude configuration (CLAUDE.md, hooks, skills).
claude-hooks-reference-2026
Complete reference for Claude Code hooks system (January 2026). Use when creating hooks, understanding hook events, matchers, exit codes, JSON output control, environment variables, plugin hooks, or implementing hook scripts.
claude-ecosystem
Claude Code ecosystem expertise. Modules: CLI tool (setup, slash commands, MCP servers, hooks, plugins, CI/CD), extensibility (agents, skills, output styles creation), CLAUDE.md (project instructions, optimization). Actions: configure, troubleshoot, create, deploy, integrate, optimize Claude Code. Keywords: Claude Code, Anthropic, CLI tool, slash command, MCP server, Agent Skill, hook, plugin, CI/CD, enterprise, CLAUDE.md, agentic coding, agent, skill, output-style, SKILL.md, subagent, Task tool, project instructions, token optimization. Use when: learning Claude Code features, configuring settings, creating skills/agents/hooks, setting up MCP servers, troubleshooting issues, CI/CD integration, initializing or optimizing CLAUDE.md files.
claude-code
Claude Code CLI and development environment. Use for Claude Code features, tools, workflows, MCP integration, configuration, and AI-assisted development.
claude-code-meta
Build Claude Code extensions - skills, agents, hooks, plugins, marketplaces, slash commands. Use when creating Claude Code components, building new skills, writing agents, creating hooks, making plugins, setting up marketplaces, writing slash commands, fixing extension configurations, or troubleshooting Claude Code extensions. Includes builder agents for autonomous creation. Not for looking up docs - use claude-code-docs-reference for that.
claude-code-analyzer
Analyzes Claude Code usage patterns and provides comprehensive recommendations. Runs usage analysis, discovers GitHub community resources, suggests CLAUDE.md improvements, and fetches latest docs on-demand. Use when user wants to optimize their Claude Code workflow, create configurations (agents/skills/commands), or set up project documentation.
agentsmd-claudemd-generator
Generate AGENTS.md and CLAUDE.md files for a repository. AGENTS.md provides cross-tool agent instructions (supported by Claude Code, Cursor, Windsurf, Zed, Codex, and others). CLAUDE.md adds Claude-specific configuration and references AGENTS.md via @import. Use when a repo needs agent onboarding or when starting a new project.