Agent skill

creating-commands

Creates new Claude Code slash commands following best practices. Guides through command structure, naming, arguments, and frontmatter. Use when user wants to create a command, build a slash command, or asks about command best practices.

Stars 232
Forks 15

Install this agent skill to your Project

npx add-skill https://github.com/aiskillstore/marketplace/tree/main/skills/brendanshields/creating-commands

SKILL.md

Creating Commands

Guides creation of Claude Code slash commands using documented best practices.

Quick Start

For a new command:

  1. Ask user for command purpose and arguments needed
  2. Generate using appropriate template
  3. Validate against checklist

For reviewing existing command:

  1. Read command file
  2. Check against anti-patterns in reference.md
  3. Report issues with fixes

Workflow: Create New Command

Progress:
- [ ] Gather requirements (purpose, arguments, scope)
- [ ] Choose template (basic, with-args, workflow)
- [ ] Generate command file
- [ ] Validate against checklist

Step 1: Gather Requirements

Ask user with AskUserQuestion:

  • What should this command do? (purpose)
  • Does it need arguments? (none, single, multiple)
  • Project or personal? (scope)

Step 2: Choose Template

Type Template When to Use
Basic templates/basic.md No arguments, simple prompt
With Args templates/with-args.md Single or multiple arguments
Workflow templates/workflow.md Integrates with skills/agents

Step 3: Generate Command

Create in appropriate location:

  • .claude/commands/ - Project commands (git-tracked)
  • ~/.claude/commands/ - Personal commands (your machine only)

Step 4: Validate

Run through checklist before finishing:

Validation Checklist:
- [ ] Name: lowercase with hyphens only
- [ ] Name: descriptive, verb-noun format preferred
- [ ] Description: explains what command does
- [ ] Arguments: documented with argument-hint if used
- [ ] Prompt: clear, actionable instructions
- [ ] Tools: allowed-tools declared if needed

Naming Rules

Format: verb-noun or action (lowercase, hyphens)

  • fix-issue
  • review-pr
  • run-tests
  • optimize

Constraints:

  • Lowercase letters, numbers, hyphens only
  • No spaces or underscores
  • Keep concise (1-3 words)

Command File Format

markdown
---
description: Brief explanation shown in help
allowed-tools:
  - Bash(bash:*)
  - WebSearch
argument-hint: "param_name"
---

Your command prompt here.
Use $ARGUMENTS for all args or $1, $2 for positional.

Argument Syntax

Syntax Usage Example
$ARGUMENTS All arguments as one string /cmd foo barfoo bar
$1, $2 Positional arguments /cmd foo bar$1=foo, $2=bar
@file Include file contents Review @src/main.ts

Frontmatter Options

Field Purpose Required
description Shown in help, enables auto-invoke Recommended
allowed-tools Tools the command can use If using tools
argument-hint Documents expected args If has args
model Specific model to use Optional

Example: Basic Command

markdown
---
description: Run all tests and report failures
allowed-tools:
  - Bash(npm:*)
---

Run the test suite and summarize results:

1. Execute `npm test`
2. If failures, show failing tests with context
3. Suggest fixes for common issues

See reference.md for detailed best practices and anti-patterns.

Expand your agent's capabilities with these related and highly-rated skills.

aiskillstore/marketplace

perigon-backend

Perigon ASP.NET Core + EF Core + Aspire conventions

232 15
Explore
aiskillstore/marketplace

perigon-agent

Pointers for Copilot/agents to apply Perigon conventions

232 15
Explore
aiskillstore/marketplace

perigon-angular

Angular 21+ standalone/Material/signal conventions for Perigon WebApp

232 15
Explore
aiskillstore/marketplace

fastapi-mastery

Comprehensive FastAPI development skill covering REST API creation, routing, request/response handling, validation, authentication, database integration, middleware, and deployment. Use when working with FastAPI projects, building APIs, implementing CRUD operations, setting up authentication/authorization, integrating databases (SQL/NoSQL), adding middleware, handling WebSockets, or deploying FastAPI applications. Triggered by requests involving .py files with FastAPI code, API endpoint creation, Pydantic models, or FastAPI-specific features.

232 15
Explore
aiskillstore/marketplace

context7-efficient

Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.

232 15
Explore
aiskillstore/marketplace

browser-use

Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use when tasks require web browsing, form submission, web scraping, UI testing, or any browser interaction.

232 15
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results