| name | command-creator |
| description | Creates slash commands for Claude Code following Sando's Golden Rule - only create commands that add intelligent value over bash (analysis, insights, multi-source aggregation, troubleshooting). Use when user requests new slash command or workflow automation that justifies token cost. |
| allowed-tools | Read, Write, Edit, Glob, Bash |
Command Creator Skill
This skill generates slash commands that follow Sando Design System philosophy: only create commands that justify token cost by adding intelligent value.
Guidelines: Single Source of Truth
CRITICAL: Command functionality must respect Sando guidelines when analyzing/validating project artifacts.
Primary Guidelines for Command Logic:
- 02-architecture/MONOREPO_STRUCTURE.md - Turborepo structure, package locations
- 03-development/GIT_WORKFLOW.md - Git status, branch naming, conventional commits
- 05-quality/TEST_COVERAGE.md - Coverage thresholds (>85% unit, 100% a11y)
- 05-quality/PERFORMANCE_BUDGETS.md - Bundle size budgets (<10KB/component)
- 02-architecture/COMPONENT_ARCHITECTURE.md - 7-file structure validation
Full Index: .claude/guidelines/GUIDELINES_INDEX.md
Guideline Priority:
- Sando Guidelines - For validation/analysis logic
- Golden Rule - Only create if adds intelligent value
- Bash Alternative - Always prefer bash if no value added
π― GOLDEN RULE: Command Justification
Before creating ANY slash command, validate:
β NO if only executes bash command
- Wrapper of package.json script
- No analysis or context added
- Example: /build β pnpm build
- Action: Use bash directly (free)
β
YES if adds intelligent value:
β Combines multiple sources
β Analyzes and interprets results
β Generates AI-powered recommendations
β Provides context requiring intelligence
β Debugging/troubleshooting automation
β Example: /status β git + builds + tests + analysis
β
YES if skill shortcut (convenience):
β /new-component faster than full sentence
β Invokes skill explicitly
β Frequent workflow meriting shortcut
Validation Checklist (4 Questions)
1. ΒΏScript exists in package.json?
cat package.json | grep -A 50 '"scripts"'
- SΓ exists β β NO create command, use bash
- NO exists β β Continue
2. ΒΏCommand adds analysis/intelligence?
- NO adds value β β NO create command
- SΓ adds value β β Continue
3. ΒΏCombines multiple sources or provides insights?
- NO combines β β οΈ Probably not worth it
- SΓ combines β β Probably worth it
4. ΒΏUser needs result interpretation?**
- NO needs interpretation β β Bash sufficient
- SΓ needs interpretation β β Command justified
β Examples of GOOD Commands (Add Value)
/status - Multi-Source Analysis
Why good:
- β Combines git status + build artifacts + test results + coverage
- β Analyzes timestamps (detects stale builds per MONOREPO_STRUCTURE.md)
- β Generates actionable recommendations
- β Cannot be replicated with single bash command
/coverage - Intelligent Insights
Why good:
- β Parses complex JSON coverage reports
- β Identifies files <85% per TEST_COVERAGE.md threshold
- β Prioritizes what to test (impact-based)
- β Generates estimated effort
/review-component <name> - 50+ Criteria Checklist
Why good:
- β Validates 7 mandatory files per COMPONENT_ARCHITECTURE.md
- β Checks token consumption (Recipes only per TOKEN_ARCHITECTURE.md)
- β Validates WCAG 2.1 AA per WCAG_COMPLIANCE.md
- β Analyzes test coverage across unit/E2E/a11y per TEST_COVERAGE.md
- β Cannot be done with grep/find alone
β Examples of BAD Commands (No Value)
/build - Simple Wrapper
Why bad:
- β Only executes
pnpm build - β No analysis or intelligence added
- β Wastes tokens for zero value
- β
Alternative: Use
pnpm builddirectly (free)
/test - No Added Value
Why bad:
- β Only executes
pnpm test - β Doesn't parse results or suggest fixes
- β Simple bash wrapper
- β
Alternative: Use
pnpm testdirectly (free)
Command File Structure
Slash commands stored in .claude/commands/category-name/command-name.md:
.claude/commands/
βββ status/
β βββ status.md # /status command
β βββ coverage.md # /coverage command
β βββ why-failing.md # /why-failing command
βββ review/
β βββ component.md # /review-component command
β βββ tokens.md # /review-tokens command
β βββ a11y.md # /review-a11y command
βββ new/
βββ component.md # /new-component command
βββ flavor.md # /new-flavor command
βββ variant.md # /add-variant command
Command Template
Every command file follows this structure:
---
description: Brief description (shown in /help)
allowed-tools: Tool1, Tool2, Tool3
argument-hint: [arg-name (optional)] # If accepts arguments
---
Brief introduction.
# Section 1: Data Gathering
Explain what information to collect from where.
Reference guidelines for validation thresholds.
# Section 2: Analysis
Explain how to interpret data.
Apply guideline standards (TEST_COVERAGE.md thresholds, etc.).
# Section 3: Recommendations
Provide actionable recommendations.
# Output Format
Show example output format.
Command Creation Workflow
Step 1: Validate Against Golden Rule
# Check package.json script
cat package.json | grep -A 50 '"scripts"' | grep "command-name"
# If exists β STOP, use bash
# If not exists β Continue
Step 2: Determine Command Type
- Intelligent analysis? (combines sources + insights)
- Troubleshooting? (diagnoses + suggests fixes)
- Aggregated info? (collects + organizes complex data)
- Skill shortcut? (explicit invocation of existing skill)
- Performance analysis? (metrics + regressions)
If none β β Command NOT justified
Step 3: Determine Command Location
- Status/Info:
.claude/commands/status/ - Review/Analysis:
.claude/commands/review/ - Creation/Generation:
.claude/commands/new/ - Troubleshooting:
.claude/commands/debug/ - Performance:
.claude/commands/performance/
Step 4: Create Command File
Using template structure with guideline references.
Step 5: Add Justification Comment
At end of command file:
---
## π° Token Cost Justification
**Why this command is worth token cost:**
- β
Combines X sources of information
- β
Analyzes per GUIDELINE.md standards (lines X-Y)
- β
Generates Z actionable recommendations
- β
Cannot be done with single bash command
**Estimated tokens per use:** ~XXX tokens
**Value added:** [Specific value]
**ROI:** Positive after X uses
Step 6: Test Command
/command-name [arguments]
# Verify it:
# 1. Executes without errors
# 2. Provides intelligent analysis
# 3. Applies guideline standards correctly
# 4. Generates actionable recommendations
# 5. Justifies token cost
Sando-Specific Command Considerations
1. Three-Layer Token Architecture Awareness
Commands working with tokens must understand per TOKEN_ARCHITECTURE.md:
- Ingredients (primitives, no references)
- Flavors (semantic, reference Ingredients only)
- Recipes (component-specific, reference Flavors only)
Example: /review-tokens validates this architecture
2. Monolithic Component Structure
Commands working with components must validate per COMPONENT_ARCHITECTURE.md:
- 7 mandatory files (implementation, types, stories, unit tests, E2E, a11y, index)
- Token consumption from Recipes layer only
- WCAG 2.1 AA compliance per WCAG_COMPLIANCE.md
Example: /review-component checks all 7 files
3. Quality Thresholds
Commands analyzing quality must apply per guidelines:
- TEST_COVERAGE.md: >85% unit, 100% a11y
- PERFORMANCE_BUDGETS.md: <10KB per component, Core Web Vitals
- WCAG_COMPLIANCE.md: WCAG 2.1 AA, 4.5:1 contrast ratio
Example: /coverage uses TEST_COVERAGE.md thresholds
4. Monorepo Structure
Commands must understand per MONOREPO_STRUCTURE.md:
- Turborepo task orchestration
- pnpm workspaces
- Build dependencies (@sando/tokens β @sando/components)
Example: /status checks build artifact timestamps
β¨ Final Reminder
"El mejor comando es el que no necesitas crear porque bash ya lo hace gratis."
Only create commands that justify token cost through intelligent analysis, multi-source aggregation, troubleshooting automation, or convenience shortcuts to existing skills.
When in doubt: "ΒΏPuedo hacer esto con bash directamente?"
- YES β Use bash (free, no tokens)
- NO β Create command (adds value)