[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CXTY8B51W65SF634F0BDPC":3,"skill-same:01M6CXTY8B51W65SF634F0BDPC":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":57,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6CXTY8B51W65SF634F0BDPC","claude-command-builder",null,"Interactive slash command creator for Claude Code. Triggers when user mentions creating commands, slash commands, command templates, command arguments, or wants to build a new command workflow.","eric861129\u002FSKILLS_All-in-one","eric861129","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F74950944?v=4","01M6CXHDYEYRPFGGV4EFXCSYCF","ChiYu-Huang","01M6CXHE2J5CN1EBTY0FKV3ZKW",52,"MIT","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FDevelopment & Code Tools\u002Fclaude-starter\u002Fclaude-command-builder\u002Fskill.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"command","builder","claude command builder","workflow","code","templates","command creator","Bash","grep","read","write","edit","interactive","user","build","commands","2026-11-10 10:12:30",false,"---\nname: claude-command-builder\ndescription: Interactive slash command creator for Claude Code. Triggers when user mentions creating commands, slash commands, command templates, command arguments, or wants to build a new command workflow.\nallowed-tools: Read, Write, Edit, Grep, Glob, Bash\nmodel: sonnet\n---\n\n# Claude Code Command Builder\n\n## Purpose\n\nGuide users through creating effective Claude Code slash commands with proper structure, argument handling, and workflow design. Auto-invokes when users want to create or modify custom commands.\n\n## When to Use\n\nAuto-invoke when users mention:\n- **Creating commands** - \"create command\", \"make command\", \"new slash command\"\n- **Command structure** - \"command template\", \"command format\", \"command frontmatter\"\n- **Arguments** - \"$ARGUMENTS\", \"$1\", \"$2\", \"command parameters\", \"positional args\"\n- **Workflows** - \"command workflow\", \"command steps\", \"command process\"\n- **Bash execution** - \"!`command`\", \"execute bash in command\", \"command with bash\"\n\n## Knowledge Base\n\n- Official docs: `.claude\u002Fskills\u002Fai\u002Fclaude-code\u002Fdocs\u002Fcode_claude_com\u002Fdocs_en_slash-commands.md`\n- Project guide: `.claude\u002Fdocs\u002Fcreating-components.md`\n- Examples in repository: `.claude\u002Fcommands\u002F`\n\n## Process\n\n### 1. Gather Requirements\n\nAsk the user:\n\n```\nLet me help you create a Claude Code slash command! I need a few details:\n\n1. **Command name** (lowercase-with-hyphens):\n   Example: deploy, review-pr, commit, analyze-tokens\n   This will be invoked as: \u002Fyour-command-name\n\n2. **What does this command do?**\n   Describe the workflow in 1-2 sentences.\n\n3. **Does it need arguments?**\n   - None (simple prompt)\n   - All arguments: $ARGUMENTS\n   - Positional: $1, $2, $3, etc.\n\n4. **Does it need bash execution?**\n   Commands that run before the slash command (e.g., !`git status`)\n\n5. **Scope:**\n   - Personal (`~\u002F.claude\u002Fcommands\u002F`) - just for you\n   - Project (`.claude\u002Fcommands\u002F`) - shared with team\n\n6. **Namespace\u002Fsubdirectory?**\n   Example: git\u002F, deploy\u002F, testing\u002F\n   Helps organize related commands\n```\n\n### 2. Validate Input\n\nCheck the command name:\n- Must be valid filename (no spaces, special chars except hyphen)\n- Descriptive and memorable\n- Won't conflict with built-in commands\n- Use hyphens (not underscores)\n\nValidate arguments:\n- Define expected arguments\n- Provide defaults if needed\n- Document argument order\n\n### 3. Determine Command Type\n\n**Simple Prompt (no frontmatter):**\n```markdown\nAnalyze this code for performance issues and suggest optimizations.\n```\n\n**With Arguments:**\n```markdown\n---\nargument-hint: [file-path]\ndescription: Analyze file for performance issues\n---\n\nAnalyze the file at $1 for performance issues and suggest optimizations.\n```\n\n**With Bash Execution:**\n```markdown\n---\nallowed-tools: Bash(git status:*), Bash(git diff:*)\ndescription: Create a git commit\n---\n\n## Current State\n\n- Git status: !`git status`\n- Staged changes: !`git diff --staged`\n- Recent commits: !`git log --oneline -5`\n\n## Your Task\n\nBased on the above changes, create a git commit with a clear, conventional commit message.\n```\n\n**Full-Featured:**\n```markdown\n---\nallowed-tools: Bash(npm run:*), Bash(git add:*), Bash(git commit:*)\nargument-hint: [component-name]\ndescription: Create a new React component with tests\nmodel: sonnet\n---\n\n# Create React Component\n\nComponent name: $1\n\nExecute the following workflow:\n\n1. **Validate Input**\n   !`test -n \"$1\" && echo \"Creating component: $1\" || echo \"Error: Component name required\"`\n\n2. **Check Existing Files**\n   !`ls src\u002Fcomponents\u002F$1.tsx 2>\u002Fdev\u002Fnull || echo \"Component does not exist\"`\n\n3. **Create Files**\n   Create the following files:\n   - `src\u002Fcomponents\u002F$1.tsx`\n   - `src\u002Fcomponents\u002F$1.test.tsx`\n   - `src\u002Fcomponents\u002F$1.module.css`\n\n4. **Run Tests**\n   After creation, run: !`npm run test -- $1`\n```\n\n### 4. Generate Command File\n\nCreate command structure based on complexity:\n\n**Template for Simple Command:**\n```markdown\nBrief description of what the command does.\n\n[Prompt instructions for Claude]\n```\n\n**Template for Command with Frontmatter:**\n```markdown\n---\nargument-hint: [arg1] [arg2]\ndescription: Brief description shown in \u002Fhelp\nallowed-tools: Bash(command:*), Read, Write\nmodel: sonnet\ndisable-model-invocation: false\n---\n\n# Command Name\n\nUsage: \u002Fcommand-name [args]\n\n[Detailed instructions]\n```\n\n### 5. Build Command Workflow\n\nStructure the workflow with clear steps:\n\n```markdown\nExecute the following workflow:\n\n1. **Step Name**\n   ```bash\n   # Bash command (if needed)\n   command arg1 arg2\n   ```\n   - What this step does\n   - Validation checks\n   - Error handling\n\n2. **Next Step**\n   [Instructions for Claude]\n   - What to check\n   - How to proceed\n   - What to output\n\n3. **Final Step**\n   - Summary of results\n   - Next actions for user\n   - Success criteria\n```\n\n### 6. Add Argument Handling\n\n**All Arguments ($ARGUMENTS):**\n```markdown\nFix issue #$ARGUMENTS following our coding standards.\n```\nUser runs: `\u002Ffix-issue 123 high-priority`\nBecomes: \"Fix issue #123 high-priority following our coding standards.\"\n\n**Positional Arguments ($1, $2, $3):**\n```markdown\nReview PR #$1 with priority $2 and assign to $3.\nFocus on: $4\n```\nUser runs: `\u002Freview-pr 456 high alice security`\nBecomes individual parameters you can reference separately.\n\n**With Defaults:**\n```markdown\n---\nargument-hint: [environment] [branch]\n---\n\nDeploy to environment: ${1:-staging}\nFrom branch: ${2:-main}\n```\n\n### 7. Add Bash Execution (if needed)\n\nUse `!` prefix to execute commands before processing:\n\n```markdown\n---\nallowed-tools: Bash(git:*)\n---\n\n## Context\n\n- Current branch: !`git branch --show-current`\n- Status: !`git status --short`\n- Recent commits: !`git log --oneline -5`\n\n## Your Task\n\n[Instructions based on the above context]\n```\n\n**Important:**\n- Must specify `allowed-tools` with specific Bash permissions\n- Output is included in command context\n- Commands run before Claude processes the prompt\n\n### 8. Add File References\n\nUse `@` prefix to reference files:\n\n```markdown\nReview the implementation in @src\u002Futils\u002Fhelpers.js\n\nCompare @src\u002Fold-version.js with @src\u002Fnew-version.js\n\nAnalyze all files in @src\u002Fcomponents\u002F\n```\n\n### 9. Configure Thinking Mode (if needed)\n\nFor complex problems, trigger extended thinking:\n\n```markdown\nCarefully analyze the following code and think through...\n\nLet's approach this step by step...\n\nConsider all edge cases before implementing...\n```\n\nThese keywords can trigger extended thinking mode.\n\n### 10. Create the File\n\nSave to correct location:\n\n**Personal command:**\n```bash\n~\u002F.claude\u002Fcommands\u002Fcommand-name.md\n~\u002F.claude\u002Fcommands\u002Fcategory\u002Fcommand-name.md  # With namespace\n```\n\n**Project command:**\n```bash\n.claude\u002Fcommands\u002Fcommand-name.md\n.claude\u002Fcommands\u002Fcategory\u002Fcommand-name.md  # With namespace\n```\n\n### 11. Test the Command\n\nProvide testing instructions:\n\n```\nTo test your command:\n1. Restart Claude Code or start a new session\n2. Type: \u002Fhelp\n3. Find your command in the list\n4. Try: \u002Fyour-command-name [args]\n5. Verify it behaves as expected\n```\n\n**Test cases:**\n```bash\n# No arguments\n\u002Fyour-command\n\n# With arguments\n\u002Fyour-command arg1\n\u002Fyour-command arg1 arg2\n\n# Edge cases\n\u002Fyour-command \"\"\n\u002Fyour-command \"with spaces\"\n```\n\n## Frontmatter Reference\n\nField| Purpose| Example\n---|---|---\n`argument-hint`| Show expected arguments in autocomplete| `[pr-number] [priority]`\n`description`| Brief description for `\u002Fhelp` menu| `Review pull request`\n`allowed-tools`| Tools command can use| `Bash(git:*), Read, Write`\n`model`| Specific model to use| `claude-sonnet-4-5-20250929`\n`disable-model-invocation`| Prevent SlashCommand tool from calling this| `true`\n\n## Bash Tool Permissions\n\nWhen using `!` prefix or needing bash execution:\n\n```markdown\n---\nallowed-tools: Bash(git add:*), Bash(git commit:*), Bash(git push:*)\n---\n```\n\n**Permission patterns:**\n- `Bash(git:*)` - All git commands\n- `Bash(npm run:*)` - All npm run scripts\n- `Bash(git add:*), Bash(git commit:*)` - Specific git commands\n\n## Argument Patterns\n\n### Pattern 1: All Arguments\n```markdown\nRun tests for: $ARGUMENTS\n```\nUsage: `\u002Ftest users api database`\nBecomes: \"Run tests for: users api database\"\n\n### Pattern 2: Positional\n```markdown\nDeploy $1 to $2 environment with tag $3\n```\nUsage: `\u002Fdeploy my-app staging v1.2.3`\nBecomes: \"Deploy my-app to staging environment with tag v1.2.3\"\n\n### Pattern 3: Mixed\n```markdown\n---\nargument-hint: \u003Cfile> [rest of args]\n---\n\nAnalyze file $1 for: $ARGUMENTS\n```\nUsage: `\u002Fanalyze src\u002Fapp.js performance security`\nBecomes: \"Analyze file src\u002Fapp.js for: src\u002Fapp.js performance security\"\nNote: $ARGUMENTS includes all args, so $1 is duplicated\n\n**Better approach:**\n```markdown\nAnalyze file $1 for: ${2:+${@:2}}\n```\nThis uses $1 separately and remaining args starting from $2\n\n### Pattern 4: With Defaults\n```markdown\nEnvironment: ${1:-production}\nVerbose: ${2:-false}\n```\n\n## Command Size Guidelines\n\n- ✅ **Good:** \u003C 100 lines\n- ⚠️ **Warning:** 100-150 lines\n- ❌ **Too large:** > 250 lines (must refactor)\n\n**If too large:**\n- Extract to external script\n- Split into multiple commands\n- Use sub-commands pattern\n\n## Common Command Types\n\n### 1. Git Workflow\n```markdown\n---\nallowed-tools: Bash(git:*)\ndescription: Create conventional commit\n---\n\n## Context\n- Status: !`git status --short`\n- Diff: !`git diff HEAD`\n\nCreate a conventional commit message.\n```\n\n### 2. Code Generator\n```markdown\n---\nargument-hint: [component-name]\ndescription: Generate React component\n---\n\nCreate a new React component named $1:\n- Component file\n- Test file\n- Storybook story\n```\n\n### 3. Analysis Tool\n```markdown\n---\nargument-hint: [file-path]\ndescription: Analyze code complexity\n---\n\nAnalyze @$1 for:\n- Cyclomatic complexity\n- Code smells\n- Improvement suggestions\n```\n\n### 4. Deployment Helper\n```markdown\n---\nallowed-tools: Bash(npm:*), Bash(git:*)\nargument-hint: [environment]\ndescription: Deploy to environment\n---\n\nDeploy to ${1:-staging}:\n1. Run tests: !`npm test`\n2. Build: !`npm run build`\n3. Deploy: !`npm run deploy:$1`\n```\n\n### 5. Documentation Generator\n```markdown\n---\nargument-hint: [file-pattern]\ndescription: Generate API documentation\n---\n\nGenerate documentation for: $1\nInclude:\n- Function signatures\n- Parameters\n- Return types\n- Examples\n```\n\n## Examples from TOON Formatter\n\n**Simple version:**\n```markdown\n# Convert to TOON\n\nConvert the specified JSON file to TOON v2.0 format with automatic optimization and show token savings.\n\nUsage: \u002Fconvert-to-toon \u003Cfile>\n```\n\n**Advanced version with bash:**\n```markdown\n---\nallowed-tools: Bash(jq:*), Bash(.claude\u002Fskills\u002Ftoon-formatter\u002Fbin\u002Ftoon:*)\nargument-hint: \u003Cfile> [--delimiter comma|tab|pipe]\ndescription: Convert JSON to TOON format\n---\n\n# Convert to TOON\n\nFile: $1\nDelimiter: ${2:-comma}\n\n1. **Validate**: !`test -f \"$1\" && jq empty \"$1\" 2>&1`\n2. **Analyze**: !`jq 'if type == \"array\" then length else 0 end' \"$1\"`\n3. **Convert**: !`.claude\u002Fskills\u002Ftoon-formatter\u002Fbin\u002Ftoon encode \"$1\"`\n4. Show savings comparison\n```\n\n## Troubleshooting\n\n### Command Not Found\n\n**Check:**\n```bash\n# List all commands\nls ~\u002F.claude\u002Fcommands\u002F*.md\nls .claude\u002Fcommands\u002F*.md\n\n# Verify filename\nls .claude\u002Fcommands\u002Fyour-command.md\n```\n\n**Remember:**\n- Filename (without `.md`) becomes command name\n- Hyphens in filename become hyphens in command\n- Case-sensitive on Linux\u002FMac\n\n### Arguments Not Working\n\n**Debug:**\n```markdown\nDebug: $ARGUMENTS\nDebug $1: \"$1\"\nDebug $2: \"$2\"\n```\n\nRun command and check output to see what's being passed.\n\n### Bash Commands Not Executing\n\n**Check:**\n1. `allowed-tools` includes correct Bash permissions\n2. Using `!` prefix: `!`command``\n3. Backticks are correct: \\`command\\` not 'command'\n4. Command is allowed by permissions\n\n### Command Not in \u002Fhelp\n\n**Possible reasons:**\n- File not in correct location\n- File doesn't have `.md` extension\n- Syntax error in frontmatter\n- Need to restart Claude Code\n\n## Best Practices\n\n### DO:\n✅ Provide clear argument hints\n✅ Include usage examples\n✅ Handle errors gracefully\n✅ Show progress for long operations\n✅ Document expected behavior\n✅ Test with various inputs\n✅ Use descriptive command names\n\n### DON'T:\n❌ Make commands too complex (>250 lines)\n❌ Forget to specify allowed-tools for Bash\n❌ Use unclear argument names\n❌ Skip error handling\n❌ Hardcode values (use arguments)\n❌ Forget to test edge cases\n\n## Comparison: Commands vs Skills\n\n**Use Commands when:**\n- You want explicit control (manual invocation)\n- Simple, repetitive prompts\n- Specific workflow steps\n- Frequently-used templates\n\n**Use Skills when:**\n- Claude should auto-detect need\n- Complex, multi-file workflows\n- Comprehensive domain knowledge\n- Team needs standardized expertise\n\n**Can use both:**\n- Command invokes skill explicitly\n- Skill activates automatically\n- Command provides quick access\n- Skill provides deep capability\n\n## Resources\n\n- **Official Command Docs:** `.claude\u002Fskills\u002Fai\u002Fclaude-code\u002Fdocs\u002Fcode_claude_com\u002Fdocs_en_slash-commands.md`\n- **Project Component Guide:** `.claude\u002Fdocs\u002Fcreating-components.md`\n- **Command Examples:** `.claude\u002Fcommands\u002F` directory\n- **Skills vs Commands:** Section in slash-commands.md\n","# Claude Code Command Builder\n\n## Purpose\n\nGuide users through creating effective Claude Code slash commands with proper structure, argument handling, and workflow design. Auto-invokes when users want to create or modify custom commands.\n\n## When to Use\n\nAuto-invoke when users mention:\n- **Creating commands** - \"create command\", \"make command\", \"new slash command\"\n- **Command structure** - \"command template\", \"command format\", \"command frontmatter\"\n- **Arguments** - \"$ARGUMENTS\", \"$1\", \"$2\", \"command parameters\", \"positional args\"\n- **Workflows** - \"command workflow\", \"command steps\", \"command process\"\n- **Bash execution** - \"!`command`\", \"execute bash in command\", \"command with bash\"\n\n## Knowledge Base\n\n- Official docs: `.claude\u002Fskills\u002Fai\u002Fclaude-code\u002Fdocs\u002Fcode_claude_com\u002Fdocs_en_slash-commands.md`\n- Project guide: `.claude\u002Fdocs\u002Fcreating-components.md`\n- Examples in repository: `.claude\u002Fcommands\u002F`\n\n## Process\n\n### 1. Gather Requirements\n\nAsk the user:\n\n```\nLet me help you create a Claude Code slash command! I need a few details:\n\n1. **Command name** (lowercase-with-hyphens):\n   Example: deploy, review-pr, commit, analyze-tokens\n   This will be invoked as: \u002Fyour-command-name\n\n2. **What does this command do?**\n   Describe the workflow in 1-2 sentences.\n\n3. **Does it need arguments?**\n   - None (simple prompt)\n   - All arguments: $ARGUMENTS\n   - Positional: $1, $2, $3, etc.\n\n4. **Does it need bash execution?**\n   Commands that run before the slash command (e.g., !`git status`)\n\n5. **Scope:**\n   - Personal (`~\u002F.claude\u002Fcommands\u002F`) - just for you\n   - Project (`.claude\u002Fcommands\u002F`) - shared with team\n\n6. **Namespace\u002Fsubdirectory?**\n   Example: git\u002F, deploy\u002F, testing\u002F\n   Helps organize related commands\n```\n\n### 2. Validate Input\n\nCheck the command name:\n- Must be valid filename (no spaces, special chars except hyphen)\n- Descriptive and memorable\n- Won't conflict with built-in commands\n- Use hyphens (not underscores)\n\nValidate arguments:\n- Define expected arguments\n- Provide defaults if needed\n- Document argument order\n\n### 3. Determine Command Type\n\n**Simple Prompt (no frontmatter):**\n```markdown\nAnalyze this code for performance issues and suggest optimizations.\n```\n\n**With Arguments:**\n```markdown\n---\nargument-hint: [file-path]\ndescription: Analyze file for performance issues\n---\n\nAnalyze the file at $1 for performance issues and suggest optimizations.\n```\n\n**With Bash Execution:**\n```markdown\n---\nallowed-tools: Bash(git status:*), Bash(git diff:*)\ndescription: Create a git commit\n---\n\n## Current State\n\n- Git status: !`git status`\n- Staged changes: !`git diff --staged`\n- Recent commits: !`git log --oneline -5`\n\n## Your Task\n\nBased on the above changes, create a git commit with a clear, conventional commit message.\n```\n\n**Full-Featured:**\n```markdown\n---\nallowed-tools: Bash(npm run:*), Bash(git add:*), Bash(git commit:*)\nargument-hint: [component-name]\ndescription: Create a new React component with tests\nmodel: sonnet\n---\n\n# Create React Component\n\nComponent name: $1\n\nExecute the following workflow:\n\n1. **Validate Input**\n   !`test -n \"$1\" && echo \"Creating component: $1\" || echo \"Error: Component name required\"`\n\n2. **Check Existing Files**\n   !`ls src\u002Fcomponents\u002F$1.tsx 2>\u002Fdev\u002Fnull || echo \"Component does not exist\"`\n\n3. **Create Files**\n   Create the following files:\n   - `src\u002Fcomponents\u002F$1.tsx`\n   - `src\u002Fcomponents\u002F$1.test.tsx`\n   - `src\u002Fcomponents\u002F$1.module.css`\n\n4. **Run Tests**\n   After creation, run: !`npm run test -- $1`\n```\n\n### 4. Generate Command File\n\nCreate command structure based on complexity:\n\n**Template for Simple Command:**\n```markdown\nBrief description of what the command does.\n\n[Prompt instructions for Claude]\n```\n\n**Template for Command with Frontmatter:**\n```markdown\n---\nargument-hint: [arg1] [arg2]\ndescription: Brief description shown in \u002Fhelp\nallowed-tools: Bash(command:*), Read, Write\nmodel: sonnet\ndisable-model-invocation: false\n---\n\n# Command Name\n\nUsage: \u002Fcommand-name [args]\n\n[Detailed instructions]\n```\n\n### 5. Build Command Workflow\n\nStructure the workflow with clear steps:\n\n```markdown\nExecute the following workflow:\n\n1. **Step Name**\n   ```bash\n   # Bash command (if needed)\n   command arg1 arg2\n   ```\n   - What this step does\n   - Validation checks\n   - Error handling\n\n2. **Next Step**\n   [Instructions for Claude]\n   - What to check\n   - How to proceed\n   - What to output\n\n3. **Final Step**\n   - Summary of results\n   - Next actions for user\n   - Success criteria\n```\n\n### 6. Add Argument Handling\n\n**All Arguments ($ARGUMENTS):**\n```markdown\nFix issue #$ARGUMENTS following our coding standards.\n```\nUser runs: `\u002Ffix-issue 123 high-priority`\nBecomes: \"Fix issue #123 high-priority following our coding standards.\"\n\n**Positional Arguments ($1, $2, $3):**\n```markdown\nReview PR #$1 with priority $2 and assign to $3.\nFocus on: $4\n```\nUser runs: `\u002Freview-pr 456 high alice security`\nBecomes individual parameters you can reference separately.\n\n**With Defaults:**\n```markdown\n---\nargument-hint: [environment] [branch]\n---\n\nDeploy to environment: ${1:-staging}\nFrom branch: ${2:-main}\n```\n\n### 7. Add Bash Execution (if needed)\n\nUse `!` prefix to execute commands before processing:\n\n```markdown\n---\nallowed-tools: Bash(git:*)\n---\n\n## Context\n\n- Current branch: !`git branch --show-current`\n- Status: !`git status --short`\n- Recent commits: !`git log --oneline -5`\n\n## Your Task\n\n[Instructions based on the above context]\n```\n\n**Important:**\n- Must specify `allowed-tools` with specific Bash permissions\n- Output is included in command context\n- Commands run before Claude processes the prompt\n\n### 8. Add File References\n\nUse `@` prefix to reference files:\n\n```markdown\nReview the implementation in @src\u002Futils\u002Fhelpers.js\n\nCompare @src\u002Fold-version.js with @src\u002Fnew-version.js\n\nAnalyze all files in @src\u002Fcomponents\u002F\n```\n\n### 9. Configure Thinking Mode (if needed)\n\nFor complex problems, trigger extended thinking:\n\n```markdown\nCarefully analyze the following code and think through...\n\nLet's approach this step by step...\n\nConsider all edge cases before implementing...\n```\n\nThese keywords can trigger extended thinking mode.\n\n### 10. Create the File\n\nSave to correct location:\n\n**Personal command:**\n```bash\n~\u002F.claude\u002Fcommands\u002Fcommand-name.md\n~\u002F.claude\u002Fcommands\u002Fcategory\u002Fcommand-name.md  # With namespace\n```\n\n**Project command:**\n```bash\n.claude\u002Fcommands\u002Fcommand-name.md\n.claude\u002Fcommands\u002Fcategory\u002Fcommand-name.md  # With namespace\n```\n\n### 11. Test the Command\n\nProvide testing instructions:\n\n```\nTo test your command:\n1. Restart Claude Code or start a new session\n2. Type: \u002Fhelp\n3. Find your command in the list\n4. Try: \u002Fyour-command-name [args]\n5. Verify it behaves as expected\n```\n\n**Test cases:**\n```bash\n# No arguments\n\u002Fyour-command\n\n# With arguments\n\u002Fyour-command arg1\n\u002Fyour-command arg1 arg2\n\n# Edge cases\n\u002Fyour-command \"\"\n\u002Fyour-command \"with spaces\"\n```\n\n## Frontmatter Reference\n\nField| Purpose| Example\n---|---|---\n`argument-hint`| Show expected arguments in autocomplete| `[pr-number] [priority]`\n`description`| Brief description for `\u002Fhelp` menu| `Review pull request`\n`allowed-tools`| Tools command can use| `Bash(git:*), Read, Write`\n`model`| Specific model to use| `claude-sonnet-4-5-20250929`\n`disable-model-invocation`| Prevent SlashCommand tool from calling this| `true`\n\n## Bash Tool Permissions\n\nWhen using `!` prefix or needing bash execution:\n\n```markdown\n---\nallowed-tools: Bash(git add:*), Bash(git commit:*), Bash(git push:*)\n---\n```\n\n**Permission patterns:**\n- `Bash(git:*)` - All git commands\n- `Bash(npm run:*)` - All npm run scripts\n- `Bash(git add:*), Bash(git commit:*)` - Specific git commands\n\n## Argument Patterns\n\n### Pattern 1: All Arguments\n```markdown\nRun tests for: $ARGUMENTS\n```\nUsage: `\u002Ftest users api database`\nBecomes: \"Run tests for: users api database\"\n\n### Pattern 2: Positional\n```markdown\nDeploy $1 to $2 environment with tag $3\n```\nUsage: `\u002Fdeploy my-app staging v1.2.3`\nBecomes: \"Deploy my-app to staging environment with tag v1.2.3\"\n\n### Pattern 3: Mixed\n```markdown\n---\nargument-hint: \u003Cfile> [rest of args]\n---\n\nAnalyze file $1 for: $ARGUMENTS\n```\nUsage: `\u002Fanalyze src\u002Fapp.js performance security`\nBecomes: \"Analyze file src\u002Fapp.js for: src\u002Fapp.js performance security\"\nNote: $ARGUMENTS includes all args, so $1 is duplicated\n\n**Better approach:**\n```markdown\nAnalyze file $1 for: ${2:+${@:2}}\n```\nThis uses $1 separately and remaining args starting from $2\n\n### Pattern 4: With Defaults\n```markdown\nEnvironment: ${1:-production}\nVerbose: ${2:-false}\n```\n\n## Command Size Guidelines\n\n- ✅ **Good:** \u003C 100 lines\n- ⚠️ **Warning:** 100-150 lines\n- ❌ **Too large:** > 250 lines (must refactor)\n\n**If too large:**\n- Extract to external script\n- Split into multiple commands\n- Use sub-commands pattern\n\n## Common Command Types\n\n### 1. Git Workflow\n```markdown\n---\nallowed-tools: Bash(git:*)\ndescription: Create conventional commit\n---\n\n## Context\n- Status: !`git status --short`\n- Diff: !`git diff HEAD`\n\nCreate a conventional commit message.\n```\n\n### 2. Code Generator\n```markdown\n---\nargument-hint: [component-name]\ndescription: Generate React component\n---\n\nCreate a new React component named $1:\n- Component file\n- Test file\n- Storybook story\n```\n\n### 3. Analysis Tool\n```markdown\n---\nargument-hint: [file-path]\ndescription: Analyze code complexity\n---\n\nAnalyze @$1 for:\n- Cyclomatic complexity\n- Code smells\n- Improvement suggestions\n```\n\n### 4. Deployment Helper\n```markdown\n---\nallowed-tools: Bash(npm:*), Bash(git:*)\nargument-hint: [environment]\ndescription: Deploy to environment\n---\n\nDeploy to ${1:-staging}:\n1. Run tests: !`npm test`\n2. Build: !`npm run build`\n3. Deploy: !`npm run deploy:$1`\n```\n\n### 5. Documentation Generator\n```markdown\n---\nargument-hint: [file-pattern]\ndescription: Generate API documentation\n---\n\nGenerate documentation for: $1\nInclude:\n- Function signatures\n- Parameters\n- Return types\n- Examples\n```\n\n## Examples from TOON Formatter\n\n**Simple version:**\n```markdown\n# Convert to TOON\n\nConvert the specified JSON file to TOON v2.0 format with automatic optimization and show token savings.\n\nUsage: \u002Fconvert-to-toon \u003Cfile>\n```\n\n**Advanced version with bash:**\n```markdown\n---\nallowed-tools: Bash(jq:*), Bash(.claude\u002Fskills\u002Ftoon-formatter\u002Fbin\u002Ftoon:*)\nargument-hint: \u003Cfile> [--delimiter comma|tab|pipe]\ndescription: Convert JSON to TOON format\n---\n\n# Convert to TOON\n\nFile: $1\nDelimiter: ${2:-comma}\n\n1. **Validate**: !`test -f \"$1\" && jq empty \"$1\" 2>&1`\n2. **Analyze**: !`jq 'if type == \"array\" then length else 0 end' \"$1\"`\n3. **Convert**: !`.claude\u002Fskills\u002Ftoon-formatter\u002Fbin\u002Ftoon encode \"$1\"`\n4. Show savings comparison\n```\n\n## Troubleshooting\n\n### Command Not Found\n\n**Check:**\n```bash\n# List all commands\nls ~\u002F.claude\u002Fcommands\u002F*.md\nls .claude\u002Fcommands\u002F*.md\n\n# Verify filename\nls .claude\u002Fcommands\u002Fyour-command.md\n```\n\n**Remember:**\n- Filename (without `.md`) becomes command name\n- Hyphens in filename become hyphens in command\n- Case-sensitive on Linux\u002FMac\n\n### Arguments Not Working\n\n**Debug:**\n```markdown\nDebug: $ARGUMENTS\nDebug $1: \"$1\"\nDebug $2: \"$2\"\n```\n\nRun command and check output to see what's being passed.\n\n### Bash Commands Not Executing\n\n**Check:**\n1. `allowed-tools` includes correct Bash permissions\n2. Using `!` prefix: `!`command``\n3. Backticks are correct: \\`command\\` not 'command'\n4. Command is allowed by permissions\n\n### Command Not in \u002Fhelp\n\n**Possible reasons:**\n- File not in correct location\n- File doesn't have `.md` extension\n- Syntax error in frontmatter\n- Need to restart Claude Code\n\n## Best Practices\n\n### DO:\n✅ Provide clear argument hints\n✅ Include usage examples\n✅ Handle errors gracefully\n✅ Show progress for long operations\n✅ Document expected behavior\n✅ Test with various inputs\n✅ Use descriptive command names\n\n### DON'T:\n❌ Make commands too complex (>250 lines)\n❌ Forget to specify allowed-tools for Bash\n❌ Use unclear argument names\n❌ Skip error handling\n❌ Hardcode values (use arguments)\n❌ Forget to test edge cases\n\n## Comparison: Commands vs Skills\n\n**Use Commands when:**\n- You want explicit control (manual invocation)\n- Simple, repetitive prompts\n- Specific workflow steps\n- Frequently-used templates\n\n**Use Skills when:**\n- Claude should auto-detect need\n- Complex, multi-file workflows\n- Comprehensive domain knowledge\n- Team needs standardized expertise\n\n**Can use both:**\n- Command invokes skill explicitly\n- Skill activates automatically\n- Command provides quick access\n- Skill provides deep capability\n\n## Resources\n\n- **Official Command Docs:** `.claude\u002Fskills\u002Fai\u002Fclaude-code\u002Fdocs\u002Fcode_claude_com\u002Fdocs_en_slash-commands.md`\n- **Project Component Guide:** `.claude\u002Fdocs\u002Fcreating-components.md`\n- **Command Examples:** `.claude\u002Fcommands\u002F` directory\n- **Skills vs Commands:** Section in slash-commands.md\n",{"name":5,"model":50,"description":7,"allowed-tools":51},"sonnet","Read, Write, Edit, Grep, Glob, Bash","main","cbdd44aae21131521c09e42762e36178c790eacf","public\u002FSKILLS\u002FDevelopment & Code Tools\u002Fclaude-starter\u002Fclaude-command-builder",13,"https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one","http:\u002F\u002Fhuangchiyu.com\u002FSKILLS_All-in-one\u002F","https:\u002F\u002Fgithub.com\u002Feric861129","https:\u002F\u002Fhuangchiyu.com\u002FChiYu-Blog\u002F","開發工程師，專注於 C#／.NET 系統現代化、AI-assisted engineering、開源工具與技術寫作。","2026-04-16 14:28:14",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add eric861129\u002FSKILLS_All-in-one --skill claude-command-builder",{"tool":68,"command":69},"bunx","bunx skills add eric861129\u002FSKILLS_All-in-one --skill claude-command-builder",{"tool":71,"command":72},"pnpm","pnpm dlx skills add eric861129\u002FSKILLS_All-in-one --skill claude-command-builder","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FDevelopment & Code Tools\u002Fclaude-starter\u002Fclaude-command-builder\u002Fskill.md",true,[76],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"skill.json","REFERENCE","参考文档",1167,"https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FDevelopment & Code Tools\u002Fclaude-starter\u002Fclaude-command-builder\u002Fskill.json",[83,109,137,161,186,206],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":90,"publishedAt":45},"01M6CZ1WR3KNVTKSWH4GNWT646","what-if-oracle","Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like \"what if...\", \"what would happen if...\", \"what are the possibilities\", \"explore scenarios\", \"scenario analysis\", \"possibility space\", \"what could go wrong\", \"best case \u002F worst case\", \"risk analysis\", \"contingency planning\", \"strategic options\", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fwhat-if-oracle\u002FSKILL.md",[89],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[91,92,93,94,95,96,97,98,99,100,101,102,103,38,39,104,105,106,107,108],"oracle","what if oracle","go","run","planning","ux","futures","risk","analysis","explore","decision","branch","question","idea","exploration","options","stress-test","strategies",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":125,"publishedAt":45},"01M6CZ1QHGJE91A95MSN5EK5Q9","venue-templates","Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fvenue-templates\u002FSKILL.md",[115,118,121,122],{"categoryNo":116,"categoryName":117,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":123,"categoryName":124,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000036","内容创作者",[34,126,127,128,129,130,131,132,36,133,38,39,40,134,135,136],"venue templates","research","guidelines","NeurIPS","ICML","LaTeX","science","access","proposals","Academic","requirements",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":145,"publishedAt":45},"01M6CZ1KBQD2E5RTFB3BGVX7CD","the-fool","Use when challenging ideas, plans, decisions, or proposals using structured critical reasoning. Invoke to play devil's advocate, run a pre-mortem, red team, or audit evidence and assumptions.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fthe-fool\u002FSKILL.md",[143,144],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},[146,147,93,32,148,94,33,149,150,151,152,153,154,155,134,156,157,158,159,160],"the fool","review","architecture","audit","forge","devil","team","designer","reviewer","challenge","stress test","evidence","expert","poke","ideas",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":170,"publishedAt":45},"01M6CZ1ES826S7P1X3333E40TA","scientific-writing","Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA\u002FAMA\u002FVancouver), figures\u002Ftables, reporting guidelines (CONSORT\u002FSTROBE\u002FPRISMA), for research papers and journal submissions.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fscientific-writing\u002FSKILL.md",[167,168,169],{"categoryNo":116,"categoryName":117,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":123,"categoryName":124,"taxonomyType":26,"taxonomyTypeDesc":27},[171,172,128,173,174,175,176,177,36,178,38,39,40,179,180,181,182,183,184,185],"writing","scientific writing","core","reporting","deep research","Citations","Outlines","tool","use","never","structure","deep","full","stage","prisma",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":193,"publishedAt":45},"01M6CZ1B2JGJTB9FRD0TW4RXXE","scientific-brainstorming","Creative research ideation and exploration. Use for open-ended brainstorming sessions, exploring interdisciplinary connections, challenging assumptions, or identifying research gaps. Best for early-stage research planning when you do not have specific observations yet. For formulating testable hypotheses from data use hypothesis-generation.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fscientific-brainstorming\u002FSKILL.md",[192],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[194,195,127,196,95,197,198,199,179,200,201,202,105,203,204,184,205],"brainstorming","scientific brainstorming","sessions","data","hypothesis","open","ideation","creative","do","connections","research ideation","generation",{"skillNo":207,"name":208,"nameZh":6,"description":209,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":210,"categories":211,"keywords":218,"publishedAt":45},"01M6CZ16JG8N7A2ZX04BGE8J2Y","research-lookup","Look up current research information using the Parallel Chat API (primary) or Perplexity sonar-pro-search (academic paper searches). Automatically routes queries to the best backend. Use for finding papers, gathering research data, and verifying scientific information.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fresearch-lookup\u002FSKILL.md",[212,215,216,217],{"categoryNo":213,"categoryName":214,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},[127,219,220,221,197,222,223,36,224,225,38,39,40,179,226,227,228,229,230,135],"lookup","research lookup","search","perplexity","api","parallel","openrouter","backend","up","look","queries","chat"]