create-command

Create custom Claude Code slash commands with arguments and frontmatter metadata.

20|1|Updated Sep 30, 2025
One-click install
npx skills add https://github.com/ronnycoding/.claude --skill create-command
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-command
Source: https://github.com/ronnycoding/.claude/tree/main/skills/create-command
Command: npx skills add https://github.com/ronnycoding/.claude --skill create-command

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the need to repeatedly type long or complex prompts by allowing you to create custom slash commands, automating frequently used interactions with Claude Code.

Core Features & Use Cases

  • Reusable Prompts: Store and trigger complex prompts with a simple /command-name syntax.
  • Argument Handling: Pass dynamic inputs to your commands using $1, $2, or $ARGUMENTS.
  • Contextual Integration: Include file contents (@file.js) or execute bash commands (!git status) directly within your prompts.
  • Use Case: Create a /review-pr command that takes a PR number and priority, then automatically fetches PR details and diffs from GitHub, providing a structured prompt for Claude to review, saving you manual context gathering.

Quick Start

Create a new personal slash command named explain that takes $ARGUMENTS and uses it to explain code in simple terms.

Frequently Asked Questions about create-command

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom slash commands in Claude Code?

Create custom slash commands by storing reusable prompts in `.claude/commands/` (project-level) or `~/.claude/commands/` (personal) directories. Each command is a file with frontmatter metadata and prompt content, invoked with `/command-name` syntax to automate frequently used interactions.

Can I pass arguments to custom commands?

Yes, custom commands support three argument-handling options: no arguments, all arguments captured via `$ARGUMENTS`, and positional arguments using `$1`, `$2`, `$3` placeholders to pass dynamic inputs when triggering the command.

What metadata can I include in command frontmatter?

Command frontmatter supports description, allowed-tools, model, and disable-model-invocation fields to control command behavior, tool access, model selection, and invocation settings within your custom slash commands.

How do I include file content or bash output in a command?

Embed file references using `@file.js` syntax to include file contents, or execute bash commands using `!git status` syntax to capture command output directly within your prompt, automating context gathering.

Can I organize commands at both project and personal levels?

Yes, commands stored in `.claude/commands/` apply to a specific project, while commands in `~/.claude/commands/` are available across all projects, letting you organize reusable prompts by scope and accessibility.

What's the difference between storing commands locally versus project-wide?

Project-level commands (`.claude/commands/`) are shared with team members through version control and scoped to that project, while personal commands (`~/.claude/commands/`) are private to your machine and accessible across all projects.