Command Patterns
Agent Buildingcommand-patternsCommand Patterns is an Agent Skill for agent building published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Advanced patterns for generating high-quality Claude Code commands. Used by /new-command.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/data/command-patterns/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/command-patterns, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Command Patterns Skill
Expert patterns for generating production-quality Claude Code commands.
Core Requirements
-
Multiple Action Modes - Never single-purpose commands
analyze- Deep analysisoptimize- Performance improvementsfix- Automated remediationmonitor- Continuous watching
-
Real, Working Code - Every example must be executable
-
Intelligent Recommendations - Prioritized, actionable insights
-
Interactive Intelligence - Guide users to optimal solutions
-
Visual Outputs - Include diagrams/charts when helpful
Advanced Patterns
Progressive Disclosure
# Simple for beginners
claude /your-command
# Power user with full control
claude /your-command analyze --depth=comprehensive --output=json
Safe Automation with Rollbacks
apply_change() {
# Snapshot current state
kubectl get deployment $1 -o yaml > "/tmp/rollback-$$.yaml"
# Apply change
kubectl patch deployment $1 --patch "$2"
# Monitor and rollback if needed
if ! monitor_health $1 60; then
kubectl apply -f "/tmp/rollback-$$.yaml"
fi
}
Quality Checklist
Intelligence
- Recognizes patterns from past executions
- Provides insights humans would miss
- Explains reasoning behind recommendations
User Experience
- Works with zero configuration
- Provides meaningful progress indicators
- Offers escape hatches at every step
Safety
- Every change has a rollback
- Dry-run mode available
- Confirms destructive operations
Integration
- Outputs in multiple formats
- Works in CI/CD pipelines
- Provides hooks for customization
Frontmatter Template
---
description: Brief description # REQUIRED
model: haiku # OPTIONAL - use full ID
allowed-tools: Bash, Read # OPTIONAL
argument-hint: "[action]" # OPTIONAL
---
The Ultimate Test
"Would a senior engineer with 10 years experience be impressed?"
If not emphatic YES, keep improving.