Building Commands Skill You are an expert at creating Claude Code slash commands. Slash commands are user-triggered workflows that provide parameterized, action-oriented functionality. When to Create a Command vs Other Components Use a COMMAND when: - The user explicitly triggers a specific workflow - You need parameterized inputs via arguments - The action is discrete and well-defined - Users need a simple way to invoke complex operations Use a SKILL instead when: - You want automatic, context-aware assistance - The functionality should be "always on" Use an AGENT instead when: - You need de…

, command_name):\n errors.append(f\"Invalid filename '{command_name}.md': must be lowercase letters, numbers, and hyphens only\")\n\n if '_' in command_name:\n errors.append(f\"Invalid filename '{command_name}.md': underscores not allowed, use hyphens instead\")\n\n # Check if name is action-oriented (starts with verb)\n common_verbs = [\n 'add', 'build', 'check', 'clean', 'commit', 'create', 'delete', 'deploy',\n 'generate', 'get', 'install', 'list', 'make', 'push', 'remove', 'review',\n 'run', 'search', 'show', 'test', 'update', 'validate'\n ]\n if not any(command_name.startswith(verb) for verb in common_verbs):\n errors.append(f\"Recommendation: Command names are typically action-oriented (start with a verb): '{command_name}' → consider 'run-{command_name}', 'create-{command_name}', etc.\")\n\n # Read file\n try:\n content = path.read_text(encoding='utf-8')\n except Exception as e:\n return False, [f\"Failed to read file: {e}\"]\n\n # Check for YAML frontmatter\n frontmatter_pattern = r'^---\\s*\\n(.*?)\\n---\\s*\\n'\n match = re.match(frontmatter_pattern, content, re.DOTALL)\n\n if not match:\n errors.append(\"Missing YAML frontmatter (must start with --- and end with ---)\")\n return False, errors\n\n frontmatter_text = match.group(1)\n\n # Parse YAML\n try:\n frontmatter = yaml.safe_load(frontmatter_text)\n except yaml.YAMLError as e:\n errors.append(f\"Invalid YAML syntax: {e}\")\n return False, errors\n\n # Check for recommended fields\n if 'description' not in frontmatter:\n errors.append(\"Recommendation: Add 'description' field to help users understand what the command does\")\n else:\n description = frontmatter['description']\n if len(description) \u003c 10:\n errors.append(f\"Warning: Description is very short ({len(description)} chars)\")\n\n # Validate optional fields\n if 'allowed-tools' in frontmatter:\n tools = frontmatter['allowed-tools']\n valid_tools = [\n 'Read', 'Write', 'Edit', 'Grep', 'Glob', 'Bash',\n 'WebFetch', 'WebSearch', 'NotebookEdit', 'Task',\n 'TodoWrite', 'BashOutput', 'KillShell'\n ]\n\n if isinstance(tools, str):\n tool_list = [t.strip() for t in tools.split(',')]\n for tool in tool_list:\n if tool not in valid_tools:\n errors.append(f\"Warning: Unknown tool '{tool}'. Valid tools: {', '.join(valid_tools)}\")\n\n # Validate model field - commands support version aliases and full IDs, not short aliases\n if 'model' in frontmatter:\n model_value = frontmatter['model']\n\n # Check if it's a SHORT alias (these DON'T work in commands)\n if model_value in ['haiku', 'sonnet', 'opus', 'inherit']:\n # Map short aliases to version aliases\n version_alias_map = {\n 'haiku': 'claude-haiku-4-5',\n 'sonnet': 'claude-sonnet-4-5',\n 'opus': 'claude-opus-4-5'\n }\n suggested_version = version_alias_map.get(model_value, 'claude-sonnet-4-5')\n\n errors.append(\n f\"CRITICAL ERROR: Commands cannot use short aliases. \"\n f\"Found: 'model: {model_value}'\\n\\n\"\n f\" 📝 Quick Fix Options:\\n\\n\"\n f\" Option 1 (Recommended): Remove the model field entirely\\n\"\n f\" sed -i '/^model:/d' {file_path}\\n\\n\"\n f\" Option 2: Use version alias instead\\n\"\n f\" sed -i 's/model: {model_value}/model: {suggested_version}/' {file_path}\\n\\n\"\n f\" ℹ️ Why? Commands execute in conversation context and must use explicit\\n\"\n f\" version aliases. Only agents can use short aliases like '{model_value}'.\\n\\n\"\n f\" 📚 See: agent-builder/skills/building-commands/templates/ for examples\"\n )\n # Check if it looks like a valid model ID (basic format check)\n elif not model_value.startswith('claude-'):\n errors.append(\n f\"Warning: Model '{model_value}' doesn't match expected format 'claude-*'. \"\n f\"Ensure this is a valid Anthropic model ID (e.g., 'claude-haiku-4-5' or 'claude-haiku-4-5-20251001').\"\n )\n\n if 'argument-hint' in frontmatter:\n arg_hint = frontmatter['argument-hint']\n\n # Handle both list and string types (YAML parsing can produce either)\n if isinstance(arg_hint, list):\n arg_hint = ' '.join(str(item) for item in arg_hint)\n elif not isinstance(arg_hint, str):\n arg_hint = str(arg_hint)\n\n if not arg_hint.startswith('['):\n errors.append(f\"Warning: argument-hint typically uses brackets: '{arg_hint}' → '[{arg_hint}]'\")\n\n # Check body content\n body = content[match.end():]\n\n # Check for argument usage\n uses_positional = bool(re.search(r'\\$\\d+', body))\n uses_all_args = '$ARGUMENTS' in body\n\n if uses_positional or uses_all_args:\n if 'argument-hint' not in frontmatter:\n errors.append(\"Recommendation: Add 'argument-hint' field since the command uses arguments ($1, $2, or $ARGUMENTS)\")\n\n # Document the arguments in body\n if uses_positional and '## Arguments' not in body:\n errors.append(\"Recommendation: Add an '## Arguments' section to document what each positional argument does\")\n\n # Check for workflow documentation\n if '## Workflow' not in body and '## Steps' not in body:\n errors.append(\"Recommendation: Add a workflow section to document the command's execution steps\")\n\n # Check for examples\n if '## Example' not in body and '## Usage' not in body:\n errors.append(\"Recommendation: Add usage examples showing how to invoke the command\")\n\n # Security checks\n if 'Bash' in frontmatter.get('allowed-tools', ''):\n # Check for dangerous patterns\n dangerous_patterns = [\n (r'\\$\\w+\\s*(?:&&|\\||;|`)', \"Potential command injection risk with unsanitized arguments\"),\n (r'rm\\s+-rf\\s+\\

Building Commands Skill You are an expert at creating Claude Code slash commands. Slash commands are user-triggered workflows that provide parameterized, action-oriented functionality. When to Create a Command vs Other Components Use a COMMAND when: - The user explicitly triggers a specific workflow - You need parameterized inputs via arguments - The action is discrete and well-defined - Users need a simple way to invoke complex operations Use a SKILL instead when: - You want automatic, context-aware assistance - The functionality should be "always on" Use an AGENT instead when: - You need de…

, \"Dangerous rm -rf with variable - add validation\"),\n (r'eval\\s+\\

Building Commands Skill You are an expert at creating Claude Code slash commands. Slash commands are user-triggered workflows that provide parameterized, action-oriented functionality. When to Create a Command vs Other Components Use a COMMAND when: - The user explicitly triggers a specific workflow - You need parameterized inputs via arguments - The action is discrete and well-defined - Users need a simple way to invoke complex operations Use a SKILL instead when: - You want automatic, context-aware assistance - The functionality should be "always on" Use an AGENT instead when: - You need de…

, \"Using eval with arguments is dangerous\"),\n ]\n\n for pattern, warning in dangerous_patterns:\n if re.search(pattern, body):\n # Note: This often matches markdown backticks around $ARGUMENTS, not actual injection\n # Treat as recommendation rather than critical error since these are templates for Claude\n errors.append(f\"Recommendation: {warning} (review if $variables are used in actual bash blocks)\")\n\n return len([e for e in errors if not (e.startswith('Warning:') or e.startswith('Recommendation:'))]) == 0, errors\n\n\ndef main():\n if len(sys.argv) \u003c 2:\n print(\"Usage: validate-command.py \u003ccommand-file.md>\")\n sys.exit(1)\n\n command_file = sys.argv[1]\n is_valid, errors = validate_command(command_file)\n\n if is_valid and not errors:\n print(f\"✓ Command '{command_file}' is valid!\")\n sys.exit(0)\n else:\n print(f\"Validation results for '{command_file}':\\n\")\n\n critical_errors = []\n warnings = []\n recommendations = []\n\n for error in errors:\n if error.startswith(\"Security Warning:\"):\n critical_errors.append(error)\n elif error.startswith(\"Warning:\"):\n warnings.append(error)\n elif error.startswith(\"Recommendation:\"):\n recommendations.append(error)\n else:\n critical_errors.append(error)\n\n if critical_errors:\n print(\"❌ Critical Errors:\")\n for error in critical_errors:\n print(f\" {error}\")\n print()\n\n if warnings:\n print(\"⚠️ Warnings:\")\n for warning in warnings:\n print(f\" {warning}\")\n print()\n\n if recommendations:\n print(\"💡 Recommendations:\")\n for rec in recommendations:\n print(f\" {rec}\")\n print()\n\n sys.exit(1 if critical_errors else 0)\n\n\nif __name__ == '__main__':\n main()\n","content_type":"text/x-python; charset=utf-8","language":"python","size":9030,"content_sha256":"49a092522885176e51f8d5036b82551a52dffbdb6cc8c92736e18583790b482e"},{"filename":"skill-report.json","content":"{\n \"schema_version\": \"2.0\",\n \"meta\": {\n \"generated_at\": \"2026-01-16T19:43:37.249Z\",\n \"slug\": \"c0ntr0lledcha0s-building-commands\",\n \"source_url\": \"https://github.com/C0ntr0lledCha0s/claude-code-plugin-automations/tree/main/agent-builder/skills/building-commands\",\n \"source_ref\": \"main\",\n \"model\": \"claude\",\n \"analysis_version\": \"3.0.0\",\n \"source_type\": \"community\",\n \"content_hash\": \"46177be3744e30ed1b7a49087061c2726c70e9635bbd7d136275c2173e0a7c64\",\n \"tree_hash\": \"6a63cd5494ffbdd93a2a3e1fe50115f7dc0f931cea20e3f37561ab21f2a0feb2\"\n },\n \"skill\": {\n \"name\": \"building-commands\",\n \"description\": \"Expert at creating and modifying Claude Code slash commands. Auto-invokes when the user wants to create, update, modify, enhance, validate, or standardize slash commands, or when modifying command YAML frontmatter fields (especially 'model', 'allowed-tools', 'description'), needs help designing command workflows, or wants to understand command arguments and parameters. Also auto-invokes proactively when Claude is about to write command files (*/commands/*.md), or implement tasks that involve creating slash command components.\",\n \"summary\": \"Expert at creating and modifying Claude Code slash commands. Auto-invokes when the user wants to cre...\",\n \"icon\": \"⚡\",\n \"version\": \"2.0.0\",\n \"author\": \"C0ntr0lledCha0s\",\n \"license\": \"MIT\",\n \"category\": \"coding\",\n \"tags\": [\n \"slash-commands\",\n \"command-builder\",\n \"claude-code\",\n \"validation\"\n ],\n \"supported_tools\": [\n \"claude\",\n \"claude-code\"\n ],\n \"risk_factors\": [\n \"scripts\",\n \"filesystem\"\n ]\n },\n \"security_audit\": {\n \"risk_level\": \"low\",\n \"is_blocked\": false,\n \"safe_to_publish\": true,\n \"summary\": \"Documentation and validation skill with no code execution capabilities. The included Python validation script reads and validates command files using only Python standard library functions. The static scanner flagged 548 patterns in documentation markdown files as potential threats, but all are false positives - code examples in documentation were misinterpreted as executable code with vulnerabilities. The skill contains no network calls, no external command execution, no credential handling, and no data exfiltration capabilities.\",\n \"risk_factor_evidence\": [\n {\n \"factor\": \"scripts\",\n \"evidence\": [\n {\n \"file\": \"scripts/validate-command.py\",\n \"line_start\": 1,\n \"line_end\": 232\n }\n ]\n },\n {\n \"factor\": \"filesystem\",\n \"evidence\": [\n {\n \"file\": \"scripts/validate-command.py\",\n \"line_start\": 25,\n \"line_end\": 53\n }\n ]\n }\n ],\n \"critical_findings\": [],\n \"high_findings\": [],\n \"medium_findings\": [],\n \"low_findings\": [],\n \"dangerous_patterns\": [],\n \"files_scanned\": 7,\n \"total_lines\": 2883,\n \"audit_model\": \"claude\",\n \"audited_at\": \"2026-01-16T19:43:37.249Z\"\n },\n \"content\": {\n \"user_title\": \"Create slash commands for Claude Code\",\n \"value_statement\": \"Users need a way to create standardized, validated slash commands for their Claude Code workflows. This skill provides expert guidance on command structure, YAML schema, argument handling, and security best practices.\",\n \"seo_keywords\": [\n \"claude code slash commands\",\n \"claude code skill\",\n \"claude command builder\",\n \"claude automation\",\n \"claude code plugin\",\n \"slash command creation\",\n \"command validation\",\n \"claude code commands\"\n ],\n \"actual_capabilities\": [\n \"Creates Claude Code slash commands with proper YAML frontmatter and markdown body\",\n \"Validates command schema including naming conventions, field formats, and tool permissions\",\n \"Provides templates and patterns for common command types (git, testing, scaffolding)\",\n \"Documents security considerations including input validation and path sanitization\",\n \"Offers guidance on argument handling with $1, $2, and $ARGUMENTS variables\",\n \"Includes a validation script to verify commands meet quality standards\"\n ],\n \"limitations\": [\n \"Does not execute the slash commands it creates - only provides documentation and validation\",\n \"Requires Claude Code environment to use the generated commands\",\n \"Security validation is advisory - does not prevent unsafe commands from being written\"\n ],\n \"use_cases\": [\n {\n \"target_user\": \"Plugin developers\",\n \"title\": \"Build plugin commands\",\n \"description\": \"Create standardized slash commands for plugins following marketplace conventions\"\n },\n {\n \"target_user\": \"Team leads\",\n \"title\": \"Standardize team workflows\",\n \"description\": \"Define shared slash commands for common team operations like deployments and testing\"\n },\n {\n \"target_user\": \"DevOps engineers\",\n \"title\": \"Create automation commands\",\n \"description\": \"Build parameterized commands for infrastructure tasks and system maintenance\"\n }\n ],\n \"prompt_templates\": [\n {\n \"title\": \"New command\",\n \"scenario\": \"Creating a basic slash command\",\n \"prompt\": \"Create a slash command called run-tests that runs the test suite. Use the haiku model for fast execution.\"\n },\n {\n \"title\": \"Validation\",\n \"scenario\": \"Validating an existing command\",\n \"prompt\": \"Validate the command at .claude/commands/my-command.md and show any errors.\"\n },\n {\n \"title\": \"Migration\",\n \"scenario\": \"Updating model field format\",\n \"prompt\": \"Migrate my command that uses model: haiku to use the correct version alias format.\"\n },\n {\n \"title\": \"Security hardening\",\n \"scenario\": \"Reviewing command security\",\n \"prompt\": \"Review my command that uses Bash tool and suggest security improvements.\"\n }\n ],\n \"output_examples\": [\n {\n \"input\": \"Create a slash command called create-component that generates React components\",\n \"output\": [\n \"Created: .claude/commands/create-component.md\",\n \"Model: claude-sonnet-4-5 (balanced for code generation)\",\n \"Allowed tools: Read, Write, Grep, Glob\",\n \"Arguments: [component-name]\",\n \"Validation: Passed\"\n ]\n },\n {\n \"input\": \"Validate my git-commit command\",\n \"output\": [\n \"Validation passed\",\n \"Name: git-commit (action-oriented)\",\n \"Description: clear and concise\",\n \"Model: claude-sonnet-4-5 (valid version alias)\",\n \"Tools: Read, Grep, Bash (minimal)\"\n ]\n }\n ],\n \"best_practices\": [\n \"Use version aliases like claude-haiku-4-5 for model field - short aliases cause API errors in commands\",\n \"Start with minimal tool permissions and only add Write, Edit, or Bash when truly necessary\",\n \"Document all arguments with argument-hint field and explain $1, $2, and $ARGUMENTS usage\"\n ],\n \"anti_patterns\": [\n \"Using short model aliases (haiku, sonnet, opus) in commands - they cause model not found errors\",\n \"Including both Write and Edit tools when the command only needs one file operation type\",\n \"Using $ARGUMENTS directly in bash commands without validation - creates command injection risk\"\n ],\n \"faq\": [\n {\n \"question\": \"What models work in slash commands?\",\n \"answer\": \"Commands require version aliases like claude-haiku-4-5 or full IDs like claude-haiku-4-5-20251001. Short aliases only work in agents.\"\n },\n {\n \"question\": \"What is the maximum command name length?\",\n \"answer\": \"Command names must be 64 characters or less, using only lowercase letters, numbers, and hyphens. Underscores are not allowed.\"\n },\n {\n \"question\": \"Can I use this skill for project-level commands?\",\n \"answer\": \"Yes. Commands can be created at project level, user level (~/.claude/commands/), or plugin level.\"\n },\n {\n \"question\": \"Is the validation script safe to run?\",\n \"answer\": \"Yes. The validation script only reads files and reports results. It does not modify files, execute commands, or access the network.\"\n },\n {\n \"question\": \"Why does my command fail with model not found?\",\n \"answer\": \"Commands require version aliases. Change model: haiku to model: claude-haiku-4-5 or remove the model field to inherit from conversation.\"\n },\n {\n \"question\": \"How is this different from building agents?\",\n \"answer\": \"Commands are user-triggered workflows with arguments. Agents are independent subagents. Use commands for discrete actions.\"\n }\n ]\n },\n \"file_structure\": [\n {\n \"name\": \"references\",\n \"type\": \"dir\",\n \"path\": \"references\",\n \"children\": [\n {\n \"name\": \"command-checklist.md\",\n \"type\": \"file\",\n \"path\": \"references/command-checklist.md\",\n \"lines\": 458\n },\n {\n \"name\": \"command-migration-guide.md\",\n \"type\": \"file\",\n \"path\": \"references/command-migration-guide.md\",\n \"lines\": 484\n },\n {\n \"name\": \"command-update-patterns.md\",\n \"type\": \"file\",\n \"path\": \"references/command-update-patterns.md\",\n \"lines\": 671\n }\n ]\n },\n {\n \"name\": \"scripts\",\n \"type\": \"dir\",\n \"path\": \"scripts\",\n \"children\": [\n {\n \"name\": \"validate-command.py\",\n \"type\": \"file\",\n \"path\": \"scripts/validate-command.py\",\n \"lines\": 232\n }\n ]\n },\n {\n \"name\": \"templates\",\n \"type\": \"dir\",\n \"path\": \"templates\",\n \"children\": [\n {\n \"name\": \"command-template.md\",\n \"type\": \"file\",\n \"path\": \"templates/command-template.md\",\n \"lines\": 125\n }\n ]\n },\n {\n \"name\": \"SKILL.md\",\n \"type\": \"file\",\n \"path\": \"SKILL.md\",\n \"lines\": 669\n }\n ]\n}\n","content_type":"application/json; charset=utf-8","language":"json","size":10142,"content_sha256":"2a306bcf0269b3bb887c0fce860561898f9a459eef996681f3ba67e5dc9073d8"},{"filename":"templates/command-template.md","content":"---\ndescription: Brief description of what this command does\nallowed-tools: Read, Grep, Glob, Bash\nargument-hint: \"[arg1] [arg2]\"\n# model: claude-haiku-4-5 # Optional: version alias (recommended) or full ID\n# NOTE: If using model, must be version alias (claude-haiku-4-5) or full ID, NOT short alias (haiku)\n---\n\n# Command Name\n\nBrief description of the command's purpose and what it accomplishes.\n\n## Arguments\n\n- **`$1`**: Description of first argument (e.g., file path, PR number, search term)\n- **`$2`**: Description of second argument (optional)\n- **`$ARGUMENTS`**: Use this to capture all arguments as a single string (for commit messages, etc.)\n\n**Required Arguments**: [List which are required]\n**Optional Arguments**: [List which are optional and their defaults]\n\n## Workflow\n\nWhen this command is invoked with `/command-name arg1 arg2`:\n\n1. **Validate Arguments**: Check that required arguments are provided and valid\n2. **Gather Context**: Read relevant files or fetch necessary information\n3. **Perform Action**: Execute the main command logic\n4. **Report Results**: Provide clear feedback about what was done\n\n## Examples\n\n### Example Usage 1: Basic Usage\n```\n/command-name value1 value2\n```\n\n**What happens:**\n1. Validates value1 and value2\n2. Performs [specific action]\n3. Reports completion status\n\n**Expected output:**\n```\n✅ [Action] completed successfully\n - [Result detail 1]\n - [Result detail 2]\n```\n\n### Example Usage 2: With Quoted Arguments\n```\n/command-name \"argument with spaces\"\n```\n\n**What happens:**\n1. Handles argument with proper quoting\n2. Performs [specific action]\n3. Returns results\n\n### Example Usage 3: Error Case\n```\n/command-name\n```\n\n**What happens:**\n1. Detects missing required argument\n2. Displays error message with usage example\n\n## Error Handling\n\n### Missing Arguments\n```\n❌ Error: Missing required argument [arg1]\n\nUsage: /command-name [arg1] [arg2]\n\nExample: /command-name my-file.txt --option\n```\n\n### Invalid Arguments\n```\n❌ Error: Invalid [arg1]: \"[value]\"\n\nExpected: [description of valid format]\nExample: /command-name valid-value\n```\n\n### Execution Failures\n- If [specific failure condition]: [How to handle]\n- If [another failure]: [Recovery action]\n\n## Important Constraints\n\n### DO:\n- ✅ [What the command should always do]\n- ✅ [What the command should always do]\n- ✅ [What the command should always do]\n\n### DON'T:\n- ❌ [What the command should never do]\n- ❌ [What the command should never do]\n- ❌ [What the command should never do]\n\n## Important Notes\n\n- Note about required setup or context\n- Note about side effects or state changes\n- Note about permissions needed\n\n## Security Considerations\n\n[If this command involves file operations, bash, or sensitive data]\n\n- Validate file paths before operations\n- Sanitize arguments used in bash commands\n- [Other security notes as relevant]\n\n## Maintenance Notes\n\n**Critical Rule**: If using the `model` field, must use version alias (`claude-haiku-4-5`) or full ID (`claude-haiku-4-5-20251001`), NOT short alias (`haiku`). Short aliases cause \"model not found\" errors.\n\n- Templates are starting points - expand with specific details\n- Document all arguments clearly\n- Provide multiple examples covering common and edge cases\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":3250,"content_sha256":"e72d951cc203341c5b76ad957b96fe943054aba6944c65215cd7881414da8340"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Building Commands Skill","type":"text"}]},{"type":"paragraph","content":[{"text":"You are an expert at creating Claude Code slash commands. Slash commands are user-triggered workflows that provide parameterized, action-oriented functionality.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"When to Create a Command vs Other Components","type":"text"}]},{"type":"paragraph","content":[{"text":"Use a COMMAND when:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The user explicitly triggers a specific workflow","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"You need parameterized inputs via arguments","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The action is discrete and well-defined","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Users need a simple way to invoke complex operations","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Use a SKILL instead when:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"You want automatic, context-aware assistance","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The functionality should be \"always on\"","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Use an AGENT instead when:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"You need dedicated context and isolation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The task requires heavy computation","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Command Schema & Structure","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"File Location","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Project-level","type":"text","marks":[{"type":"strong"}]},{"text":": ","type":"text"},{"text":".claude/commands/command-name.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"User-level","type":"text","marks":[{"type":"strong"}]},{"text":": ","type":"text"},{"text":"~/.claude/commands/command-name.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Plugin-level","type":"text","marks":[{"type":"strong"}]},{"text":": ","type":"text"},{"text":"plugin-dir/commands/command-name.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Supports namespacing","type":"text","marks":[{"type":"strong"}]},{"text":": ","type":"text"},{"text":".claude/commands/git/commit.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"/project:git:commit","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"File Format","type":"text"}]},{"type":"paragraph","content":[{"text":"Single Markdown file with YAML frontmatter and Markdown body.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Required Fields","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Brief description of what the command does\n---","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Recommended Fields","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Brief description of what the command does\nallowed-tools: Read, Grep, Glob, Bash\nargument-hint: [parameter-description]\n---","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"All Available Fields","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Brief description of command functionality # Required\nallowed-tools: Read, Write, Edit, Grep, Glob, Bash # Optional: Pre-approved tools\nargument-hint: [filename] [options] # Optional: Parameter guide for users\nmodel: claude-3-5-haiku-20241022 # Optional: Specific model (see warning below)\ndisable-model-invocation: false # Optional: Prevent auto-invocation\n---","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"⚠️ CRITICAL: Model Field - Commands vs Agents","type":"text"}]},{"type":"paragraph","content":[{"text":"Commands support VERSION ALIASES or FULL IDs","type":"text","marks":[{"type":"strong"}]},{"text":" (but NOT short aliases):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Fast operation\nmodel: claude-haiku-4-5 # ✅ Recommended - version alias (auto-updates)\n---","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Stable operation\nmodel: claude-haiku-4-5-20251001 # ✅ Also valid - full ID (locked version)\n---","type":"text"}]},{"type":"paragraph","content":[{"text":"DO NOT use SHORT ALIASES","type":"text","marks":[{"type":"strong"}]},{"text":" in commands (they cause API 404 errors):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"model: haiku # ❌ WRONG - causes \"model not found\" error\nmodel: sonnet # ❌ WRONG - causes \"model not found\" error\nmodel: opus # ❌ WRONG - causes \"model not found\" error","type":"text"}]},{"type":"paragraph","content":[{"text":"Best Practice","type":"text","marks":[{"type":"strong"}]},{"text":": Omit model field to inherit from conversation:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Inherits conversation model automatically\n# No model field - will use whatever model the conversation uses\n---","type":"text"}]},{"type":"paragraph","content":[{"text":"Model Format Options","type":"text","marks":[{"type":"strong"}]},{"text":":","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Short Aliases","type":"text","marks":[{"type":"strong"}]},{"text":" (❌ DON'T WORK in commands):","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"haiku","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"sonnet","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"opus","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Only work in agents","type":"text"}]}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Version Aliases","type":"text","marks":[{"type":"strong"}]},{"text":" (✅ RECOMMENDED for commands):","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"claude-haiku-4-5","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Auto-updates to latest snapshot","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"claude-sonnet-4-5","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Auto-updates to latest snapshot","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"claude-opus-4-1","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Auto-updates to latest snapshot","type":"text"}]}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Full IDs with Dates","type":"text","marks":[{"type":"strong"}]},{"text":" (✅ STABLE for commands):","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"claude-haiku-4-5-20251001","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Locked to specific snapshot","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"claude-sonnet-4-5-20250929","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Locked to specific snapshot","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"claude-opus-4-1-20250805","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Locked to specific snapshot","type":"text"}]}]}]}]}]},{"type":"paragraph","content":[{"text":"Why the Difference?","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agents","type":"text","marks":[{"type":"strong"}]},{"text":": Claude Code translates short aliases (","type":"text"},{"text":"haiku","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"claude-haiku-4-5-20251001","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Commands","type":"text","marks":[{"type":"strong"}]},{"text":": Passed directly to API (only recognizes ","type":"text"},{"text":"claude-*","type":"text","marks":[{"type":"code_inline"}]},{"text":" format)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Result","type":"text","marks":[{"type":"strong"}]},{"text":": Short aliases work in agents, fail in commands","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"When to Specify Model","type":"text","marks":[{"type":"strong"}]},{"text":":","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ Performance-critical fast operations (use haiku for speed)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ Complex reasoning requiring specific capabilities (use opus)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ Stable behavior needed (use full ID with date)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"❌ Most cases (inheritance is better - more flexible)","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Recommendation","type":"text","marks":[{"type":"strong"}]},{"text":":","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"General use","type":"text","marks":[{"type":"strong"}]},{"text":": Omit model field (inherit from conversation)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Need speed","type":"text","marks":[{"type":"strong"}]},{"text":": Use ","type":"text"},{"text":"claude-haiku-4-5","type":"text","marks":[{"type":"code_inline"}]},{"text":" (version alias)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Need stability","type":"text","marks":[{"type":"strong"}]},{"text":": Use full ID with date","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Finding Current Model IDs","type":"text","marks":[{"type":"strong"}]},{"text":": Check ","type":"text"},{"text":"Anthropic's model documentation","type":"text","marks":[{"type":"link","attrs":{"href":"https://docs.anthropic.com/claude/docs/models-overview","title":null}}]},{"text":" for current versions.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Disable Model Invocation","type":"text"}]},{"type":"paragraph","content":[{"text":"The ","type":"text"},{"text":"disable-model-invocation","type":"text","marks":[{"type":"code_inline"}]},{"text":" field prevents Claude from autonomously triggering the command via the SlashCommand tool.","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Delete all test data from database\ndisable-model-invocation: true # ✅ Prevents accidental invocation by Claude\nallowed-tools: Bash\n---","type":"text"}]},{"type":"paragraph","content":[{"text":"When to Use","type":"text","marks":[{"type":"strong"}]},{"text":":","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ Destructive operations (delete, drop, remove)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ Commands requiring explicit user confirmation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ Testing/debugging commands","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"✅ Manual-only workflows","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"❌ Normal automation-friendly commands","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Effect","type":"text","marks":[{"type":"strong"}]},{"text":": Command still appears in ","type":"text"},{"text":"/help","type":"text","marks":[{"type":"code_inline"}]},{"text":" and can be manually invoked by users, but Claude won't suggest or execute it automatically.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Naming Conventions","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Lowercase letters, numbers, and hyphens only","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"No underscores or special characters","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Action-oriented","type":"text","marks":[{"type":"strong"}]},{"text":": Use verbs (","type":"text"},{"text":"review-pr","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"run-tests","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"deploy-app","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Descriptive","type":"text","marks":[{"type":"strong"}]},{"text":": Name should indicate what the command does","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Namespacing","type":"text","marks":[{"type":"strong"}]},{"text":": Use directories for organization (","type":"text"},{"text":"git/commit","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"test/run","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Command Body Content","type":"text"}]},{"type":"paragraph","content":[{"text":"The Markdown body contains instructions for Claude to execute when the command is invoked.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Command Variables","type":"text"}]},{"type":"paragraph","content":[{"text":"Commands support special variables for arguments:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"$1","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":", ","type":"text","marks":[{"type":"strong"}]},{"text":"$2","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":", ","type":"text","marks":[{"type":"strong"}]},{"text":"$3","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":", etc.","type":"text","marks":[{"type":"strong"}]},{"text":": Positional arguments","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"$ARGUMENTS","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":": All arguments as a single string","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Template Structure","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"---\ndescription: One-line description of what this command does\nallowed-tools: Read, Grep, Bash\nargument-hint: [arg1] [arg2]\n---\n\n# Command Name\n\n[Brief description of the command's purpose]\n\n## Arguments\n\n- `$1`: Description of first argument\n- `$2`: Description of second argument\n- Or use `$ARGUMENTS` for all arguments\n\n## Workflow\n\nWhen this command is invoked:\n\n1. **Step 1**: Action to perform\n2. **Step 2**: Action to perform\n3. **Step 3**: Action to perform\n\n## Examples\n\n### Example Usage: /command-name value1 value2\nExpected behavior:\n1. [What happens]\n2. [What happens]\n3. [Result]\n\n## Important Notes\n\n- Note about usage or constraints\n- Note about required context or setup","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Creating a Command","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 1: Gather Requirements","type":"text"}]},{"type":"paragraph","content":[{"text":"Ask the user:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"What action should the command perform?","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"What arguments does it need?","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"What tools are required?","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Should it work with specific file types or contexts?","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 2: Design the Command","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Choose an action-oriented name (lowercase-hyphens)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Write a clear description for the help system","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Define argument structure","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Select necessary tools","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Plan the workflow","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 3: Write the Command File","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use proper YAML frontmatter","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Document arguments clearly","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Provide step-by-step workflow","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Include usage examples","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Add important notes","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 4: Validate the Command","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check naming convention","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Verify YAML syntax","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Test argument handling","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Review tool permissions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Ensure description is clear","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 5: Test the Command","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Place in ","type":"text"},{"text":".claude/commands/","type":"text","marks":[{"type":"code_inline"}]},{"text":" directory","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Invoke with arguments: ","type":"text"},{"text":"/command-name arg1 arg2","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Verify behavior matches expectations","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Test edge cases","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Iterate based on results","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Validation Script","type":"text"}]},{"type":"paragraph","content":[{"text":"This skill includes a validation script:","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"validate-command.py - Schema Validator","type":"text"}]},{"type":"paragraph","content":[{"text":"Python script for validating command files.","type":"text"}]},{"type":"paragraph","content":[{"text":"Usage:","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 {baseDir}/scripts/validate-command.py \u003ccommand-file.md>","type":"text"}]},{"type":"paragraph","content":[{"text":"What It Checks:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Filename format (lowercase-hyphens)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Required fields (description)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Model field format (CRITICAL: must use version aliases, not short aliases)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Tool names validity","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Argument handling documentation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Security patterns","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Returns:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Exit code 0 if valid","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Exit code 1 with error messages if invalid","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Example:","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 validate-command.py .claude/commands/run-tests.md\n\n✅ Command validation passed\n Name: run-tests\n Description: Runs test suite and reports results\n Allowed tools: Read, Grep, Bash\n Model: claude-haiku-4-5 (valid version alias)","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Argument Handling Patterns","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Pattern 1: Single Argument","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"argument-hint: [filename]","type":"text"}]},{"type":"paragraph","content":[{"text":"Body:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"Process the file: $1","type":"text"}]},{"type":"paragraph","content":[{"text":"Usage: ","type":"text"},{"text":"/process-file data.csv","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Pattern 2: Multiple Arguments","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"argument-hint: [source] [destination]","type":"text"}]},{"type":"paragraph","content":[{"text":"Body:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"Copy from $1 to $2","type":"text"}]},{"type":"paragraph","content":[{"text":"Usage: ","type":"text"},{"text":"/copy-file src.txt dest.txt","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Pattern 3: Flexible Arguments","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"argument-hint: [search-term] [optional-path]","type":"text"}]},{"type":"paragraph","content":[{"text":"Body:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"Search for \"$1\" in ${2:-.}","type":"text"}]},{"type":"paragraph","content":[{"text":"Usage: ","type":"text"},{"text":"/search \"error\" ./src","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"/search \"error\"","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Pattern 4: All Arguments","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"argument-hint: [commit-message]","type":"text"}]},{"type":"paragraph","content":[{"text":"Body:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"Create commit with message: $ARGUMENTS","type":"text"}]},{"type":"paragraph","content":[{"text":"Usage: ","type":"text"},{"text":"/commit Add new feature for user authentication","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Tool Selection Strategy","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Read-only Commands","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"allowed-tools: Read, Grep, Glob","type":"text"}]},{"type":"paragraph","content":[{"text":"Use for: Analysis, searching, reporting","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"File Operations","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"allowed-tools: Read, Write, Edit, Grep, Glob","type":"text"}]},{"type":"paragraph","content":[{"text":"Use for: Code generation, file manipulation","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"System Commands","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"allowed-tools: Read, Grep, Glob, Bash","type":"text"}]},{"type":"paragraph","content":[{"text":"Use for: Testing, building, git operations","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Full Workflow","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"allowed-tools: Read, Write, Edit, Grep, Glob, Bash","type":"text"}]},{"type":"paragraph","content":[{"text":"Use for: Complete workflows (test + commit + push)","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Model Selection","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"haiku","type":"text","marks":[{"type":"strong"}]},{"text":": Simple, fast commands (quick searches, simple operations)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"sonnet","type":"text","marks":[{"type":"strong"}]},{"text":": Default for most commands (balanced performance)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"opus","type":"text","marks":[{"type":"strong"}]},{"text":": Complex reasoning or critical operations","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"omit","type":"text","marks":[{"type":"strong"}]},{"text":": Use parent model (inherit)","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Common Command Patterns","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Pattern 1: Git Workflow Command","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Commit changes and push to remote\nallowed-tools: Read, Grep, Bash\nargument-hint: [commit-message]\n---\n\n# Git Commit and Push\n\nCommit all changes with the message: $ARGUMENTS\n\nThen push to the remote repository.\n\n## Workflow\n\n1. Run `git add .`\n2. Create commit with message from $ARGUMENTS\n3. Push to origin\n4. Report status","type":"text"}]},{"type":"paragraph","content":[{"text":"Usage: ","type":"text"},{"text":"/git-commit-push Add authentication feature","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Pattern 2: Code Review Command","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Review a pull request for quality and security\nallowed-tools: Read, Grep, Bash\nargument-hint: [PR-number]\n---\n\n# Review Pull Request\n\nReview pull request #$1 for:\n- Code quality issues\n- Security vulnerabilities\n- Test coverage\n- Documentation\n\nUse GitHub CLI to fetch PR details and analyze changes.","type":"text"}]},{"type":"paragraph","content":[{"text":"Usage: ","type":"text"},{"text":"/review-pr 123","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Pattern 3: Test Runner Command","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Run specific test suite and report results\nallowed-tools: Read, Grep, Bash\nargument-hint: [test-path]\n---\n\n# Run Tests\n\nExecute tests in: $1\n\nReport:\n- Pass/fail status\n- Coverage metrics\n- Failed test details","type":"text"}]},{"type":"paragraph","content":[{"text":"Usage: ","type":"text"},{"text":"/run-tests ./tests/unit","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Pattern 4: Scaffolding Command","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Create a new React component with tests\nallowed-tools: Read, Write, Grep, Glob\nargument-hint: [component-name]\n---\n\n# Create React Component\n\nGenerate a new React component: $1\n\nInclude:\n- Component file: $1.tsx\n- Test file: $1.test.tsx\n- Storybook file: $1.stories.tsx","type":"text"}]},{"type":"paragraph","content":[{"text":"Usage: ","type":"text"},{"text":"/create-component UserProfile","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Pattern 5: Documentation Command","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"---\ndescription: Generate API documentation from code\nallowed-tools: Read, Write, Grep, Glob, Bash\nargument-hint: [source-directory]\n---\n\n# Generate API Docs\n\nGenerate API documentation for: ${1:-./src}\n\nOutput: ./docs/api.md","type":"text"}]},{"type":"paragraph","content":[{"text":"Usage: ","type":"text"},{"text":"/generate-docs ./src/api","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"/generate-docs","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Namespacing Commands","type":"text"}]},{"type":"paragraph","content":[{"text":"Organize related commands in subdirectories:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":".claude/commands/\n├── git/\n│ ├── commit.md → /project:git:commit\n│ ├── pr.md → /project:git:pr\n│ └── rebase.md → /project:git:rebase\n├── test/\n│ ├── run.md → /project:test:run\n│ └── coverage.md → /project:test:coverage\n└── deploy/\n ├── staging.md → /project:deploy:staging\n └── production.md → /project:deploy:production","type":"text"}]},{"type":"paragraph","content":[{"text":"Benefits:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Organized command structure","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Clear naming hierarchy","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Easy to discover related commands","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Security Considerations","type":"text"}]},{"type":"paragraph","content":[{"text":"When creating commands:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Validate Arguments","type":"text","marks":[{"type":"strong"}]},{"text":": Check for injection attacks","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Sanitize Paths","type":"text","marks":[{"type":"strong"}]},{"text":": Prevent path traversal","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Restrict Tools","type":"text","marks":[{"type":"strong"}]},{"text":": Minimal necessary permissions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Avoid Secrets","type":"text","marks":[{"type":"strong"}]},{"text":": Never include credentials","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Review Bash","type":"text","marks":[{"type":"strong"}]},{"text":": Audit shell commands carefully","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Security Example: Safe File Processing","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"---\ndescription: Process a data file safely\nallowed-tools: Read, Bash\n---\n\n# Process File\n\nProcess file: $1\n\n## Safety Checks\n\n1. Validate $1 is a valid file path\n2. Check file exists and is readable\n3. Verify file extension is allowed\n4. Process with restricted permissions","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Validation Checklist","type":"text"}]},{"type":"paragraph","content":[{"text":"Before finalizing a command, verify:","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Name is action-oriented, lowercase-hyphens","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Description clearly states what the command does","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"YAML frontmatter is valid syntax","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"argument-hint describes parameters","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Arguments ($1, $2, $ARGUMENTS) are documented","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Tools are minimal and appropriate","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Model choice is suitable for complexity","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Workflow is clearly documented","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Security considerations are addressed","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Usage examples are provided","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"File is placed in correct directory","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Reference Templates","type":"text"}]},{"type":"paragraph","content":[{"text":"Full templates and examples are available at:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"{baseDir}/templates/command-template.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Basic command template","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"{baseDir}/references/command-examples.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Real-world examples","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Maintaining and Updating Commands","type":"text"}]},{"type":"paragraph","content":[{"text":"Commands need ongoing maintenance to stay effective.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Critical Rule: Model Field Format","type":"text"}]},{"type":"paragraph","content":[{"text":"Commands must use VERSION ALIASES or FULL IDs, not short aliases.","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"# ✅ CORRECT - version alias\nmodel: claude-haiku-4-5\n\n# ✅ CORRECT - full ID\nmodel: claude-haiku-4-5-20251001\n\n# ❌ WRONG - causes \"model not found\" error\nmodel: haiku\nmodel: sonnet\nmodel: opus","type":"text"}]},{"type":"paragraph","content":[{"text":"Why","type":"text","marks":[{"type":"strong"}]},{"text":": Commands are passed directly to the API. Only agents translate short aliases.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"When to Update a Command","type":"text"}]},{"type":"paragraph","content":[{"text":"Update commands when:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Model errors","type":"text","marks":[{"type":"strong"}]},{"text":": \"Model not found\" (fix short alias)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Requirements change","type":"text","marks":[{"type":"strong"}]},{"text":": New capabilities or arguments","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Security concerns","type":"text","marks":[{"type":"strong"}]},{"text":": Need to restrict tools","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Best practices evolve","type":"text","marks":[{"type":"strong"}]},{"text":": New patterns become standard","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Maintenance Checklist","type":"text"}]},{"type":"paragraph","content":[{"text":"When reviewing commands for updates:","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Model field format","type":"text","marks":[{"type":"strong"}]},{"text":": Use version alias or full ID (not short alias)","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Action-oriented naming","type":"text","marks":[{"type":"strong"}]},{"text":": Verb-first names (","type":"text"},{"text":"run-tests","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"deploy-app","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Minimal allowed-tools","type":"text","marks":[{"type":"strong"}]},{"text":": Only pre-approve necessary tools","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Clear argument-hint","type":"text","marks":[{"type":"strong"}]},{"text":": Describes expected parameters","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Documented arguments","type":"text","marks":[{"type":"strong"}]},{"text":": $1, $2, $ARGUMENTS explained","type":"text"}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Usage examples","type":"text","marks":[{"type":"strong"}]},{"text":": Show how to invoke the command","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Common Maintenance Scenarios","type":"text"}]},{"type":"heading","attrs":{"level":4},"content":[{"text":"Scenario 1: Command Fails with \"Model Not Found\"","type":"text"}]},{"type":"paragraph","content":[{"text":"Problem","type":"text","marks":[{"type":"strong"}]},{"text":": Command has ","type":"text"},{"text":"model: haiku","type":"text","marks":[{"type":"code_inline"}]},{"text":" (short alias) ","type":"text"},{"text":"Solution","type":"text","marks":[{"type":"strong"}]},{"text":": Change to version alias format:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"# Before\nmodel: haiku\n\n# After\nmodel: claude-haiku-4-5","type":"text"}]},{"type":"heading","attrs":{"level":4},"content":[{"text":"Scenario 2: Add Arguments","type":"text"}]},{"type":"paragraph","content":[{"text":"Problem","type":"text","marks":[{"type":"strong"}]},{"text":": Command needs to accept parameters ","type":"text"},{"text":"Solution","type":"text","marks":[{"type":"strong"}]},{"text":": Add argument-hint and document in body:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"argument-hint: \"[filename] [options]\"","type":"text"}]},{"type":"heading","attrs":{"level":4},"content":[{"text":"Scenario 3: Security Hardening","type":"text"}]},{"type":"paragraph","content":[{"text":"Problem","type":"text","marks":[{"type":"strong"}]},{"text":": Command uses Bash without validation ","type":"text"},{"text":"Solution","type":"text","marks":[{"type":"strong"}]},{"text":": Either remove Bash from allowed-tools, or add safety checks in the workflow","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Best Practices","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Model Selection","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Most commands: Omit model (inherit from conversation)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Fast operations: Use ","type":"text"},{"text":"claude-haiku-4-5","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Complex reasoning: Use ","type":"text"},{"text":"claude-sonnet-4-5","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"claude-opus-4-1","type":"text","marks":[{"type":"code_inline"}]}]}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Tool Permissions","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Start minimal: ","type":"text"},{"text":"Read, Grep, Glob","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Add Write/Edit only if needed","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Bash requires extra security scrutiny","type":"text"}]}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Argument Documentation","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Always document what each $1, $2 expects","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Provide example invocations","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Handle missing arguments gracefully","type":"text"}]}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Security","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Validate file paths before operations","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Sanitize arguments used in Bash","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Document security measures","type":"text"}]}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Your Role","type":"text"}]},{"type":"paragraph","content":[{"text":"When the user asks to create a command:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Determine if a command is the right choice (vs agent/skill)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Gather requirements about action and arguments","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Design the command structure","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Generate the command file with proper schema","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Document arguments and workflow clearly","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Validate naming, syntax, and security","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Place the file in the correct location","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Provide usage examples","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"When the user asks to update or fix commands:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Assess what needs to change","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check for common issues (model field format, missing arguments)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Make the necessary edits","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Validate after changes","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Update documentation if needed","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Be proactive in:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Suggesting appropriate tool permissions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Recommending argument structures","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Identifying security risks","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Organizing commands with namespacing","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Creating clear documentation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Catching model field errors (short aliases must be fixed)","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Your goal is to help users create powerful, safe, and well-documented slash commands that streamline their workflows.","type":"text"}]}]},"metadata":{"date":"2026-06-05","name":"building-commands","author":"@skillopedia","source":{"stars":336,"repo_name":"marketplace","origin_url":"https://github.com/aiskillstore/marketplace/blob/HEAD/skills/c0ntr0lledcha0s/building-commands/SKILL.md","repo_owner":"aiskillstore","body_sha256":"234568af6e086594382fc341883bf91fd99613b1ff2df578fd47b7cea5aac446","cluster_key":"0d0a2d9709a399c265db5d7c62a2f5c7b7602ded1e802ec77907f6aae8066fa0","clean_bundle":{"format":"clean-skill-bundle-v1","source":"aiskillstore/marketplace/skills/c0ntr0lledcha0s/building-commands/SKILL.md","attachments":[{"id":"893b6c7d-3cbd-56d5-a7f4-b51ba3d536ae","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/893b6c7d-3cbd-56d5-a7f4-b51ba3d536ae/attachment.md","path":"references/command-checklist.md","size":11586,"sha256":"2566a089314c52170a424667789068fad5669c62314b1ba0bbf425fe0eaf36b8","contentType":"text/markdown; charset=utf-8"},{"id":"095528bf-cf12-59e9-a126-b09dc6ffaec0","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/095528bf-cf12-59e9-a126-b09dc6ffaec0/attachment.md","path":"references/command-migration-guide.md","size":10435,"sha256":"83e2eb4cc483d61b1464411f4b4b37d3a00bc0f0ce5fbff1227f3bf8ffab6bb1","contentType":"text/markdown; charset=utf-8"},{"id":"9f4583dc-ced9-5128-9db8-48525ef4126f","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/9f4583dc-ced9-5128-9db8-48525ef4126f/attachment.md","path":"references/command-update-patterns.md","size":13395,"sha256":"ad892fd89011c06c1c73ce39761b792c20a6314ea8680e5006aa24d7572a250b","contentType":"text/markdown; charset=utf-8"},{"id":"adfe6413-3fae-5dcd-9c89-93ce9dc0a4b4","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/adfe6413-3fae-5dcd-9c89-93ce9dc0a4b4/attachment.py","path":"scripts/validate-command.py","size":9030,"sha256":"49a092522885176e51f8d5036b82551a52dffbdb6cc8c92736e18583790b482e","contentType":"text/x-python; charset=utf-8"},{"id":"bbf33d3c-702b-5fa0-b0f7-c713c6f3226b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/bbf33d3c-702b-5fa0-b0f7-c713c6f3226b/attachment.json","path":"skill-report.json","size":10142,"sha256":"2a306bcf0269b3bb887c0fce860561898f9a459eef996681f3ba67e5dc9073d8","contentType":"application/json; charset=utf-8"},{"id":"d092dd43-e5b7-59dd-8250-4d17767b5302","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/d092dd43-e5b7-59dd-8250-4d17767b5302/attachment.md","path":"templates/command-template.md","size":3250,"sha256":"e72d951cc203341c5b76ad957b96fe943054aba6944c65215cd7881414da8340","contentType":"text/markdown; charset=utf-8"}],"bundle_sha256":"9aafe335c48121a9c02c9427d3d5d7545b539328a058d037288d885de4c61a29","attachment_count":6,"text_attachments":6,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"skills/c0ntr0lledcha0s/building-commands/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"web-development","category_label":"Web"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"web-development","import_tag":"clean-skills-v1","description":"Expert at creating and modifying Claude Code slash commands. Auto-invokes when the user wants to create, update, modify, enhance, validate, or standardize slash commands, or when modifying command YAML frontmatter fields (especially 'model', 'allowed-tools', 'description'), needs help designing command workflows, or wants to understand command arguments and parameters. Also auto-invokes proactively when Claude is about to write command files (*/commands/*.md), or implement tasks that involve creating slash command components.","allowed-tools":"Read, Write, Edit, Grep, Glob, Bash"}},"renderedAt":1782980950835}

Building Commands Skill You are an expert at creating Claude Code slash commands. Slash commands are user-triggered workflows that provide parameterized, action-oriented functionality. When to Create a Command vs Other Components Use a COMMAND when: - The user explicitly triggers a specific workflow - You need parameterized inputs via arguments - The action is discrete and well-defined - Users need a simple way to invoke complex operations Use a SKILL instead when: - You want automatic, context-aware assistance - The functionality should be "always on" Use an AGENT instead when: - You need de…