mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
**Summary:** Updated all 62 command files in `.claude/commands` directory to improve parameter documentation clarity by replacing `examples` field with descriptive `argument-hint` field. **Changes:** - Added/improved `argument-hint` for all commands based on usage patterns - Removed `examples` field and all example items from YAML headers - Maintained all other YAML fields (name, description, usage, allowed-tools) - Deleted obsolete commands: workflow/issue/*, workflow/session/pause.md, workflow/session/switch.md - Cleaned up temporary analysis files **Rationale:** The `argument-hint` field provides clearer, more concise parameter documentation than example lists, improving command discoverability and usability in the Claude Code interface. **Files Modified:** 62 command files **Lines Changed:** -1570 insertions, +192 deletions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
4.2 KiB
4.2 KiB
name, description, usage, argument-hint, allowed-tools
| name | description | usage | argument-hint | allowed-tools |
|---|---|---|---|---|
| bug-index | Bug analysis and fix suggestions using CLI tools | /cli:mode:bug-index [--tool <codex|gemini|qwen>] [--enhance] [--cd "path"] "bug description" | [--tool codex|gemini|qwen] [--enhance] [--cd path] bug description | SlashCommand(*), Bash(*) |
CLI Mode: Bug Index (/cli:mode:bug-index)
Purpose
Systematic bug analysis with diagnostic template (~/.claude/prompt-templates/bug-fix.md).
Supported Tools: codex, gemini (default), qwen
Key Feature: --cd flag for directory-scoped analysis
Parameters
--tool <codex|gemini|qwen>- Tool selection (default: gemini)--enhance- Enhance bug description with/enhance-promptfirst--cd "path"- Target directory for focused analysis<bug-description>(Required) - Bug description or error message
Execution Flow
- Parse tool selection: Extract
--toolflag (default: gemini) - If
--enhanceflag present: Execute/enhance-prompt "[bug-description]"first - Parse bug description (original or enhanced)
- Detect target directory (from
--cdor auto-infer) - Build command for selected tool with bug-fix template
- Execute analysis (read-only, provides fix recommendations)
- Save to
.workflow/WFS-[id]/.chat/bug-index-[timestamp].md
Core Rules
- Analysis Only: This command analyzes bugs and suggests fixes - it does NOT modify code
- Enhance First (if flagged): Execute
/enhance-promptbefore analysis - Directory Context: Use
cdwhen--cdprovided or auto-detected - Template Required: Always use bug-fix template
- Session Output: Save analysis results and fix recommendations to session chat
Analysis Focus (via Template)
- Root cause investigation and diagnosis
- Code path tracing to locate issues
- Targeted minimal fix recommendations
- Impact assessment of proposed changes
Command Template
cd [directory] && ~/.claude/scripts/gemini-wrapper --all-files -p "
PURPOSE: [bug analysis goal]
TASK: Systematic bug analysis and fix recommendations
MODE: analysis
CONTEXT: @{CLAUDE.md,**/*CLAUDE.md} [entire codebase in directory]
EXPECTED: Root cause analysis, code path tracing, targeted fix suggestions
RULES: $(cat ~/.claude/prompt-templates/bug-fix.md) | Bug: [description]
"
Examples
Basic Bug Analysis:
cd . && ~/.claude/scripts/gemini-wrapper --all-files -p "
PURPOSE: Debug authentication null pointer error
TASK: Identify root cause and provide fix recommendations
MODE: analysis
CONTEXT: @{CLAUDE.md,**/*CLAUDE.md}
EXPECTED: Root cause, code path, minimal fix suggestion, impact assessment
RULES: $(cat ~/.claude/prompt-templates/bug-fix.md) | Bug: null pointer in login flow
"
Directory-Specific:
cd src/auth && ~/.claude/scripts/gemini-wrapper --all-files -p "
PURPOSE: Fix token validation failure
TASK: Analyze token validation bug in auth module
MODE: analysis
CONTEXT: @{CLAUDE.md,**/*CLAUDE.md}
EXPECTED: Validation logic analysis, fix recommendation with minimal changes
RULES: $(cat ~/.claude/prompt-templates/bug-fix.md) | Bug: token validation fails intermittently
"
Bug Investigation Workflow
# 1. Find bug-related files
rg "error_keyword" --files-with-matches
mcp__code-index__search_code_advanced(pattern="error|exception", file_pattern="*.ts")
# 2. Execute bug analysis with focused context (analysis only, no code changes)
/cli:mode:bug-index --cd "src/module" "specific error description"
Output Routing
Output Destination Logic:
- Active session exists AND bug is session-relevant:
- Save to
.workflow/WFS-[id]/.chat/bug-index-[timestamp].md
- Save to
- No active session OR quick debugging:
- Save to
.workflow/.scratchpad/bug-index-[description]-[timestamp].md
- Save to
Examples:
- During active session
WFS-payment-fix, analyzing payment bug →.chat/bug-index-20250105-143022.md - No session, quick null pointer investigation →
.scratchpad/bug-index-null-pointer-20250105-143045.md
Notes
- Command templates and file patterns: see intelligent-tools-strategy.md (loaded in memory)
- Scratchpad directory details: see workflow-architecture.md
- Template path:
~/.claude/prompt-templates/bug-fix.md - Always uses
--all-filesfor comprehensive codebase context