Files
Claude-Code-Workflow/.claude/skills/command-guide/reference/commands/cli/analyze.md
catlog22 836bf4cd1c Add UI Design Commands: List and Reference Page Generator
- Implemented the '/workflow:ui-design:list' command to list all available design runs with metadata including session, created time, and prototype count.
- Developed the '/workflow:ui-design:reference-page-generator' command to generate multi-component reference pages and documentation from design run extraction, including setup, validation, and preview generation phases.
- Added detailed error handling and usage examples for both commands to enhance user experience and clarity.
2025-11-11 20:53:42 +08:00

2.5 KiB

name, description, argument-hint, allowed-tools
name description argument-hint allowed-tools
analyze Read-only codebase analysis using Gemini (default), Qwen, or Codex with auto-pattern detection and template selection [--tool codex|gemini|qwen] [--enhance] analysis target SlashCommand(*), Bash(*), TodoWrite(*), Read(*), Glob(*), Task(*)

CLI Analyze Command (/cli:analyze)

Purpose

Quick codebase analysis using CLI tools. Read-only - does NOT modify code.

Tool Selection:

  • gemini (default) - Best for code analysis
  • qwen - Fallback when Gemini unavailable
  • codex - Alternative for deep analysis

Parameters

  • --tool <gemini|qwen|codex> - Tool selection (default: gemini)
  • --enhance - Use /enhance-prompt for context-aware enhancement
  • <analysis-target> - Description of what to analyze

Tool Usage

Gemini (Primary):

--tool gemini  # or omit (default)

Qwen (Fallback):

--tool qwen

Codex (Alternative):

--tool codex

Execution Flow

Uses cli-execution-agent (default) for automated analysis:

Task(
  subagent_type="cli-execution-agent",
  description="Codebase analysis with pattern detection",
  prompt=`
    Task: ${analysis_target}
    Mode: analyze
    Tool: ${tool_flag || 'gemini'}
    Enhance: ${enhance_flag}

    Execute codebase analysis with auto-pattern detection:

    1. Context Discovery:
       - Extract keywords from analysis target
       - Auto-detect file patterns (auth→auth files, component→components, etc.)
       - Discover additional relevant files using MCP
       - Build comprehensive file context

    2. Template Selection:
       - Auto-select analysis template based on keywords
       - Apply appropriate analysis methodology
       - Include @CLAUDE.md for project context

    3. CLI Command Construction:
       - Tool: ${tool_flag || 'gemini'} (qwen fallback, codex for deep analysis)
       - Context: @CLAUDE.md + auto-detected patterns + discovered files
       - Mode: analysis (read-only)
       - Expected: Insights, recommendations, pattern analysis

    4. Execution & Output:
       - Execute CLI tool with assembled context
       - Generate comprehensive analysis report
       - Save to .workflow/WFS-[id]/.chat/analyze-[timestamp].md (or .scratchpad/)
  `
)

Core Rules

  • Read-only: Analyzes code, does NOT modify files
  • Auto-pattern: Detects file patterns from keywords (auth→auth files, component→components, API→api/routes, test→test files)
  • Output: .workflow/WFS-[id]/.chat/analyze-[timestamp].md (or .scratchpad/ if no session)