mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
3.7 KiB
3.7 KiB
name, description, usage, argument-hint, examples, allowed-tools
| name | description | usage | argument-hint | examples | 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
Execute systematic bug analysis and fix suggestions using CLI tools with diagnostic template.
Supported Tools: codex, gemini (default), qwen
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
- Save to session (if active)
Core Rules
- 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 to
.workflow/WFS-[id]/.chat/bug-index-[timestamp].md
Command Template
Core Guidelines: @~/.claude/workflows/intelligent-tools-strategy.md
cd [directory] && ~/.claude/scripts/gemini-wrapper --all-files -p "
PURPOSE: [bug analysis goal]
TASK: Systematic bug analysis and fix recommendations
CONTEXT: @{CLAUDE.md,**/*CLAUDE.md} [entire codebase in directory]
EXPECTED: Root cause analysis, code path tracing, targeted fixes
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
CONTEXT: @{CLAUDE.md,**/*CLAUDE.md}
EXPECTED: Root cause, code path, minimal fix, 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
CONTEXT: @{CLAUDE.md,**/*CLAUDE.md}
EXPECTED: Validation logic analysis, fix recommendation
RULES: $(cat ~/.claude/prompt-templates/bug-fix.md) | Bug: token validation fails intermittently
"
With Enhancement:
# User: /gemini:mode:bug-index --enhance "login broken"
# Step 1: Enhance
/enhance-prompt "login broken"
# Returns:
# INTENT: Debug login authentication failure
# CONTEXT: Known session state issue
# ACTION: Check session management → verify token → test flow
# Step 2: Analyze with enhanced context
cd . && ~/.claude/scripts/gemini-wrapper --all-files -p "
PURPOSE: Debug login authentication failure
TASK: Analyze session management, token handling, auth flow
CONTEXT: @{CLAUDE.md,**/*CLAUDE.md} Known: session state issue
EXPECTED: Root cause in session/token, targeted fix
RULES: $(cat ~/.claude/prompt-templates/bug-fix.md) | Focus on session management
"
Analysis Focus
Template provides:
- Root Cause Analysis: Systematic investigation
- Code Path Tracing: Execution flow analysis
- Targeted Solutions: Minimal, specific fixes
- Impact Assessment: Side effect evaluation
Session Output
Location: .workflow/WFS-[topic]/.chat/bug-index-[timestamp].md
Includes:
- Bug description
- Template used
- Analysis results
- Recommended actions