command-creator

Guide for creating custom Claude Code slash commands. Use when user wants to create a new command (or update an existing command) that provides a reusable prompt snippet, workflow, or automation. Triggers on requests to create /commands, slash commands, custom commands, or when user wants to define frequently-used prompts as reusable commands.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "command-creator" with this command: npx skills add walletconnect/skills/walletconnect-skills-command-creator

Command Creator

Create custom slash commands for Claude Code. Commands are Markdown files that define reusable prompts with support for arguments, bash execution, file references, and tool permissions.

Command Locations

TypeLocationScope
Project.claude/commands/Shared with team via git
Personal~/.claude/commands/Available across all projects

Project commands take precedence over personal commands with the same name.

Basic Structure

---
description: Brief description shown in /help
---

Your prompt instructions here.

Filename becomes the command name: review.md/review

Frontmatter Options

FieldPurposeDefault
descriptionBrief description for /helpFirst line of prompt
allowed-toolsTools the command can useInherits from conversation
argument-hintShows usage hint in autocompleteNone
modelSpecific model to useInherits from conversation
disable-model-invocationPrevent Skill tool from calling thisfalse
hooksCommand-scoped hooks (PreToolUse, PostToolUse, Stop)None

Arguments

All arguments: $ARGUMENTS

---
description: Fix an issue
---
Fix issue #$ARGUMENTS following our coding standards

Usage: /fix-issue 123 high-priority$ARGUMENTS = "123 high-priority"

Positional: $1, $2, etc.

---
argument-hint: [pr-number] [priority] [assignee]
description: Review pull request
---
Review PR #$1 with priority $2 and assign to $3.

Usage: /review-pr 456 high alice

Bash Execution

Execute bash before the command runs using the exclamation mark prefix. Output is included in context.

---
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
description: Create a git commit
---

## Context
- Current git status: !\`git status\`
- Current git diff: !\`git diff HEAD\`
- Current branch: !\`git branch --show-current\`
- Recent commits: !\`git log --oneline -10\`

## Task
Create a git commit based on the above changes.

Required: Include allowed-tools with the Bash tool when using bang execution (the exclamation mark prefix).

File References

Include file contents using the @ prefix:

Review the implementation in @src/utils/helpers.js
Compare @src/old-version.js with @src/new-version.js

Namespacing

Subdirectories group related commands. The subdirectory appears in the description:

  • .claude/commands/frontend/component.md/component (project:frontend)
  • .claude/commands/backend/test.md/test (project:backend)

Commands in different subdirectories can share names.

Example: Complete Command

---
allowed-tools: Bash(npm:*), Bash(git:*), Read, Edit, Write
argument-hint: [component-name]
description: Create a new React component with tests
model: claude-sonnet-4-20250514
---

## Context
- Existing components: !\`ls src/components/\`
- Project structure: !\`ls -la src/\`

## Task
Create a new React component named $1:
1. Create component file at @src/components/$1.tsx
2. Create test file at @src/components/$1.test.tsx
3. Export from @src/components/index.ts
4. Follow patterns in existing components

Hooks in Commands

Define command-scoped hooks that run during execution:

---
description: Deploy with validation
hooks:
  PreToolUse:
    - matcher: "Bash"
      hooks:
        - type: command
          command: "./scripts/validate.sh"
          once: true
---

Deploy to staging environment.

The once: true option runs the hook only once per session.

Best Practices

  1. Keep prompts concise - Claude is smart; don't over-explain
  2. Use bash execution for context - Gather relevant state before the task
  3. Specify allowed-tools - Limit to what the command needs
  4. Add argument-hint - Help users understand expected arguments
  5. Use file references - Point to relevant files with @
  6. Namespace related commands - Use subdirectories for organization

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

skill-writing

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

code-review

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

code-simplifier

No summary provided by upstream source.

Repository SourceNeeds Review
command-creator | V50.AI