mcpField
P
project-analyze

project-analyze

github.com/catlog22Development2.1k45 installsUpdated 19w ago
Repository

About project-analyze

project-analyze is a skill for producing structured analyses of a software project through iterative phases. It supports architecture, design, methods, and comprehensive reports assembled from focused agent contributions.

Key features

  1. 01Phased requirements and project exploration
  2. 02Architecture, design, and methods reports
  3. 03Parallel analysis by specialized agents
  4. 04Cross-section consolidation and quality review
  5. 05Markdown report generation

Use cases

  1. 01Documenting a project's architecture
  2. 02Reviewing design patterns and interfaces
  3. 03Tracing algorithms and critical code paths

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/catlog22/claude-code-workflow --skill project-analyze

After installing, type/project-analyzein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

phases/
01-requirements-discovery.md
02-project-exploration.md
03-deep-analysis.md
03.5-consolidation.md
04-report-generation.md
05-iterative-refinement.md
specs/
quality-standards.md
writing-style.md

Details

From the project README

Project Analysis Skill

Generate comprehensive project analysis reports through multi-phase iterative workflow.

Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│  Context-Optimized Architecture                                  │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  Phase 1: Requirements      → analysis-config.json              │
│           ↓                                                      │
│  Phase 2: Exploration       → 初步探索,确定范围                  │
│           ↓                                                      │
│  Phase 3: Parallel Agents   → sections/section-*.md (直接写MD)   │
│               ↓ 返回简要JSON                                     │
│  Phase 3.5: Consolidation   → consolidation-summary.md          │
│           Agent                 ↓ 返回质量评分+问题列表          │
│           ↓                                                      │
│  Phase 4: Assembly          → 合并MD + 质量附录                  │
│           ↓                                                      │
│  Phase 5: Refinement        → 最终报告                           │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Key Design Principles

  1. Agent 直接输出 MD: 避免 JSON → MD 转换的上下文开销
  2. 简要返回: Agent 只返回路径+摘要,不返回完整内容
  3. 汇总 Agent: 独立 Agent 负责跨章节问题检测和质量评分
  4. 引用合并: Phase 4 读取文件合并,不在上下文中传递
  5. 段落式描述: 禁止清单罗列,层层递进,客观学术表达

Execution Flow

┌─────────────────────────────────────────────────────────────────┐
│  Phase 1: Requirements Discovery                                │
│  → Read: phases/01-requirements-discovery.md                    │
│  → Collect: report type, depth level, scope, focus areas        │
│  → Output: analysis-config.json                                 │
├─────────────────────────────────────────────────────────────────┤
│  Phase 2: Project Exploration                                   │
│  → Read: phases/02-project-exploration.md                       │
│  → Launch: parallel exploration agents                          │
│  → Output: exploration context for Phase 3                      │
├─────────────────────────────────────────────────────────────────┤
│  Phase 3: Deep Analysis (Parallel Agents)                       │
│  → Read: phases/03-deep-analysis.md                             │
│  → Reference: specs/quality-standards.md                        │
│  → Each Agent: 分析代码 → 直接写 sections/section-*.md          │
│  → Return: {"status", "output_file", "summary", "cross_notes"}  │
├─────────────────────────────────────────────────────────────────┤
│  Phase 3.5: Consolidation (New!)                                │
│  → Read: phases/03.5-consolidation.md                           │
│  → Input: Agent 返回的简要信息 + cross_module_notes             │
│  → Analyze: 一致性/完整性/关联性/质量检查                        │
│  → Output: consolidation-summary.md                             │
│  → Return: {"quality_score", "issues", "stats"}                 │
├─────────────────────────────────────────────────────────────────┤
│  Phase 4: Report Generation                                     │
│  → Read: phases/04-report-generation.md                         │
│  → Check: 如有 errors,提示用户处理                              │
│  → Merge: Executive Summary + sections/*.md + 质量附录          │
│  → Output: {TYPE}-REPORT.md                                     │
├─────────────────────────────────────────────────────────────────┤
│  Phase 5: Iterative Refinement                                  │
│  → Read: phases/05-iterative-refinement.md                      │
│  → Reference: specs/quality-standards.md                        │
│  → Loop: 发现问题 → 提问 → 修复 → 重新检查                       │
└─────────────────────────────────────────────────────────────────┘

Report Types

TypeOutputAgentsFocus
architectureARCHITECTURE-REPORT.md5System structure, modules, dependencies
designDESIGN-REPORT.md4Patterns, classes, interfaces
methodsMETHODS-REPORT.md4Algorithms, critical paths, APIs
comprehensiveCOMPREHENSIVE-REPORT.mdAllAll above combined

Agent Configuration by Report Type

Architecture Report
AgentOutput FileSection
overviewsection-overview.mdSystem Overview
layerssection-layers.mdLayer Analysis
dependenciessection-dependencies.mdModule Dependencies
dataflowsection-dataflow.mdData Flow
entrypointssection-entrypoints.mdEntry Points
Design Report
AgentOutput FileSection
patternssection-patterns.mdDesign Patterns
classessection-classes.mdClass Relationships
interfacessection-interfaces.mdInterface Contracts
statesection-state.mdState Management
Methods Report
AgentOutput FileSection
algorithmssection-algorithms.mdCore Algorithms
pathssection-paths.mdCritical Code Paths
apissection-apis.mdPublic API Reference
logicsection-logic.mdComplex Logic

Directory Setup

// 生成时间戳目录名
const timestamp = new Date().toISOString().slice(0,19).replace(/[-:T]/g, '');
const dir = `.workflow/.scratchpad/analyze-${timestamp}`;

// Windows (cmd)
Bash(`mkdir "${dir}\\sections"`);
Bash(`mkdir "${dir}\\iterations"`);

// Unix/macOS
// Bash(`mkdir -p "${dir}/sections" "${dir}/iterations"`);

Output Structure

.workflow/.scratchpad/analyze-{timestamp}/
├── analysis-config.json          # Phase 1
├── sections/                     # Phase 3 (Agent 直接写入)
│   ├── section-overview.md
│   ├── section-layers.md
│   ├── section-dependencies.md
│   └── ...
├── consolidation-summary.md      # Phase 3.5
├── {TYPE}-REPORT.md              # Final Output
└── iterations/                   # Phase 5
    ├── v1.md
    └── v2.md

Reference Documents

DocumentPurpose
phases/01-requirements-discovery.mdUser interaction, config collection
phases/02-project-exploration.mdInitial exploration
phases/03-deep-analysis.mdParallel agent analysis
phases/03.5-consolidation.mdCross-section consolidation
phases/04-report-generation.mdReport assembly
phases/05-iterative-refinement.mdQuality refinement
specs/quality-standards.mdQuality gates, standards
specs/writing-style.md段落式学术写作规范
../_shared/mermaid-utils.mdShared Mermaid utilities

Comments

Markdown supported