Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 09:04:14 +08:00
commit 70c36b5eff
248 changed files with 47482 additions and 0 deletions

192
commands/add-args-parser.md Normal file
View File

@@ -0,0 +1,192 @@
---
description: Add advanced argument parsing capabilities
argument-hint: [feature] [feature-2] [feature-3] ...
allowed-tools: Task, AskUserQuestion, Bash, Read, Glob
---
---
🚨 **EXECUTION NOTICE FOR CLAUDE**
When you invoke this command via SlashCommand, the system returns THESE INSTRUCTIONS below.
**YOU are the executor. This is NOT an autonomous subprocess.**
- ✅ The phases below are YOUR execution checklist
- ✅ YOU must run each phase immediately using tools (Bash, Read, Write, Edit, TodoWrite)
- ✅ Complete ALL phases before considering this command done
- ❌ DON't wait for "the command to complete" - YOU complete it by executing the phases
- ❌ DON't treat this as status output - it IS your instruction set
**Immediately after SlashCommand returns, start executing Phase 0, then Phase 1, etc.**
See `@CLAUDE.md` section "SlashCommand Execution - YOU Are The Executor" for detailed explanation.
---
**Arguments**: $ARGUMENTS
Goal: Orchestrate adding argument parsing features to CLI tool, launching parallel agents for 3+ parsing features.
**Architectural Context:**
This command is an **orchestrator** that:
- Detects the CLI framework
- Gathers requirements
- Launches 1 agent for 1-2 parsing features
- Launches MULTIPLE agents IN PARALLEL for 3+ parsing features (all in ONE message)
Phase 1: Load Architectural Framework
Goal: Understand composition and parallelization patterns
Actions:
- Load component decision framework:
!{Read ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/docs/frameworks/claude/reference/component-decision-framework.md}
- Key patterns:
- Commands orchestrate, agents implement
- For 3+ items: Launch multiple agents in PARALLEL
- Send ALL Task() calls in SINGLE message
- Agents run concurrently for faster execution
Phase 2: Parse Arguments & Determine Mode
Goal: Count how many parsing features to implement
Actions:
- Parse $ARGUMENTS to extract parsing features:
!{bash echo "$ARGUMENTS" | wc -w}
- Store count
- Extract each parsing feature:
- If count = 0: Ask user for feature preferences
- If count = 1: Single feature mode
- If count = 2: Two features mode
- If count >= 3: **PARALLEL MODE** - multiple agents
Phase 3: Detect Existing CLI Framework
Goal: Identify the framework to match patterns
Actions:
- Check for language indicators:
- !{bash ls -1 package.json setup.py pyproject.toml go.mod Cargo.toml 2>/dev/null | head -1}
- For Node.js (package.json found):
- !{bash grep -E '"(commander|yargs|oclif|gluegun)"' package.json 2>/dev/null | head -1}
- For Python files:
- !{bash grep -r "import click\|import typer\|import argparse\|import fire" . --include="*.py" 2>/dev/null | head -1}
- For Go:
- !{bash grep -r "github.com/spf13/cobra\|github.com/urfave/cli" . --include="*.go" 2>/dev/null | head -1}
- For Rust:
- !{bash grep "clap" Cargo.toml 2>/dev/null}
- Store detected framework
Phase 4: Gather Requirements (for all parsing features)
Goal: Collect specifications
Actions:
- If no features in $ARGUMENTS:
- Ask user via AskUserQuestion:
- Which parsing features? (positional-args, flags, options, type-coercion, validators, mutually-exclusive, environment-vars)
- Type validation needed? (string, int, float, file, url, email, enum)
- Advanced features? (subcommands, variadic args, dependent options)
- Help generation preferences?
- For EACH feature from Phase 2:
- Store feature type
- Determine validation requirements
- Plan integration approach
Phase 5: Launch Agent(s) for Implementation
Goal: Delegate to cli-feature-impl agent(s)
Actions:
**Decision: 1-2 features = single/sequential agents, 3+ features = PARALLEL agents**
**For 1-2 Parsing Features:**
Task(
description="Add argument parsing to CLI",
subagent_type="cli-tool-builder:cli-feature-impl",
prompt="You are cli-feature-impl. Add comprehensive argument parsing to the CLI.
Framework: {detected_framework}
Language: {detected_language}
Parsing Features: {features}
Requirements:
- Positional arguments: {yes/no}
- Options/Flags: {short/long forms}
- Type coercion: {types (string, int, float, file, url, email, enum)}
- Validators: {validation_requirements}
- Advanced features: {mutually-exclusive, dependent-options, variadic, env-vars}
- Help generation: {auto-generate with examples}
Use Skill(cli-tool-builder:{framework}-patterns) for patterns.
Generate argument parsing code, validators, help text.
Deliverable: Working argument parsing integrated into CLI"
)
**For 3+ Parsing Features - CRITICAL: Send ALL Task() calls in ONE MESSAGE:**
Task(description="Add parsing feature 1", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add argument parsing feature '{feature_1}'.
Framework: {framework}
Language: {language}
Feature type: {feature_1}
Validation: {validation_1}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Argument parsing code for {feature_1}")
Task(description="Add parsing feature 2", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add argument parsing feature '{feature_2}'.
Framework: {framework}
Language: {language}
Feature type: {feature_2}
Validation: {validation_2}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Argument parsing code for {feature_2}")
Task(description="Add parsing feature 3", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add argument parsing feature '{feature_3}'.
Framework: {framework}
Language: {language}
Feature type: {feature_3}
Validation: {validation_3}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Argument parsing code for {feature_3}")
[Continue for all N parsing features...]
**DO NOT wait between Task() calls - send them ALL at once!**
Agents run in parallel. Proceed to Phase 6 only after ALL complete.
Phase 6: Verification
Goal: Confirm all parsing features were added
Actions:
- For each parsing feature:
- Verify parsing code was generated
- Check syntax if possible
- Test with valid arguments
- Test validation with invalid inputs
- Verify mutually exclusive options work (if applicable)
- Test environment variable fallbacks (if added)
- Test help generation
- Report any failures
Phase 7: Summary
Goal: Report results and next steps
Actions:
- Display summary:
- Parsing features added: {count}
- Framework: {framework}
- Files modified/created
- Validators included
- Advanced features enabled
- Show usage examples:
- Positional arguments
- Options and flags
- Type validation
- Help command output
- Suggest next steps:
- Add more validators
- Implement command aliases
- Add bash/zsh completion
- Document all arguments in README

189
commands/add-config.md Normal file
View File

@@ -0,0 +1,189 @@
---
description: Add configuration file management (JSON, YAML, TOML, env)
argument-hint: [config-type] [config-type-2] [config-type-3] ...
allowed-tools: Task, AskUserQuestion, Bash, Read, Glob
---
---
🚨 **EXECUTION NOTICE FOR CLAUDE**
When you invoke this command via SlashCommand, the system returns THESE INSTRUCTIONS below.
**YOU are the executor. This is NOT an autonomous subprocess.**
- ✅ The phases below are YOUR execution checklist
- ✅ YOU must run each phase immediately using tools (Bash, Read, Write, Edit, TodoWrite)
- ✅ Complete ALL phases before considering this command done
- ❌ DON't wait for "the command to complete" - YOU complete it by executing the phases
- ❌ DON't treat this as status output - it IS your instruction set
**Immediately after SlashCommand returns, start executing Phase 0, then Phase 1, etc.**
See `@CLAUDE.md` section "SlashCommand Execution - YOU Are The Executor" for detailed explanation.
---
**Arguments**: $ARGUMENTS
Goal: Orchestrate adding configuration file support to CLI tool, launching parallel agents for 3+ config types.
**Architectural Context:**
This command is an **orchestrator** that:
- Detects the CLI framework
- Gathers requirements
- Launches 1 agent for 1-2 config types
- Launches MULTIPLE agents IN PARALLEL for 3+ config types (all in ONE message)
Phase 1: Load Architectural Framework
Goal: Understand composition and parallelization patterns
Actions:
- Load component decision framework:
!{Read ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/docs/frameworks/claude/reference/component-decision-framework.md}
- Key patterns:
- Commands orchestrate, agents implement
- For 3+ items: Launch multiple agents in PARALLEL
- Send ALL Task() calls in SINGLE message
- Agents run concurrently for faster execution
Phase 2: Parse Arguments & Determine Mode
Goal: Count how many config types to implement
Actions:
- Parse $ARGUMENTS to extract config types:
!{bash echo "$ARGUMENTS" | wc -w}
- Store count
- Extract each config type:
- If count = 0: Ask user for config type preference
- If count = 1: Single config type mode
- If count = 2: Two config types mode
- If count >= 3: **PARALLEL MODE** - multiple agents
Phase 3: Detect Existing CLI Framework
Goal: Identify the framework to match patterns
Actions:
- Check for language indicators:
- !{bash ls -1 package.json setup.py pyproject.toml go.mod Cargo.toml 2>/dev/null | head -1}
- For Node.js (package.json found):
- !{bash grep -E '"(commander|yargs|oclif|gluegun)"' package.json 2>/dev/null | head -1}
- For Python files:
- !{bash grep -r "import click\|import typer\|import argparse\|import fire" . --include="*.py" 2>/dev/null | head -1}
- For Go:
- !{bash grep -r "github.com/spf13/cobra\|github.com/urfave/cli" . --include="*.go" 2>/dev/null | head -1}
- For Rust:
- !{bash grep "clap" Cargo.toml 2>/dev/null}
- Store detected framework
Phase 4: Gather Requirements (for all config types)
Goal: Collect specifications
Actions:
- If no config types in $ARGUMENTS:
- Ask user via AskUserQuestion:
- Which config formats? (JSON, YAML, TOML, env, rc)
- Config locations preference? (~/.config/toolname or .toolnamerc)
- Which settings should be configurable?
- Support environment variable overrides?
- Need config validation schemas?
- Interactive config wizard desired?
- For EACH config type from Phase 2:
- Store config type (json, yaml, toml, env, rc)
- Determine priority in cascading config system
- Plan validation approach
Phase 5: Launch Agent(s) for Implementation
Goal: Delegate to cli-feature-impl agent(s)
Actions:
**Decision: 1-2 config types = single/sequential agents, 3+ config types = PARALLEL agents**
**For 1-2 Config Types:**
Task(
description="Add config support to CLI",
subagent_type="cli-tool-builder:cli-feature-impl",
prompt="You are cli-feature-impl. Add configuration file support to the CLI.
Framework: {detected_framework}
Language: {detected_language}
Config Type: {config_type}
Requirements:
- Config format: {format (json/yaml/toml/env)}
- Config locations: {locations}
- Cascading priority: CLI flags > env vars > project config > user config > system config > defaults
- Environment variable overrides: {yes/no}
- Validation: {validation_approach}
- Interactive wizard: {yes/no}
Use Skill(cli-tool-builder:{framework}-patterns) for patterns.
Generate config loader, validation, example files.
Deliverable: Working configuration system integrated into CLI"
)
**For 3+ Config Types - CRITICAL: Send ALL Task() calls in ONE MESSAGE:**
Task(description="Add config type 1", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add config support for '{type_1}'.
Framework: {framework}
Config format: {format_1}
Priority level: {priority_1}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Config loader for {type_1}")
Task(description="Add config type 2", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add config support for '{type_2}'.
Framework: {framework}
Config format: {format_2}
Priority level: {priority_2}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Config loader for {type_2}")
Task(description="Add config type 3", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add config support for '{type_3}'.
Framework: {framework}
Config format: {format_3}
Priority level: {priority_3}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Config loader for {type_3}")
[Continue for all N config types...]
**DO NOT wait between Task() calls - send them ALL at once!**
Agents run in parallel. Proceed to Phase 6 only after ALL complete.
Phase 6: Verification
Goal: Confirm all config types were added
Actions:
- For each config type:
- Verify config loader code was generated
- Check syntax if possible
- Test config loading from different locations
- Verify environment variable overrides work
- Test cascading priority (CLI flags > env > project > user > system > defaults)
- Verify validation works for malformed configs
- Report any failures
Phase 7: Summary
Goal: Report results and next steps
Actions:
- Display summary:
- Config types added: {count}
- Framework: {framework}
- Files modified/created
- Config locations supported
- Cascading priority order
- Show usage examples:
- Creating config file
- Environment variable naming
- Interactive wizard (if added)
- Suggest next steps:
- Add config options to CLI flags
- Implement config validation tests
- Document config options in --help output
- Add config file templates to repo

190
commands/add-interactive.md Normal file
View File

@@ -0,0 +1,190 @@
---
description: Add interactive prompts and menus
argument-hint: [prompt-type] [prompt-type-2] [prompt-type-3] ...
allowed-tools: Task, AskUserQuestion, Bash, Read, Glob
---
---
🚨 **EXECUTION NOTICE FOR CLAUDE**
When you invoke this command via SlashCommand, the system returns THESE INSTRUCTIONS below.
**YOU are the executor. This is NOT an autonomous subprocess.**
- ✅ The phases below are YOUR execution checklist
- ✅ YOU must run each phase immediately using tools (Bash, Read, Write, Edit, TodoWrite)
- ✅ Complete ALL phases before considering this command done
- ❌ DON't wait for "the command to complete" - YOU complete it by executing the phases
- ❌ DON't treat this as status output - it IS your instruction set
**Immediately after SlashCommand returns, start executing Phase 0, then Phase 1, etc.**
See `@CLAUDE.md` section "SlashCommand Execution - YOU Are The Executor" for detailed explanation.
---
**Arguments**: $ARGUMENTS
Goal: Orchestrate adding interactive prompt capabilities to CLI tool, launching parallel agents for 3+ prompt types.
**Architectural Context:**
This command is an **orchestrator** that:
- Detects the CLI framework
- Gathers requirements
- Launches 1 agent for 1-2 prompt types
- Launches MULTIPLE agents IN PARALLEL for 3+ prompt types (all in ONE message)
Phase 1: Load Architectural Framework
Goal: Understand composition and parallelization patterns
Actions:
- Load component decision framework:
!{Read ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/docs/frameworks/claude/reference/component-decision-framework.md}
- Key patterns:
- Commands orchestrate, agents implement
- For 3+ items: Launch multiple agents in PARALLEL
- Send ALL Task() calls in SINGLE message
- Agents run concurrently for faster execution
Phase 2: Parse Arguments & Determine Mode
Goal: Count how many prompt types to implement
Actions:
- Parse $ARGUMENTS to extract prompt types:
!{bash echo "$ARGUMENTS" | wc -w}
- Store count
- Extract each prompt type:
- If count = 0: Ask user for prompt type preference
- If count = 1: Single prompt type mode
- If count = 2: Two prompt types mode
- If count >= 3: **PARALLEL MODE** - multiple agents
Phase 3: Detect Existing CLI Framework
Goal: Identify the framework and language
Actions:
- Check for language indicators:
- !{bash ls -1 package.json setup.py pyproject.toml go.mod Cargo.toml 2>/dev/null | head -1}
- For Node.js (package.json found):
- !{bash grep -E '"(commander|yargs|oclif|gluegun)"' package.json 2>/dev/null | head -1}
- For Python files:
- !{bash grep -r "import click\|import typer\|import argparse\|import fire" . --include="*.py" 2>/dev/null | head -1}
- For Go:
- !{bash grep -r "github.com/spf13/cobra\|github.com/urfave/cli" . --include="*.go" 2>/dev/null | head -1}
- For Rust:
- !{bash grep "clap" Cargo.toml 2>/dev/null}
- Store detected framework and language
Phase 4: Gather Requirements (for all prompt types)
Goal: Collect specifications
Actions:
- If no prompt types in $ARGUMENTS:
- Ask user via AskUserQuestion:
- Which prompt types? (text, select, checkbox, password, confirm, number, editor, path)
- Interactive wizard needed?
- Validation patterns required?
- Conditional logic needed?
- For EACH prompt type from Phase 2:
- Store prompt type (text, select, checkbox, password, confirm, number, editor, path)
- Determine validation requirements
- Plan conditional logic (if applicable)
Phase 5: Launch Agent(s) for Implementation
Goal: Delegate to cli-feature-impl agent(s)
Actions:
**Decision: 1-2 prompt types = single/sequential agents, 3+ prompt types = PARALLEL agents**
**For 1-2 Prompt Types:**
Task(
description="Add interactive prompts to CLI",
subagent_type="cli-tool-builder:cli-feature-impl",
prompt="You are cli-feature-impl. Add interactive prompt capabilities to the CLI.
Framework: {detected_framework}
Language: {detected_language}
Prompt Type: {prompt_type}
Requirements:
- Library to use: {inquirer for Node.js, questionary for Python}
- Prompt type: {text/select/checkbox/password/confirm/number/editor/path}
- Validation: {validation_requirements}
- Conditional logic: {yes/no}
- Interactive wizard: {yes/no}
Use Skill(cli-tool-builder:{framework}-patterns) for patterns.
Use Skill(cli-tool-builder:inquirer-patterns) for interactive prompt patterns.
Generate prompt code, validation, example files.
Deliverable: Working interactive prompts integrated into CLI"
)
**For 3+ Prompt Types - CRITICAL: Send ALL Task() calls in ONE MESSAGE:**
Task(description="Add prompt type 1", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add interactive prompt for '{type_1}'.
Framework: {framework}
Language: {language}
Prompt type: {type_1}
Validation: {validation_1}
Use Skill(cli-tool-builder:inquirer-patterns).
Deliverable: Interactive prompt code for {type_1}")
Task(description="Add prompt type 2", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add interactive prompt for '{type_2}'.
Framework: {framework}
Language: {language}
Prompt type: {type_2}
Validation: {validation_2}
Use Skill(cli-tool-builder:inquirer-patterns).
Deliverable: Interactive prompt code for {type_2}")
Task(description="Add prompt type 3", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add interactive prompt for '{type_3}'.
Framework: {framework}
Language: {language}
Prompt type: {type_3}
Validation: {validation_3}
Use Skill(cli-tool-builder:inquirer-patterns).
Deliverable: Interactive prompt code for {type_3}")
[Continue for all N prompt types...]
**DO NOT wait between Task() calls - send them ALL at once!**
Agents run in parallel. Proceed to Phase 6 only after ALL complete.
Phase 6: Verification
Goal: Confirm all prompt types were added
Actions:
- For each prompt type:
- Verify prompt code was generated
- Check syntax if possible
- Test prompt with valid inputs
- Test validation with invalid inputs
- Verify conditional logic works (if applicable)
- Test interactive wizard flow (if added)
- Report any failures
Phase 7: Summary
Goal: Report results and next steps
Actions:
- Display summary:
- Prompt types added: {count}
- Framework: {framework}
- Library installed: {inquirer/questionary}
- Files modified/created
- Validation patterns included
- Show usage examples:
- Running interactive prompts
- Validation patterns
- Conditional logic examples
- Suggest next steps:
- Integrate prompts into subcommands
- Add keyboard shortcuts
- Implement multi-step wizards
- Add accessibility features

View File

@@ -0,0 +1,192 @@
---
description: Add rich terminal output (colors, tables, spinners)
argument-hint: [format-type] [format-type-2] [format-type-3] ...
allowed-tools: Task, AskUserQuestion, Bash, Read, Glob
---
---
🚨 **EXECUTION NOTICE FOR CLAUDE**
When you invoke this command via SlashCommand, the system returns THESE INSTRUCTIONS below.
**YOU are the executor. This is NOT an autonomous subprocess.**
- ✅ The phases below are YOUR execution checklist
- ✅ YOU must run each phase immediately using tools (Bash, Read, Write, Edit, TodoWrite)
- ✅ Complete ALL phases before considering this command done
- ❌ DON't wait for "the command to complete" - YOU complete it by executing the phases
- ❌ DON't treat this as status output - it IS your instruction set
**Immediately after SlashCommand returns, start executing Phase 0, then Phase 1, etc.**
See `@CLAUDE.md` section "SlashCommand Execution - YOU Are The Executor" for detailed explanation.
---
**Arguments**: $ARGUMENTS
Goal: Orchestrate adding output formatting capabilities to CLI tool, launching parallel agents for 3+ format types.
**Architectural Context:**
This command is an **orchestrator** that:
- Detects the CLI framework
- Gathers requirements
- Launches 1 agent for 1-2 format types
- Launches MULTIPLE agents IN PARALLEL for 3+ format types (all in ONE message)
Phase 1: Load Architectural Framework
Goal: Understand composition and parallelization patterns
Actions:
- Load component decision framework:
!{Read ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/docs/frameworks/claude/reference/component-decision-framework.md}
- Key patterns:
- Commands orchestrate, agents implement
- For 3+ items: Launch multiple agents in PARALLEL
- Send ALL Task() calls in SINGLE message
- Agents run concurrently for faster execution
Phase 2: Parse Arguments & Determine Mode
Goal: Count how many output format types to implement
Actions:
- Parse $ARGUMENTS to extract format types:
!{bash echo "$ARGUMENTS" | wc -w}
- Store count
- Extract each format type:
- If count = 0: Ask user for format type preference
- If count = 1: Single format type mode
- If count = 2: Two format types mode
- If count >= 3: **PARALLEL MODE** - multiple agents
Phase 3: Detect Existing CLI Framework
Goal: Identify the framework and language
Actions:
- Check for language indicators:
- !{bash ls -1 package.json setup.py pyproject.toml go.mod Cargo.toml 2>/dev/null | head -1}
- For Node.js (package.json found):
- !{bash grep -E '"(commander|yargs|oclif|gluegun)"' package.json 2>/dev/null | head -1}
- For Python files:
- !{bash grep -r "import click\|import typer\|import argparse\|import fire" . --include="*.py" 2>/dev/null | head -1}
- For Go:
- !{bash grep -r "github.com/spf13/cobra\|github.com/urfave/cli" . --include="*.go" 2>/dev/null | head -1}
- For Rust:
- !{bash grep "clap" Cargo.toml 2>/dev/null}
- Store detected framework and language
Phase 4: Gather Requirements (for all format types)
Goal: Collect specifications
Actions:
- If no format types in $ARGUMENTS:
- Ask user via AskUserQuestion:
- Which format types? (colors, tables, spinners, progress-bars, boxes, icons, panels, syntax-highlighting)
- Cross-platform support needed?
- Unicode or ASCII output?
- Specific styling preferences?
- For EACH format type from Phase 2:
- Store format type (colors, tables, spinners, progress-bars, boxes, icons, panels, syntax-highlighting)
- Determine library requirements
- Plan styling approach
Phase 5: Launch Agent(s) for Implementation
Goal: Delegate to cli-feature-impl agent(s)
Actions:
**Decision: 1-2 format types = single/sequential agents, 3+ format types = PARALLEL agents**
**For 1-2 Format Types:**
Task(
description="Add output formatting to CLI",
subagent_type="cli-tool-builder:cli-feature-impl",
prompt="You are cli-feature-impl. Add rich output formatting to the CLI.
Framework: {detected_framework}
Language: {detected_language}
Format Types: {format_types}
Requirements:
- Libraries: {chalk/ora/cli-table3 for Node.js, rich/colorama/tqdm for Python}
- Format types: {colors/tables/spinners/progress-bars/boxes/icons/panels/syntax-highlighting}
- Cross-platform: {yes/no}
- Unicode or ASCII: {unicode/ascii/both}
- Styling: {styling_preferences}
Use Skill(cli-tool-builder:{framework}-patterns) for patterns.
Generate output formatting utilities, examples, documentation.
Deliverable: Working output formatting integrated into CLI"
)
**For 3+ Format Types - CRITICAL: Send ALL Task() calls in ONE MESSAGE:**
Task(description="Add format type 1", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add output formatting for '{type_1}'.
Framework: {framework}
Language: {language}
Format type: {type_1}
Library: {library_1}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Output formatting code for {type_1}")
Task(description="Add format type 2", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add output formatting for '{type_2}'.
Framework: {framework}
Language: {language}
Format type: {type_2}
Library: {library_2}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Output formatting code for {type_2}")
Task(description="Add format type 3", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add output formatting for '{type_3}'.
Framework: {framework}
Language: {language}
Format type: {type_3}
Library: {library_3}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Output formatting code for {type_3}")
[Continue for all N format types...]
**DO NOT wait between Task() calls - send them ALL at once!**
Agents run in parallel. Proceed to Phase 6 only after ALL complete.
Phase 6: Verification
Goal: Confirm all format types were added
Actions:
- For each format type:
- Verify formatting code was generated
- Check syntax if possible
- Test output rendering
- Verify cross-platform compatibility (if required)
- Test combined formatting (colors + tables, spinners + progress, etc.)
- Verify library dependencies installed
- Report any failures
Phase 7: Summary
Goal: Report results and next steps
Actions:
- Display summary:
- Format types added: {count}
- Framework: {framework}
- Libraries installed: {libraries with versions}
- Files modified/created
- Unicode/ASCII support
- Show usage examples:
- Colored output
- Table formatting
- Spinners and progress bars
- Boxed messages
- Icons and symbols
- Suggest next steps:
- Create output utility module
- Add formatting to existing commands
- Implement log levels with colors
- Add terminal width detection
- Support NO_COLOR environment variable

200
commands/add-package.md Normal file
View File

@@ -0,0 +1,200 @@
---
description: Setup distribution packaging (npm, PyPI, Homebrew)
argument-hint: [platform] [platform-2] [platform-3] ...
allowed-tools: Task, AskUserQuestion, Bash, Read, Glob
---
---
🚨 **EXECUTION NOTICE FOR CLAUDE**
When you invoke this command via SlashCommand, the system returns THESE INSTRUCTIONS below.
**YOU are the executor. This is NOT an autonomous subprocess.**
- ✅ The phases below are YOUR execution checklist
- ✅ YOU must run each phase immediately using tools (Bash, Read, Write, Edit, TodoWrite)
- ✅ Complete ALL phases before considering this command done
- ❌ DON't wait for "the command to complete" - YOU complete it by executing the phases
- ❌ DON't treat this as status output - it IS your instruction set
**Immediately after SlashCommand returns, start executing Phase 0, then Phase 1, etc.**
See `@CLAUDE.md` section "SlashCommand Execution - YOU Are The Executor" for detailed explanation.
---
**Arguments**: $ARGUMENTS
Goal: Orchestrate setting up distribution packaging for CLI tool, launching parallel agents for 3+ platforms.
**Architectural Context:**
This command is an **orchestrator** that:
- Detects the CLI framework
- Gathers requirements
- Launches 1 agent for 1-2 distribution platforms
- Launches MULTIPLE agents IN PARALLEL for 3+ platforms (all in ONE message)
Phase 1: Load Architectural Framework
Goal: Understand composition and parallelization patterns
Actions:
- Load component decision framework:
!{Read ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/docs/frameworks/claude/reference/component-decision-framework.md}
- Key patterns:
- Commands orchestrate, agents implement
- For 3+ items: Launch multiple agents in PARALLEL
- Send ALL Task() calls in SINGLE message
- Agents run concurrently for faster execution
Phase 2: Parse Arguments & Determine Mode
Goal: Count how many distribution platforms to configure
Actions:
- Parse $ARGUMENTS to extract platforms:
!{bash echo "$ARGUMENTS" | wc -w}
- Store count
- Extract each platform:
- If count = 0: Ask user for platform preference
- If count = 1: Single platform mode
- If count = 2: Two platforms mode
- If count >= 3: **PARALLEL MODE** - multiple agents
Phase 3: Detect Existing CLI Framework
Goal: Identify the framework and language
Actions:
- Check for language indicators:
- !{bash ls -1 package.json setup.py pyproject.toml go.mod Cargo.toml 2>/dev/null | head -1}
- For Node.js (package.json found):
- !{bash grep -E '"(commander|yargs|oclif|gluegun)"' package.json 2>/dev/null | head -1}
- For Python files:
- !{bash grep -r "import click\|import typer\|import argparse\|import fire" . --include="*.py" 2>/dev/null | head -1}
- For Go:
- !{bash grep -r "github.com/spf13/cobra\|github.com/urfave/cli" . --include="*.go" 2>/dev/null | head -1}
- For Rust:
- !{bash grep "clap" Cargo.toml 2>/dev/null}
- Store detected framework and language
Phase 4: Gather Requirements (for all platforms)
Goal: Collect specifications
Actions:
- If no platforms in $ARGUMENTS:
- Ask user via AskUserQuestion:
- Which distribution platforms? (npm, pypi, homebrew, binary, cargo, go-install)
- CLI tool name?
- Current version? (default: 0.1.0)
- GitHub repository URL? (for releases)
- Automated releases via GitHub Actions?
- For EACH platform from Phase 2:
- Store platform type (npm, pypi, homebrew, binary, cargo, go-install)
- Determine version management approach
- Plan release automation
Phase 5: Launch Agent(s) for Implementation
Goal: Delegate to cli-feature-impl agent(s)
Actions:
**Decision: 1-2 platforms = single/sequential agents, 3+ platforms = PARALLEL agents**
**For 1-2 Distribution Platforms:**
Task(
description="Add package distribution to CLI",
subagent_type="cli-tool-builder:cli-feature-impl",
prompt="You are cli-feature-impl. Add distribution packaging to the CLI.
Framework: {detected_framework}
Language: {detected_language}
Distribution Platforms: {platforms}
Requirements:
- Platforms: {npm/pypi/homebrew/binary/cargo/go-install}
- CLI tool name: {tool_name}
- Version: {version}
- GitHub repo: {github_url}
- Automated releases: {yes/no}
- Version management: {standard-version/bump2version/goreleaser}
Use Skill(cli-tool-builder:{framework}-patterns) for patterns.
Generate package configuration, release workflows, installation docs.
Deliverable: Working package distribution setup for CLI"
)
**For 3+ Distribution Platforms - CRITICAL: Send ALL Task() calls in ONE MESSAGE:**
Task(description="Add platform 1", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add distribution packaging for '{platform_1}'.
Framework: {framework}
Language: {language}
Platform: {platform_1}
Tool name: {tool_name}
Version: {version}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Package config for {platform_1}")
Task(description="Add platform 2", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add distribution packaging for '{platform_2}'.
Framework: {framework}
Language: {language}
Platform: {platform_2}
Tool name: {tool_name}
Version: {version}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Package config for {platform_2}")
Task(description="Add platform 3", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add distribution packaging for '{platform_3}'.
Framework: {framework}
Language: {language}
Platform: {platform_3}
Tool name: {tool_name}
Version: {version}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Package config for {platform_3}")
[Continue for all N platforms...]
**DO NOT wait between Task() calls - send them ALL at once!**
Agents run in parallel. Proceed to Phase 6 only after ALL complete.
Phase 6: Verification
Goal: Confirm all platforms were configured
Actions:
- For each platform:
- Verify package configuration was generated
- Check syntax if possible
- Test build process (if applicable)
- Verify version management works
- Test release workflow (dry-run if applicable)
- Verify installation documentation complete
- Report any failures
Phase 7: Summary
Goal: Report results and next steps
Actions:
- Display summary:
- Platforms configured: {count}
- Framework: {framework}
- Tool name: {tool_name}
- Version: {version}
- Files modified/created
- Release automation configured
- Show installation commands for each platform:
- npm: npm install -g {tool_name}
- PyPI: pip install {tool_name}
- Homebrew: brew install {user}/{tap}/{tool_name}
- Binary: Download and install instructions
- Cargo: cargo install {tool_name}
- Go: go install github.com/{user}/{tool_name}@latest
- Suggest next steps:
- Test package installation locally
- Create initial release tag
- Update documentation with badges
- Set up CI/CD secrets for automated publishing
- Test version bumping workflow
- Create CHANGELOG.md

171
commands/add-subcommand.md Normal file
View File

@@ -0,0 +1,171 @@
---
description: Add structured subcommands to CLI tool
argument-hint: <command-name> [command-2] [command-3] ...
allowed-tools: Task, AskUserQuestion, Bash, Read, Glob
---
---
🚨 **EXECUTION NOTICE FOR CLAUDE**
When you invoke this command via SlashCommand, the system returns THESE INSTRUCTIONS below.
**YOU are the executor. This is NOT an autonomous subprocess.**
- ✅ The phases below are YOUR execution checklist
- ✅ YOU must run each phase immediately using tools (Bash, Read, Write, Edit, TodoWrite)
- ✅ Complete ALL phases before considering this command done
- ❌ DON't wait for "the command to complete" - YOU complete it by executing the phases
- ❌ DON't treat this as status output - it IS your instruction set
**Immediately after SlashCommand returns, start executing Phase 0, then Phase 1, etc.**
See `@CLAUDE.md` section "SlashCommand Execution - YOU Are The Executor" for detailed explanation.
---
**Arguments**: $ARGUMENTS
Goal: Orchestrate adding one or multiple subcommands to a CLI tool, launching parallel agents for 3+ subcommands.
**Architectural Context:**
This command is an **orchestrator** that:
- Detects the CLI framework
- Gathers requirements
- Launches 1 agent for 1-2 subcommands
- Launches MULTIPLE agents IN PARALLEL for 3+ subcommands (all in ONE message)
Phase 1: Load Architectural Framework
Goal: Understand composition and parallelization patterns
Actions:
- Load component decision framework:
!{Read ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/docs/frameworks/claude/reference/component-decision-framework.md}
- Key patterns:
- Commands orchestrate, agents implement
- For 3+ items: Launch multiple agents in PARALLEL
- Send ALL Task() calls in SINGLE message
- Agents run concurrently for faster execution
Phase 2: Parse Arguments & Determine Mode
Goal: Count how many subcommands to create
Actions:
- Parse $ARGUMENTS to extract subcommand names:
!{bash echo "$ARGUMENTS" | wc -w}
- Store count
- Extract each subcommand name:
- If count = 1: Single subcommand mode
- If count = 2: Two subcommands mode
- If count >= 3: **PARALLEL MODE** - multiple agents
Phase 3: Detect Existing CLI Framework
Goal: Identify the framework to match patterns
Actions:
- Check for language indicators:
- !{bash ls -1 package.json setup.py pyproject.toml go.mod Cargo.toml 2>/dev/null | head -1}
- For Node.js (package.json found):
- !{bash grep -E '"(commander|yargs|oclif|gluegun)"' package.json 2>/dev/null | head -1}
- For Python files:
- !{bash grep -r "import click\|import typer\|import argparse\|import fire" . --include="*.py" 2>/dev/null | head -1}
- For Go:
- !{bash grep -r "github.com/spf13/cobra\|github.com/urfave/cli" . --include="*.go" 2>/dev/null | head -1}
- For Rust:
- !{bash grep "clap" Cargo.toml 2>/dev/null}
- Store detected framework
Phase 4: Gather Requirements (for all subcommands)
Goal: Collect specifications
Actions:
- For EACH subcommand name from Phase 2:
- Ask user via AskUserQuestion:
- Description/purpose
- Required arguments
- Optional flags
- Validation needs
- Store requirements for that subcommand
Phase 5: Launch Agent(s) for Implementation
Goal: Delegate to cli-feature-impl agent(s)
Actions:
**Decision: 1-2 subcommands = single/sequential agents, 3+ subcommands = PARALLEL agents**
**For 1-2 Subcommands:**
Task(
description="Add subcommand to CLI",
subagent_type="cli-tool-builder:cli-feature-impl",
prompt="You are cli-feature-impl. Add subcommand '{name}' to the CLI.
Framework: {detected_framework}
Language: {detected_language}
Subcommand: {name}
Description: {description}
Arguments: {arguments}
Flags: {flags}
Use Skill(cli-tool-builder:{framework}-patterns) for patterns.
Generate code, integrate it, test syntax.
Deliverable: Working subcommand integrated into CLI"
)
**For 3+ Subcommands - CRITICAL: Send ALL Task() calls in ONE MESSAGE:**
Task(description="Add subcommand 1", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add subcommand '{name_1}'.
Framework: {framework}
Description: {desc_1}
Arguments: {args_1}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Subcommand 1 code")
Task(description="Add subcommand 2", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add subcommand '{name_2}'.
Framework: {framework}
Description: {desc_2}
Arguments: {args_2}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Subcommand 2 code")
Task(description="Add subcommand 3", subagent_type="cli-tool-builder:cli-feature-impl", prompt="Add subcommand '{name_3}'.
Framework: {framework}
Description: {desc_3}
Arguments: {args_3}
Use Skill(cli-tool-builder:{framework}-patterns).
Deliverable: Subcommand 3 code")
[Continue for all N subcommands...]
**DO NOT wait between Task() calls - send them ALL at once!**
Agents run in parallel. Proceed to Phase 6 only after ALL complete.
Phase 6: Verification
Goal: Confirm all subcommands were added
Actions:
- For each subcommand:
- Verify code was generated
- Check syntax if possible
- Test help output
- Report any failures
Phase 7: Summary
Goal: Report results and next steps
Actions:
- Display summary:
- Subcommands added: {count}
- Framework: {framework}
- Files modified/created
- Show usage examples for each subcommand
- Suggest next steps:
- Test each subcommand
- Add interactive prompts: /cli-tool-builder:add-interactive
- Add output formatting: /cli-tool-builder:add-output-formatting
- Add validation: /cli-tool-builder:add-args-parser

160
commands/new-cli.md Normal file
View File

@@ -0,0 +1,160 @@
---
description: Initialize new CLI tool project with framework selection
argument-hint: <tool-name>
allowed-tools: Task, AskUserQuestion, Bash, Read
---
---
🚨 **EXECUTION NOTICE FOR CLAUDE**
When you invoke this command via SlashCommand, the system returns THESE INSTRUCTIONS below.
**YOU are the executor. This is NOT an autonomous subprocess.**
- ✅ The phases below are YOUR execution checklist
- ✅ YOU must run each phase immediately using tools (Bash, Read, Write, Edit, TodoWrite)
- ✅ Complete ALL phases before considering this command done
- ❌ DON't wait for "the command to complete" - YOU complete it by executing the phases
- ❌ DON't treat this as status output - it IS your instruction set
**Immediately after SlashCommand returns, start executing Phase 0, then Phase 1, etc.**
See `@CLAUDE.md` section "SlashCommand Execution - YOU Are The Executor" for detailed explanation.
---
**Arguments**: $ARGUMENTS
Goal: Orchestrate CLI project initialization by gathering requirements and delegating to the cli-setup agent for implementation.
**Architectural Context:**
This command follows the composition pattern:
- **Commands are orchestrators** - They ask questions and delegate
- **Agents are workers** - They do the complex implementation
- Commands invoke agents via Task tool, not implement directly
Phase 1: Load Architectural Framework
Goal: Understand component composition patterns
Actions:
- Load the complete component decision framework:
!{Read ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/docs/frameworks/claude/reference/component-decision-framework.md}
- This provides critical understanding of:
- Commands are the primitive (orchestrators)
- Agents are for complex multi-step workflows
- Proper composition: Command → Agent → Skills
- When to delegate vs when to execute directly
Phase 2: Gather Requirements
Goal: Collect user preferences for the CLI project
Actions:
- Parse $ARGUMENTS for tool name
- If no tool name provided, ask user for it via AskUserQuestion
- Ask user for language preference:
- Options: TypeScript, Python, Go, Rust
- Include descriptions of each language's strengths
- Based on language selection, ask for framework:
- **Python**: Click (decorator-based), Typer (type-safe), argparse (stdlib), Fire (auto-generate)
- **TypeScript/Node.js**: Commander.js (simple), yargs (advanced), oclif (enterprise), gluegun (generators)
- **Go**: Cobra (production), cli (lightweight)
- **Rust**: clap (full-featured)
- Ask for package manager preference:
- Python: pip, poetry, pipenv
- Node.js: npm, yarn, pnpm
- Go: go modules (automatic)
- Rust: cargo (automatic)
Phase 3: Environment Validation
Goal: Verify required tools are available
Actions:
- Check if selected language runtime is installed:
- Python: !{bash python3 --version 2>/dev/null || echo "Not found"}
- Node.js: !{bash node --version 2>/dev/null || echo "Not found"}
- Go: !{bash go version 2>/dev/null || echo "Not found"}
- Rust: !{bash rustc --version 2>/dev/null || echo "Not found"}
- Check if selected package manager is available
- If any tools missing, inform user and provide installation instructions
- If critical tools missing, stop and ask user to install them first
Phase 4: Delegate to CLI Setup Agent
Goal: Hand off implementation to specialized agent
Actions:
**Invoke the cli-setup agent to perform the actual implementation:**
Task(
description="Initialize CLI project with chosen framework",
subagent_type="cli-tool-builder:cli-setup",
prompt="You are the cli-setup agent. Initialize a new CLI tool project with the specifications provided.
**Project Details:**
- Tool Name: {tool_name from Phase 2}
- Language: {language from Phase 2}
- Framework: {framework from Phase 2}
- Package Manager: {package_manager from Phase 2}
**User Requirements:**
Create a complete CLI tool project with:
1. Proper directory structure for the chosen framework
2. Entry point file with correct shebang
3. Package configuration (package.json, setup.py, Cargo.toml, or go.mod)
4. Executable bin/entry point configuration
5. Dependencies installation for chosen framework
6. Basic command structure following framework conventions
7. README with usage instructions
8. LICENSE file (MIT)
9. .gitignore for the language
10. Git repository initialization
**Skills Available:**
- Use Skill(cli-tool-builder:{framework}-patterns) for framework-specific patterns
- Example: Skill(cli-tool-builder:click-patterns) for Python Click
- Example: Skill(cli-tool-builder:commander-patterns) for Commander.js
**Implementation:**
Follow the phased approach in your agent definition:
1. Discovery: Confirm requirements
2. Analysis: Determine exact dependencies and structure
3. Planning: Design directory layout and files
4. Implementation: Create all files and install dependencies
5. Verification: Test that CLI works and passes validation
Deliverable: Complete working CLI project in ./{tool_name}/ directory"
)
Wait for agent to complete. Agent will use framework-specific skills and create the complete project.
Phase 5: Verification
Goal: Confirm project was created successfully
Actions:
- Check that project directory exists: !{bash ls -la {tool_name}/}
- Verify key files were created:
- Entry point file
- Package configuration
- README
- LICENSE
- .gitignore
- Display project structure to user
Phase 6: Summary
Goal: Report success and provide next steps
Actions:
- Display project creation summary:
- Tool name
- Language and framework
- Project location
- Entry point file
- Show next steps:
1. cd {tool_name}
2. Test CLI: ./{tool_name} --help (or appropriate command)
3. Add subcommands: /cli-tool-builder:add-subcommand <command-name>
4. Add features: /cli-tool-builder:add-interactive, /cli-tool-builder:add-output-formatting
5. Package for distribution: /cli-tool-builder:add-package
- Encourage user to explore the generated code and customize it