mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
Streamlined 7 CLI command documentation files by removing duplicate content that's already comprehensively covered in intelligent-tools-strategy.md (loaded in memory). Established single source of truth (SSOT) pattern. Changes: - Removed duplicate command templates (→ strategy lines 51-118) - Removed file pattern reference lists (→ strategy lines 324-329) - Removed complex pattern discovery steps (→ strategy lines 331-355) - Removed MODE field definitions (→ strategy lines 128-143) - Removed tool feature descriptions (→ strategy lines 283-322) Files streamlined: - analyze.md: 117→61 lines (48% reduction) - chat.md: 118→62 lines (47% reduction) - execute.md: 180→100 lines (44% reduction) - codex-execute.md: 481→473 lines (2% - preserved unique content) - mode/bug-index.md: 144→75 lines (48% reduction) - mode/code-analysis.md: 188→76 lines (60% reduction) - mode/plan.md: 100→76 lines (24% reduction) Total reduction: 681 lines removed across all files Each doc now contains only: - Unique purpose and parameters - Command-specific execution flow - Practical examples - Brief reference to intelligent-tools-strategy.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2.5 KiB
2.5 KiB
name, description, usage, argument-hint, examples, allowed-tools
| name | description | usage | argument-hint | examples | allowed-tools | |||
|---|---|---|---|---|---|---|---|---|
| code-analysis | Deep code analysis and debugging using CLI tools with specialized template | /cli:mode:code-analysis [--tool <codex|gemini|qwen>] [--enhance] [--cd "path"] "analysis target" | [--tool codex|gemini|qwen] [--enhance] [--cd path] analysis target |
|
SlashCommand(*), Bash(*) |
CLI Mode: Code Analysis (/cli:mode:code-analysis)
Purpose
Systematic code analysis with execution path tracing template (~/.claude/prompt-templates/code-analysis.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 analysis target with/enhance-promptfirst--cd "path"- Target directory for focused analysis<analysis-target>(Required) - Code analysis target or question
Execution Flow
- Parse tool and directory options
- If
--enhance: Execute/enhance-promptto expand analysis intent - Use code-analysis template:
~/.claude/prompt-templates/code-analysis.md - Execute with
--all-filesin target directory - Save to
.workflow/WFS-[id]/.chat/code-analysis-[timestamp].md
Analysis Capabilities (via Template)
- Execution path tracing with variable states
- Call flow visualization and diagrams
- Control & data flow analysis
- Logical reasoning ("why" behind code behavior)
- Debugging insights and inefficiency detection
Examples
# Basic code analysis
/cli:mode:code-analysis "trace authentication flow"
# Directory-specific with enhancement
/cli:mode:code-analysis --cd "src/auth" --enhance "how does JWT work"
# Qwen for architecture analysis
/cli:mode:code-analysis --tool qwen "explain microservices communication"
# Codex for deep tracing
/cli:mode:code-analysis --tool codex --cd "src/api" "trace request lifecycle"
Code Tracing Workflow
# 1. Find entry points
rg "function.*main|export.*handler" --files-with-matches
# 2. Execute deep analysis
/cli:mode:code-analysis --cd "src" "trace execution from entry point"
Notes
- Command templates and file patterns: see intelligent-tools-strategy.md (loaded in memory)
- Template path:
~/.claude/prompt-templates/code-analysis.md - Always uses
--all-filesfor comprehensive code context