Home / Market / command development

command development

This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.

skill★ 490198359 dlskills.shApache-2.0Install in CosmosUpstream Source

Documentation & Preview

Command Development Skill

Comprehensive guidance on creating Claude Code slash commands, including file format, frontmatter options, dynamic arguments, and best practices.

Overview

This skill provides knowledge about:

Skill Structure

SKILL.md (~2,470 words)

Core skill content covering:

Fundamentals:

Plugin-Specific:

References

Detailed documentation:

Examples

Practical command examples:

When This Skill Triggers

Claude Code activates this skill when users:

Progressive Disclosure

The skill uses progressive disclosure:

  1. SKILL.md (~2,470 words): Core concepts, common patterns, and plugin features overview
  2. References (~13,500 words total): Detailed specifications
  1. Examples (~6,000 words total): Complete working command examples

Claude loads references and examples as needed based on task.

Command Basics Quick Reference

File Format

---
description: Brief description
argument-hint: [arg1] [arg2]
allowed-tools: Read, Bash(git:*)
---

Command prompt content with:
- Arguments: $1, $2, or $ARGUMENTS
- Files: @path/to/file
- Bash: !`command here`

Locations

Key Features

Dynamic arguments:

File references:

Bash execution:

Frontmatter Fields Quick Reference

| Field | Purpose | Example | |-------|---------|---------| | description | Brief description for /help | "Review code for issues" | | allowed-tools | Restrict tool access | Read, Bash(git:*) | | model | Specify model | sonnet, opus, haiku | | argument-hint | Document arguments | [pr-number] [priority] | | disable-model-invocation | Manual-only command | true |

Common Patterns

Simple Review Command

---
description: Review code for issues
---

Review this code for quality and potential bugs.

Command with Arguments

---
description: Deploy to environment
argument-hint: [environment] [version]
---

Deploy to $1 environment using version $2

Command with File Reference

---
description: Document file
argument-hint: [file-path]
---

Generate documentation for @$1

Command with Bash Execution

---
description: Show Git status
allowed-tools: Bash(git:*)
---

Current status: !`git status`
Recent commits: !`git log --oneline -5`

Development Workflow

  1. Design command:
  1. Create file:
  1. Add frontmatter:
  1. Test command:
  1. Refine:

Best Practices Summary

  1. Single responsibility: One command, one clear purpose
  2. Clear descriptions: Make discoverable in /help
  3. Document arguments: Always use argument-hint
  4. Minimal tools: Use most restrictive allowed-tools
  5. Test thoroughly: Verify all features work
  6. Add comments: Explain complex logic
  7. Handle errors: Consider missing arguments/files

Status

Completed enhancements:

Remaining enhancements (in progress):

Maintenance

To update this skill:

  1. Keep SKILL.md focused on core fundamentals
  2. Move detailed specifications to references/
  3. Add new examples/ for different use cases
  4. Update frontmatter when new fields added
  5. Ensure imperative/infinitive form throughout
  6. Test examples work with current Claude Code

Version History

v0.1.0 (2025-01-15):