GitDiagram Repository Overview
ahmedkhaleel2004/gitdiagram
Explains the architecture of a public GitHub repository through GitDiagram: how the code is organized, the main components with paths, and a Mermaid diagram.
Produces an in-depth architecture report on an open-source project or framework, explaining why it is designed the way it is rather than just what the code does.
SKILL.md written in Chinese; this summary is our English description.
$ npx skills add yzddmr6/repo-analyzer --skill repo-analyzer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install yzddmr6/repo-analyzer repo-analyzer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/yzddmr6/repo-analyzer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/repo-analyzer .claude/skills/repo-analyzer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "repo-analyzer" agent skill from https://github.com/yzddmr6/repo-analyzer/tree/master/skills/repo-analyzer into .claude/skills/repo-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "repo-analyzer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/yzddmr6/repo-analyzer/tree/master/skills/repo-analyzerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add yzddmr6/repo-analyzer --skill repo-analyzer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install yzddmr6/repo-analyzer repo-analyzer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/yzddmr6/repo-analyzer.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/repo-analyzer .agents/skills/repo-analyzer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "repo-analyzer" agent skill from https://github.com/yzddmr6/repo-analyzer/tree/master/skills/repo-analyzer into .agents/skills/repo-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "repo-analyzer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add yzddmr6/repo-analyzer --skill repo-analyzer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install yzddmr6/repo-analyzer repo-analyzer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/yzddmr6/repo-analyzer.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/repo-analyzer .cursor/skills/repo-analyzer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "repo-analyzer" agent skill from https://github.com/yzddmr6/repo-analyzer/tree/master/skills/repo-analyzer into .cursor/skills/repo-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "repo-analyzer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/yzddmr6/repo-analyzer.git --path skills/repo-analyzer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add yzddmr6/repo-analyzer --skill repo-analyzer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install yzddmr6/repo-analyzer repo-analyzer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/yzddmr6/repo-analyzer.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/repo-analyzer .gemini/skills/repo-analyzer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "repo-analyzer" agent skill from https://github.com/yzddmr6/repo-analyzer/tree/master/skills/repo-analyzer into .gemini/skills/repo-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "repo-analyzer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install yzddmr6/repo-analyzer repo-analyzerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add yzddmr6/repo-analyzer --skill repo-analyzer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/yzddmr6/repo-analyzer.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/repo-analyzer .github/skills/repo-analyzer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "repo-analyzer" agent skill from https://github.com/yzddmr6/repo-analyzer/tree/master/skills/repo-analyzer into .github/skills/repo-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "repo-analyzer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add yzddmr6/repo-analyzer --skill repo-analyzer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install yzddmr6/repo-analyzer repo-analyzer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/yzddmr6/repo-analyzer.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/repo-analyzer .opencode/skills/repo-analyzer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "repo-analyzer" agent skill from https://github.com/yzddmr6/repo-analyzer/tree/master/skills/repo-analyzer into .opencode/skills/repo-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "repo-analyzer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
repo-analyzerProduces an in-depth architecture report on an open-source project or framework, explaining why it is designed the way it is rather than just what the code does.
This skill writes a technical analysis report meant to leave the reader able to understand the business problem, grasp the architecture, and form their own opinion about it, not just a restatement of what functions exist. It insists on starting from the problem the project solves rather than from file contents, and on describing design at the level of patterns and architecture - using diagrams, flowcharts and tables - rather than pasting raw code, reserving code snippets for cases where the design itself is the point and always explaining them in plain language first.
For every design decision, it requires answering why the design was chosen, what the cost of the alternative would have been, how it compares to industry best practice, and how the analyst would redesign it, rather than stopping at naming which pattern was used. The workflow clones or uses a local copy of the repository into a per-run working directory, counts effective lines of code by module while excluding tests, build configuration, generated code and examples, and then has the user pick an analysis depth based on that size before continuing.
It explicitly excludes simple debugging questions, single-file analysis, or code changes that do not touch the architecture, and every conclusion must cite a specific file path, optionally with a line range, rather than relying on vague claims.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 812e868. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Deep Repository Architecture Analyzer loads about 2.2k tokens when it runs, and up to ~6.6k if it reads all its reference files. Until then it costs about 37 tokens; SKILL.md has 585 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from yzddmr6/repo-analyzer at commit 812e868, republished under its MIT licence (© yzddmr6). 585 words, ~2,183 tokens.
.claude/skills/repo-analyzer/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.深度分析开源项目并生成专业架构报告。报告是有深度洞察的技术研究,读完后读者能理解业务问题、掌握架构设计、产生自己的思考。
默认中文。如果用户使用其他语言提问,则跟随用户语言。
从"这个项目解决什么问题"出发,不是"这个文件里有什么函数"。
| 不要 | 要 |
|---|---|
handleRequest(ctx) 函数接收一个 Context 参数... | 请求进来后,系统会经过鉴权、限流、路由分发三个阶段... |
interface MessageQueue { push(); pop() } | 模块间通过消息队列解耦,生产者只管投递,消费者按优先级拉取 |
默认在设计模式和架构层面描述,非必要情况下不贴原始代码。重点突出流程、逻辑、设计思想,用架构图(Mermaid)、流程图、表格来表达,而非代码片段。只有设计特别精妙、项目自创独特概念、或实现是核心卖点时才展示代码,且必须先用自然语言解释。
每个局部分析都必须连接到项目整体设计哲学——这是区分"代码说明书"和"架构分析"的关键。详见 analysis-guide.md 的全局关联章节。
目标是让读者学到东西、产生思考,而不是获得一份代码说明书。像资深工程师在白板前讲解——有观点、有推理、有对比。详见 analysis-guide.md 的启发性写作章节。
每个设计决策必须解释动机、权衡、替代方案代价。描述"是什么"只是起点,解释"为什么"才是分析的价值所在。每个核心模块和整体架构都要回答:
示例:
❌ 路由系统采用了中间件模式,支持链式调用。
✅ 路由系统选择了洋葱模型而非线性管道。线性管道实现更简单,但洋葱模型让每个中间件都能同时处理请求和响应阶段——这对日志、计时、错误恢复至关重要。Express 当年选择线性模型,后来不得不用各种 hack 处理响应后逻辑,Koa 吸取教训才转向洋葱模型。如果让我重新设计,我会考虑加入中间件依赖声明,让框架自动排序——这是 Fastify 的做法,能避免顺序导致的隐蔽 bug。
文件路径 或 文件路径:行号范围,禁止模糊表述灵活性原则:以下所有阶段和章节都是建议性的指引,不是必须严格执行的清单。agent 应根据当前分析的项目特性动态决策——如果某个阶段或环节对当前项目没有意义,可以跳过或简化。一切以最终报告的质量为准。
owner/repo、GitHub/GitLab/Gitee URL、本地路径、项目名称)repo-analyses/${REPO_NAME}-{YYYYMMDD} 目录作为 $WORK_DIR(跨平台:macOS/Linux 使用 $HOME,Windows 使用 $USERPROFILE 或 $HOME)git clone --depth=1 克隆仓库find + wc -l 或 cloc 等工具统计,按顶层目录分组| 模式 | 核心模块覆盖率 | 次要模块覆盖率 | 适用场景 |
|---|---|---|---|
| 快速分析 | ≥30% | ≥10% | 快速了解项目全貌 |
| 标准分析(推荐) | ≥60% | ≥30% | 常规架构分析 |
| 深度分析 | ≥90% | ≥60% | 深入研究每个设计决策 |
drafts/03-plan.md,后续阶段据此控制分析深度覆盖率计算规则:
architecture/、docs/、design/ 等目录)drafts/03-research.md,必须包含以下结构化段落(信息不足则标注"未找到"):drafts/03-plan.md这是核心阶段。不使用固定问题列表,而是根据项目特征生成针对性问题。
步骤:
快速扫描:扫描入口文件、目录结构、依赖声明、项目文档、README
识别项目核心特征:
从特征中提炼问题:根据观察到的项目特征生成针对性问题。问题应该帮助聚焦分析方向,而不是走流程
思维过程——每个观察都可能暗示一个值得问用户的问题:
维度启发——什么样的项目特征暗示什么样的分析角度:
好问题的特征:具体(基于代码中观察到的现象)、有分析价值(答案会影响分析方向)、用户能答(问关注点和偏好,不问需要深入代码才能回答的技术细节)、不重复(不问通过代码就能回答的问题)
向用户提问:使用 AskUserQuestion 工具向用户提问,每次不超过 3 个问题
不限轮次:可多轮提问直到方向明确,分析过程中发现新的关键分歧点可以再追问
关键原则:问题完全由项目特征驱动,不预设类别。不同项目应该产生完全不同的问题。
根据用户回答 + 项目特征,设计本次报告的章节结构。
步骤:
drafts/05-modules-plan.md,格式示例:模块 A →[A 的输出需要 B 来消费]→ 模块 B →[B 解决了 X 但引出 Y 问题]→ 模块 Cdrafts/05-modules-plan.md骨架约束(报告不规定具体章节,但必须满足):
必须使用 Agent 工具并行启动 subagent。参考 module-analysis-guide.md 中的 prompt 模板和协作规范。
每个 subagent 的 prompt 中必须包含项目整体设计哲学和全局视角要求,确保模块分析不是孤立的。
每个 subagent 的 prompt 中还必须包含该模块的叙事上下文(来自阶段 5 的叙事线设计):前一个模块讲了什么、读者带着什么问题进入本模块、本模块需要为下一个模块铺垫什么。subagent 应在草稿开头用 1-2 句衔接前一模块,草稿结尾用 1 句铺垫下一模块。
每个 subagent 的 prompt 末尾必须附加覆盖率要求(参考 module-analysis-guide.md 中的覆盖率要求段落),告知当前分析模式和最低覆盖率目标,要求草稿末尾附覆盖率明细表。
subagent 写入策略: 对于大模块(文件总行数 > 5000 行),必须在 subagent prompt 中要求增量写入草稿:
主 agent 等待纪律:
7.1 覆盖率门控:
drafts/06-module-*.md 末尾的覆盖率明细表7.2 抽查验证:
7.3 交叉验证:
drafts/07-cross-validation.mddrafts/08-insights.mddrafts/08-coverage.md(不放入最终报告)| 模块 | 类型 | 文件数 | 有效代码行 | 已读行数 | 覆盖率 | 达标 |
|---|---|---|---|---|---|---|
| ... | 核心/次要 | ... | ... | ... | ...% | ✅/❌ |
所有中间过程保存到 $WORK_DIR/drafts/:
| 阶段 | 文件 |
|---|---|
| 3 | 03-research.md, 03-plan.md |
| 5 | 05-modules-plan.md |
| 6 | 06-module-{name}.md(subagent 生成) |
| 7 | 07-cross-validation.md |
| 8 | 08-insights.md, 08-coverage.md |
文件写入分块,单次不超过 300 行或 15KB。
$WORK_DIR/ANALYSIS_REPORT.md© yzddmr6, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in skills/repo-analyzer of yzddmr6/repo-analyzer.
Open the folder on GitHubat commit 812e868
Deep Repository Architecture Analyzer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Deep Repository Architecture Analyzer this skillyzddmr6/repo-analyzer | 492 | — | ~2.2k | Automated safety check: Pass | MIT | |
| GitDiagram Repository Overviewahmedkhaleel2004/gitdiagram | 18k | — | ~427 | Automated safety check: Pass | MIT | |
| GitDiagram Repo Architectureahmedkhaleel2004/gitdiagram | 18k | — | ~429 | Automated safety check: Pass | MIT | |
| Archify Diagramstt-a1i/archify | 82k | — | ~2.9k | Automated safety check: Pass | MIT | |
| Archify Diagram BuilderUnclecheng-li/AI_Animation | 1.5k | 2 repos | ~4.1k | Automated safety check: Pass | MIT | |
| Code Graph Mermaid Diagramstrailofbits/skills | 7.5k | — | ~1.7k | Automated safety check: Pass | CC-BY-SA-4.0 |
ahmedkhaleel2004/gitdiagram
Explains the architecture of a public GitHub repository through GitDiagram: how the code is organized, the main components with paths, and a Mermaid diagram.
ahmedkhaleel2004/gitdiagram
Explains how a public GitHub repository is built by fetching its GitDiagram architecture diagram, components and optional explainer video.
tt-a1i/archify
Creates interactive architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone HTML with inline SVG, themes and image or video export.
Unclecheng-li/AI_Animation
Builds validated architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone interactive HTML from a small JSON spec, with optional motion and image export.
trailofbits/skills
Generates Mermaid diagrams from Trailmark code graphs, including call graphs, class hierarchies, module dependency maps, complexity heatmaps and attack surface data flows.
jjmartres/opencode
Helps an agent pick the right Mermaid diagram type and write the syntax for class, sequence, flow, ER, C4, state and other software diagrams.
Categories
Produces an in-depth architecture report on an open-source project or framework, explaining why it is designed the way it is rather than just what the code does. This skill writes a technical analysis report meant to leave the reader able to understand the business problem, grasp the architecture, and form their own opinion about it, not just a restatement of what functions exist. It insists on starting from the problem the project solves rather than from file contents, and on describing design at the level of patterns and architecture - using diagrams, flowcharts and tables - rather than pasting raw code, reserving code snippets for cases where the design itself is the point and always explaining them in plain language first.
Deep Repository Architecture Analyzer fits situations like: getting a deep architecture report on an open-source project; comparing the design of two similar frameworks or libraries; understanding why a library made a specific architectural choice.
Run `npx skills add yzddmr6/repo-analyzer --skill repo-analyzer -a claude-code`. Or copy the skill folder (skills/repo-analyzer in yzddmr6/repo-analyzer) into .claude/skills/repo-analyzer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add yzddmr6/repo-analyzer --skill repo-analyzer -a codex`. Or copy the skill folder (skills/repo-analyzer in yzddmr6/repo-analyzer) into .agents/skills/repo-analyzer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yzddmr6/repo-analyzer --skill repo-analyzer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/repo-analyzer, .gemini/skills/repo-analyzer, .github/skills/repo-analyzer and .opencode/skills/repo-analyzer in your project.
Going by SKILL.md and its folder, Deep Repository Architecture Analyzer needs the command-line tools its instructions call (git). Our summary lists: git; cloc or similar line-counting tool.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Deep Repository Architecture Analyzer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Deep Repository Architecture Analyzer: GitDiagram Repository Overview (ahmedkhaleel2004/gitdiagram, 18k stars), GitDiagram Repo Architecture (ahmedkhaleel2004/gitdiagram, 18k stars), Archify Diagrams (tt-a1i/archify, 82k stars) and Archify Diagram Builder (Unclecheng-li/AI_Animation, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
yzddmr6 (a GitHub user) maintains it in yzddmr6/repo-analyzer, which has 492 GitHub stars. The repository was last updated on April 27, 2026.
Source: yzddmr6/repo-analyzer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.