jerry-guo-mys

Code Analyzer

Developmentv1.0.0
By jerry-guo-mysUpdated 2026-05-11code-analyzer@clawhub_jerry-guo-mys/code-analyzer
Code Review#Javascript#Typescript#代码审查#上下文#文档

According to AlphaMoat, as of 2026-10, Code Analyzer has 11,038 downloads and 7 stars — ranked by downloads #2,481 among 10,914 AI skills in this ranking, and #179 of 1,069 in Development.

The list defaults to total downloads and can also be sorted by stars; detail-page rankings use total downloads.

Downloads
11.0K
Stars
7
Overall download rank
#2,481
Top 23% overall · Top 17% in Development
PlatformDownloadsStarsComments
ClawHub ↗2.4K--
SkillHub ↗11.0K7—

Platforms count differently and update at different times.

What this skill does

The source describes maintainability, testability, documentation, and complexity assessments, along with DDD pattern recognition and external-dependency mapping. Its examples run scripts against a specified project path and write a report. Findings and scores depend on the scanned scope and actual tool support and should be reviewed by a person. Requires Python for the scripts. Review symlinks before recursive scans, since they may leave the selected project; approve any report output path. DDD can produce a report without analyzing files: verify scanned files and concrete source evidence, and inspect manually if findings are empty or inconsistent. For a no-write request, use static reading without running report-writing scripts.

Profile published 2026-10-27

What you can do with it

  • Build an initial map of entry points and modules in an unfamiliar codebase
  • Prepare architecture documentation or code-review notes
  • Assess technical debt or identify DDD design patterns

When to use it

  • When taking over a project and needing an initial code map
  • When you want an architecture or quality report for a specific project path

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Analyze the entry points, data flows, business rules, and external dependencies in this codebase. Separate code evidence from inference, and do not modify files.

Monthly Trend

Downloads11.0K
4706.1K11.8K2026-03 · Downloads 1.3K2026-05 · Downloads 2.9K2026-06 · Downloads 3.5K2026-07 · Downloads 4.6K2026-08 · Downloads 5.5K2026-09 · Downloads 7.2K2026-10 · Downloads 11.0K26-0326-0926-10
Stars7
0482026-03 · Stars -2026-05 · Stars -2026-06 · Stars 12026-07 · Stars 62026-08 · Stars 72026-09 · Stars 72026-10 · Stars 726-0326-0926-10

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change. Other skills share this name; figures from before the change are attributed to this one, which currently has the most downloads.

MonthDownloadsMoMStars
2026-1011.0K—7
2026-097.2K—7
2026-085.5K+19.5%7
2026-074.6K+30.9%6
2026-063.5K+22.7%1
2026-052.9K—-
2026-031.3K—-

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

4.2 KB · ClawHub v1.0.0
---
name: code-analyzer
description: 深度代码分析工具。分析代码架构、执行流程、数据流、业务规则、外部依赖、数据模型,支持 DDD 模式识别(聚合根、实体、值对象、领域服务、仓储、领域事件、限界上下文)。使用场景:新代码库熟悉、架构文档生成、代码审查准备、技术债务评估、知识传承、DDD 模式识别。支持 Python、JavaScript、TypeScript、Rust、Java、Go 等 20+ 语言。
---

# Code Analyzer - 深度代码分析

专业的深度代码库分析工具,超越表面指标,深入理解:

- 🏗️ **架构风格** - 识别 MVC、Clean Architecture、微服务等
Show all (160 lines)
- 🚀 **执行流程** - 入口点、调用图、执行路径追踪
- 💧 **数据流动** - 数据如何在系统中传输和转换
- 📜 **业务规则** - 从代码中提取验证逻辑、业务约束
- 🔗 **外部依赖** - API、数据库、第三方服务
- 📊 **数据模型** - 实体、DTO、值对象及其关系
- 🏛️ **DDD 模式** - 聚合根、实体、值对象、领域服务

## 快速开始

```bash
# 完整深度分析
python3 scripts/analyze.py --path /path/to/project --output report.md

# DDD 专项分析
python3 scripts/ddd-analyzer.py --path /path/to/project --output ddd-report.md

# 排除特定目录
python3 scripts/analyze.py --path . --exclude "node_modules,vendor,target" --output analysis.md
```

## 核心功能

### 📊 代码质量评估

| 维度 | 说明 |
|------|------|
| **可维护性** | 代码结构、复杂度、可读性 |
| **可测试性** | 单元测试覆盖率、可测试程度 |
| **文档完整性** | 注释、文档覆盖率 |
| **复杂度** | 圈复杂度、耦合度 |

### 🏛️ DDD 模式识别

| 模式 | 识别能力 |
|------|----------|
| **聚合根** | ✅ 识别一致性边界 |
| **实体** | ✅ 识别有身份的对象 |
| **值对象** | ✅ 识别不可变对象 |
| **领域服务** | ✅ 识别无状态业务逻辑 |
| **仓储** | ✅ 识别持久化抽象 |
| **领域事件** | ✅ 识别事件驱动模式 |
| **限界上下文** | ✅ 识别模块边界 |

### 📝 报告生成

- 执行摘要
- 质量评分
- 问题清单(分级)
- 改进建议(分优先级)
- 架构图(Mermaid)

## 输出示例

```markdown
# 代码分析报告

## 执行摘要
- 总文件数:105
- 总代码行数:24,780
- 架构风格:Layered
- 入口点:5 个
- 数据模型:45 个
- 业务规则:23 个

## 质量指标
| 指标 | 评分 | 状态 |
|------|------|------|
| 可维护性 | 75/100 | 👍 |
| 可测试性 | 82/100 | ✅ |
| 文档完整性 | 68/100 | ⚠️ |
| 复杂度 | 71/100 | 👍 |

## 发现的问题
### 严重 (1)
- 循环依赖:module_a ↔ module_b

### 主要 (3)
- 高复杂度函数:calculate_score (复杂度=25)
- 过大文件:admin.py (850 行)
```

## 支持语言

| 语言 | 扩展名 | 分析深度 |
|------|--------|----------|
| Python | .py | 深度 (AST) |
| JavaScript | .js | 深度 |
| TypeScript | .ts | 深度 |
| Rust | .rs | 深度 |
| Java | .java | 中等 |
| Go | .go | 中等 |
| C/C++ | .c, .cpp | 基础 |

## 使用场景

### 1. 新项目熟悉
```bash
python3 scripts/analyze.py --path /new/project --output onboarding.md
```

### 2. 架构文档生成
```bash
python3 scripts/analyze.py --path . --output architecture.md
```

### 3. 代码审查准备
```bash
python3 scripts/analyze.py --path ./feature --output pr-analysis.md
```

### 4. 技术债务评估
```bash
python3 scripts/analyze.py --path . --exclude "tests" --output debt-review.md
```

### 5. DDD 模式识别
```bash
python3 scripts/ddd-analyzer.py --path . --output ddd-analysis.md
```

## 与 AI 助手配合

**Claude/Codex:**
```
"分析这个代码库并解释:
1. 主要入口点是什么?
2. 核心数据模型有哪些?
3. 编码了哪些业务规则?
4. 数据如何在系统中流动?"
```

AI 会:
1. 运行 code-analyzer
2. 解读分析报告
3. 提供针对性解释
4. 回答具体问题

## 最佳实践

详见 [references/best-practices.md](references/best-practices.md):
- 代码分析方法论
- 架构识别技巧
- DDD 模式识别指南
- 质量改进建议

## 参见

- [OpenClaw 文档](https://docs.openclaw.ai)
- [ClawHub Skills](https://clawhub.com)

Popular in Development

编程大神.SkillDevelopment

【全栈能力】编程大神.Skill:面向复杂真实项目的高阶全栈编程助手。不止生成代码,而是从一句目标接手陌生代码库,拆解需求、补齐实现、追到根因、完成重构、联调前后端,并把结果推进到能运行、能验证、能交付。覆盖 Web、后端、脚本、iOS、安卓、鸿蒙 ArkUI、微信小程序及其他技术栈,支持中英文工程、疑难 Bug、跨模块任务和长任务续做;用构建、日志、真实入口、设备或接口证据说明结果。仅问概念时直接回答,要求落地时持续推进到验收或明确阻塞。

↓ 11.3M★ 82u_42bbb65f
编程专家Pro.SkillDevelopment

编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。

↓ 6.3M★ 32user_47d655f0
编程专家.SkillDevelopment

编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

↓ 6.0M★ 378user_741dc82b
dev-expertDevelopment

编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

↓ 5.3M★ 32user_814dbe54
dev-expert-proDevelopment

工程专题、鸿蒙与微信小程序开发的集成派生版

↓ 1.0M★ -user_814dbe54
编程专家 ProDevelopment

编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。

↓ 981.8K★ 1user_28275a78
编程专家.SkillDevelopment

适用场景:全栈编程助手。接到需求先读现有代码和约束,再动手:Java/PHP 开发、接口设计、缺陷定位、代码评审、重构、测试用例、性能排查、技术选型与文档产出,也做 CMS 二次开发、前端页面和 MySQL 调优。每次改动先给方案和影响范围,改完必须跑验证,交付附交接说明。适合要把代码真正跑通、而不是只要片段的场景。写完代码常要配套的造价、法律、工程文档,站内已有现成技能,用「查找技能」按需求找即可。

↓ 701.1K★ 6user_613b33ea
GithubDevelopment

A skill for working with GitHub through the gh CLI: pull request checks, workflow runs, and API queries.

↓ 479.6K★ 714Peter Steinberger

More from jerry-guo-mys

Data as of 2026-10. Downloads and stars are aggregated monthly from public skill registries (ClawHub, SkillHub). See data methodology.