public/SKILLS/Development & Code Tools/claude-starter/claude-command-builder/SKILL.md
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.
npx skillsauth add eric861129/skills_all-in-one claude-command-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guide 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.
Auto-invoke when users mention:
command", "execute bash in command", "command with bash".claude/skills/ai/claude-code/docs/code_claude_com/docs_en_slash-commands.md.claude/docs/creating-components.md.claude/commands/Ask the user:
Let me help you create a Claude Code slash command! I need a few details:
1. **Command name** (lowercase-with-hyphens):
Example: deploy, review-pr, commit, analyze-tokens
This will be invoked as: /your-command-name
2. **What does this command do?**
Describe the workflow in 1-2 sentences.
3. **Does it need arguments?**
- None (simple prompt)
- All arguments: $ARGUMENTS
- Positional: $1, $2, $3, etc.
4. **Does it need bash execution?**
Commands that run before the slash command (e.g., !`git status`)
5. **Scope:**
- Personal (`~/.claude/commands/`) - just for you
- Project (`.claude/commands/`) - shared with team
6. **Namespace/subdirectory?**
Example: git/, deploy/, testing/
Helps organize related commands
Check the command name:
Validate arguments:
Simple Prompt (no frontmatter):
Analyze this code for performance issues and suggest optimizations.
With Arguments:
---
argument-hint: [file-path]
description: Analyze file for performance issues
---
Analyze the file at $1 for performance issues and suggest optimizations.
With Bash Execution:
---
allowed-tools: Bash(git status:*), Bash(git diff:*)
description: Create a git commit
---
## Current State
- Git status: !`git status`
- Staged changes: !`git diff --staged`
- Recent commits: !`git log --oneline -5`
## Your Task
Based on the above changes, create a git commit with a clear, conventional commit message.
Full-Featured:
---
allowed-tools: Bash(npm run:*), Bash(git add:*), Bash(git commit:*)
argument-hint: [component-name]
description: Create a new React component with tests
model: sonnet
---
# Create React Component
Component name: $1
Execute the following workflow:
1. **Validate Input**
!`test -n "$1" && echo "Creating component: $1" || echo "Error: Component name required"`
2. **Check Existing Files**
!`ls src/components/$1.tsx 2>/dev/null || echo "Component does not exist"`
3. **Create Files**
Create the following files:
- `src/components/$1.tsx`
- `src/components/$1.test.tsx`
- `src/components/$1.module.css`
4. **Run Tests**
After creation, run: !`npm run test -- $1`
Create command structure based on complexity:
Template for Simple Command:
Brief description of what the command does.
[Prompt instructions for Claude]
Template for Command with Frontmatter:
---
argument-hint: [arg1] [arg2]
description: Brief description shown in /help
allowed-tools: Bash(command:*), Read, Write
model: sonnet
disable-model-invocation: false
---
# Command Name
Usage: /command-name [args]
[Detailed instructions]
Structure the workflow with clear steps:
Execute the following workflow:
1. **Step Name**
```bash
# Bash command (if needed)
command arg1 arg2
Next Step [Instructions for Claude]
Final Step
### 6. Add Argument Handling
**All Arguments ($ARGUMENTS):**
```markdown
Fix issue #$ARGUMENTS following our coding standards.
User runs: /fix-issue 123 high-priority
Becomes: "Fix issue #123 high-priority following our coding standards."
Positional Arguments ($1, $2, $3):
Review PR #$1 with priority $2 and assign to $3.
Focus on: $4
User runs: /review-pr 456 high alice security
Becomes individual parameters you can reference separately.
With Defaults:
---
argument-hint: [environment] [branch]
---
Deploy to environment: ${1:-staging}
From branch: ${2:-main}
Use ! prefix to execute commands before processing:
---
allowed-tools: Bash(git:*)
---
## Context
- Current branch: !`git branch --show-current`
- Status: !`git status --short`
- Recent commits: !`git log --oneline -5`
## Your Task
[Instructions based on the above context]
Important:
allowed-tools with specific Bash permissionsUse @ prefix to reference files:
Review the implementation in @src/utils/helpers.js
Compare @src/old-version.js with @src/new-version.js
Analyze all files in @src/components/
For complex problems, trigger extended thinking:
Carefully analyze the following code and think through...
Let's approach this step by step...
Consider all edge cases before implementing...
These keywords can trigger extended thinking mode.
Save to correct location:
Personal command:
~/.claude/commands/command-name.md
~/.claude/commands/category/command-name.md # With namespace
Project command:
.claude/commands/command-name.md
.claude/commands/category/command-name.md # With namespace
Provide testing instructions:
To test your command:
1. Restart Claude Code or start a new session
2. Type: /help
3. Find your command in the list
4. Try: /your-command-name [args]
5. Verify it behaves as expected
Test cases:
# No arguments
/your-command
# With arguments
/your-command arg1
/your-command arg1 arg2
# Edge cases
/your-command ""
/your-command "with spaces"
Field| Purpose| Example
---|---|---
argument-hint| Show expected arguments in autocomplete| [pr-number] [priority]
description| Brief description for /help menu| Review pull request
allowed-tools| Tools command can use| Bash(git:*), Read, Write
model| Specific model to use| claude-sonnet-4-5-20250929
disable-model-invocation| Prevent SlashCommand tool from calling this| true
When using ! prefix or needing bash execution:
---
allowed-tools: Bash(git add:*), Bash(git commit:*), Bash(git push:*)
---
Permission patterns:
Bash(git:*) - All git commandsBash(npm run:*) - All npm run scriptsBash(git add:*), Bash(git commit:*) - Specific git commandsRun tests for: $ARGUMENTS
Usage: /test users api database
Becomes: "Run tests for: users api database"
Deploy $1 to $2 environment with tag $3
Usage: /deploy my-app staging v1.2.3
Becomes: "Deploy my-app to staging environment with tag v1.2.3"
---
argument-hint: <file> [rest of args]
---
Analyze file $1 for: $ARGUMENTS
Usage: /analyze src/app.js performance security
Becomes: "Analyze file src/app.js for: src/app.js performance security"
Note: $ARGUMENTS includes all args, so $1 is duplicated
Better approach:
Analyze file $1 for: ${2:+${@:2}}
This uses $1 separately and remaining args starting from $2
Environment: ${1:-production}
Verbose: ${2:-false}
If too large:
---
allowed-tools: Bash(git:*)
description: Create conventional commit
---
## Context
- Status: !`git status --short`
- Diff: !`git diff HEAD`
Create a conventional commit message.
---
argument-hint: [component-name]
description: Generate React component
---
Create a new React component named $1:
- Component file
- Test file
- Storybook story
---
argument-hint: [file-path]
description: Analyze code complexity
---
Analyze @$1 for:
- Cyclomatic complexity
- Code smells
- Improvement suggestions
---
allowed-tools: Bash(npm:*), Bash(git:*)
argument-hint: [environment]
description: Deploy to environment
---
Deploy to ${1:-staging}:
1. Run tests: !`npm test`
2. Build: !`npm run build`
3. Deploy: !`npm run deploy:$1`
---
argument-hint: [file-pattern]
description: Generate API documentation
---
Generate documentation for: $1
Include:
- Function signatures
- Parameters
- Return types
- Examples
Simple version:
# Convert to TOON
Convert the specified JSON file to TOON v2.0 format with automatic optimization and show token savings.
Usage: /convert-to-toon <file>
Advanced version with bash:
---
allowed-tools: Bash(jq:*), Bash(.claude/skills/toon-formatter/bin/toon:*)
argument-hint: <file> [--delimiter comma|tab|pipe]
description: Convert JSON to TOON format
---
# Convert to TOON
File: $1
Delimiter: ${2:-comma}
1. **Validate**: !`test -f "$1" && jq empty "$1" 2>&1`
2. **Analyze**: !`jq 'if type == "array" then length else 0 end' "$1"`
3. **Convert**: !`.claude/skills/toon-formatter/bin/toon encode "$1"`
4. Show savings comparison
Check:
# List all commands
ls ~/.claude/commands/*.md
ls .claude/commands/*.md
# Verify filename
ls .claude/commands/your-command.md
Remember:
.md) becomes command nameDebug:
Debug: $ARGUMENTS
Debug $1: "$1"
Debug $2: "$2"
Run command and check output to see what's being passed.
Check:
allowed-tools includes correct Bash permissions! prefix: !command``Possible reasons:
.md extension✅ Provide clear argument hints ✅ Include usage examples ✅ Handle errors gracefully ✅ Show progress for long operations ✅ Document expected behavior ✅ Test with various inputs ✅ Use descriptive command names
❌ Make commands too complex (>250 lines) ❌ Forget to specify allowed-tools for Bash ❌ Use unclear argument names ❌ Skip error handling ❌ Hardcode values (use arguments) ❌ Forget to test edge cases
Use Commands when:
Use Skills when:
Can use both:
.claude/skills/ai/claude-code/docs/code_claude_com/docs_en_slash-commands.md.claude/docs/creating-components.md.claude/commands/ directorydevelopment
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 / 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.
development
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.
development
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.
tools
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/AMA/Vancouver), figures/tables, reporting guidelines (CONSORT/STROBE/PRISMA), for research papers and journal submissions.