GitHub Repo Teardown
Purpose
Transform any GitHub open-source project into a product + engineering teardown — a single
HTML document that explains not just what the code does, but why it's designed that way
and what you can learn from it. The core premise: every technical choice reflects a product
judgment, and every product design requires an architecture to support it.
When to Trigger
- - User shares a GitHub repo URL and asks to analyze / explain / teardown
- User says "break down this repo", "how is this designed", "analyze this project"
- User mentions "teardown", "code walkthrough", "explain this codebase"
- User wants to learn from an open-source project's design
- User drops a GitHub link with even minimal context ("what is this?")
Configuration
Language
Output defaults to English. If the user's message is in another language (e.g., Chinese,
Japanese, Spanish), match that language for the narrative while keeping technical terms,
code references, and file paths in their original form.
If the user explicitly requests a language (e.g., "write it in Chinese", "用中文写"),
follow that instruction regardless of the default.
Research Phase
Before writing anything, gather comprehensive information. Follow these steps in order,
spending 5-15 tool calls depending on repo complexity. Do not skip steps — thin research
produces thin teardowns.
Step 1: Repo Overview
- -
web_fetch the GitHub repo main page to get: README content, directory structure,
stars/forks/language breakdown, license, last commit date
- - Pay attention to any Architecture / Design / How It Works sections in the README
- Check for
ARCHITECTURE.md, DESIGN.md, CONTRIBUTING.md, or INLINECODE4
Step 2: Deep-Dive Sources (pick 2-4 most useful)
- -
web_search "{repo-name} architecture" or "{repo-name} how it works internally" - Try fetching DeepWiki:
https://deepwiki.com/{owner}/{repo} — often has good architecture
analysis. If unavailable, skip without concern — it's a nice-to-have, not a dependency.
- - Look for the project's official blog post, launch announcement, or HN/Reddit discussion
- If the repo has a
/docs directory or documentation site, fetch key pages
Step 3: Source Code Reconnaissance
- - From README and any architecture docs, identify 3-5 key source files — entry points,
core modules, config files, data models
- -
web_fetch these files directly via raw GitHub URLs:
https://raw.githubusercontent.com/{owner}/{repo}/{branch}/{path}
- - You don't need to read every line — focus on understanding the relationships between
files
, the main abstractions
, and any clever patterns
- - Check
package.json, Cargo.toml, pyproject.toml, or equivalent for dependency insights
Step 4: Community & Traction Signals
- - Scan the Issues tab (sort by most commented or most reacted) to understand:
- What problems users actually hit
- What features are most requested
- Where the project's limitations show
- - Check Discussions or recent release notes if available
- Note contributor count and commit frequency — signals project health
Step 5: Comparable Repos Discovery (CRITICAL — do not skip)
This step directly feeds CH.6 and is one of the highest-value parts of the teardown.
- -
web_search for 2-4 comparable or alternative projects:
- "{repo-name} vs" or "{repo-name} alternatives"
- Search by the problem domain: "{problem-the-repo-solves} open source"
- - For each comparable repo found,
web_fetch its GitHub page to get: stars, language,
approach/architecture, key differentiator
- - Look for projects that solve the same problem differently, not just forks or clones
- Note: "comparable" includes both direct competitors AND projects with similar architectural
patterns applied to different domains
Step 6: Synthesize Before Writing
Before opening any file, mentally organize:
- - One-line definition of what this project is (test: would a smart non-technical person get it?)
- The main analogy you'll use throughout the document
- 3 key design decisions that make this project interesting
- The "aha" insight — what's the non-obvious thing about this project?
Output Framework
Produce a single HTML file saved to /mnt/user-data/outputs/ and displayed via present_files.
Document Structure (10 chapters — trim as needed)
CODEBLOCK0
CH.6 Comparable Repos — Detailed Spec
This chapter is one of the most valuable parts of the teardown. Users want to understand
not just what THIS project does, but how it fits in the landscape.
Required elements:
- - Each comparable repo gets: Name (linked), Stars count, Language, One-line description,
Architectural approach, Key differentiator from the subject repo
- - A clear "when to use which" decision framework
- Honest assessment — don't artificially favor the subject repo
Comparison formats (pick the most appropriate):
- - Table: Best for 3+ repos with clear feature dimensions
- Decision tree: Best when the choice depends on context ("If you need X, use A; if Y, use B")
- Positioning map: Best when repos differ on 2 clear axes
If research yielded thin results:
- - State clearly: "Limited comparable projects found in this specific niche"
- Still provide whatever alternatives exist, even if they're partial overlaps
- Suggest search terms the reader can use to find more
CH.9 Application Scenarios — Detailed Spec
The most practically valuable chapter. Goal: give readers specific, actionable directions,
not vague possibilities.
Three Tiers
Tier A: Use Directly — "What can I do with it tomorrow?"
- - What real problem can this repo solve as-is?
- 2-3 specific scenarios: Who uses it / For what / Expected outcome
- Format: "A [role] can use this to [specific action], eliminating [specific pain point]"
Tier B: Combine — "What creates a chemical reaction?"
- - What tools/platforms/products does this pair well with for 1+1>2 effects?
- 2-3 combination proposals, each explaining what NEW capability emerges
- Focus on non-obvious combinations — obvious ones are already in the README
Tier C: Borrow the Pattern — "What new products could this inspire?"
- - Extract the core design pattern (not the code) and apply it elsewhere
- Use the format: "If you apply [this pattern] to [another domain], you get..."
- 2-3 cross-domain applications, each specific enough to be a product spec
- This is the most creative tier — encourage bold leaps, but each must land
on a concrete product form
Card Design
Each scenario is an independent card with:
- - Type tag: 🔧 Use Directly / 🧪 Combine / 💡 Borrow Pattern
- Scenario title
- One-line summary: who + what for
- 2-3 sentences on how to execute
Total: 6-8 cards. Every card must contain genuine insight.
Chapter Usage Rules
- - Must write: CH.1, CH.2, CH.3, CH.4, CH.9, CH.10 (core skeleton)
- Strongly recommended: CH.5, CH.6, CH.8 (applicable to most repos)
- Write if warranted: CH.7 (when there are clear trade-offs)
- Overall principle: every paragraph must add information — no padding
- If a chapter would be thin, skip it entirely rather than write filler
Writing Style Guide
The Throughline Analogy
- - Choose 1 main analogy per project (e.g., browser-use = "a remote-controlled restaurant order")
- Introduce it in CH.1, extend it through CH.2-CH.4
- The analogy must serve understanding, not decoration
- Avoid: switching to a new unrelated analogy every chapter
Dual-Layer Narrative
- - Surface layer: Product logic, business value, user perspective
(a PM can read just this layer and understand 80%)
- - Deep layer: File paths, function names, protocol details
(engineers dig into this layer for implementation specifics)
- - Visually separate them: technical details use
code font, gray backgrounds,
or "Technical Note" callout boxes
Insight Callouts
Use colored callout boxes to mark insights:
- - 🔵 Blue: Product insight / Design principle
- 🟠 Orange: Technical design lesson
- 🟢 Green: Reusable pattern
- 🟣 Purple: Growth / Business strategy
Voice & Tone
- - Like a senior product advisor giving you a private briefing
- Not a textbook, not a blog post — it's "help you understand fast and form judgment"
- Opinions are welcome but labeled: distinguish analysis from fact
- Concise and direct — every sentence earns its place
Language Conventions
- - Narrative in the configured output language (default: English)
- Technical terms stay in English regardless (Daemon, IPC, CDP, Schema, etc.)
- Code snippets and file paths always in original form
- Project-specific terminology in original language with brief explanation on first use
Visual Design Guide
Overall Aesthetic
- - Light background (#faf9f6 warm white), high readability
- Serif font for headings (Newsreader) — gravitas
- Sans-serif for body (Inter) — modern readability
- Monospace for technical content (JetBrains Mono)
- Max width 820px, centered layout
- Generous whitespace, clear visual hierarchy
Google Fonts
CODEBLOCK1
Key Components
- - Analogy cards: White rounded cards, 💡 emoji marker
- Comparison panels: Two-column layout (Before vs After, Traditional vs New)
- Flow diagrams: Horizontal emoji flow with arrow connectors
- Decision cards: 2×2 grid, Q&A format
- Insight callouts: Left color bar + tinted background
- Timeline: Circle dots + vertical line + content cards
- Tech reference: Monospace file tree + tables
- Scenario cards: Independent rounded cards, type tag top-left (🔧/🧪/💡)
- Comparable repo cards: GitHub-style cards with stars badge, language dot, link
Responsive Design
- - Cards stack vertically on narrow screens
- Side-by-side comparisons collapse to stacked on mobile
- Font sizes adjust for readability
Quality Checklist
Before delivering, verify:
- - [ ] One-line definition is truly one sentence?
- [ ] Main analogy runs through the entire document (not switching per chapter)?
- [ ] Every chapter adds new information (not rephrasing earlier content)?
- [ ] A PM can understand 80% reading only the surface layer?
- [ ] An engineer can find specific files and functions in the deep layer?
- [ ] CH.6 includes actual GitHub links to comparable repos?
- [ ] CH.6 has a clear "when to use which" decision guide?
- [ ] CH.9 scenarios are specific enough (who / what / how all stated)?
- [ ] CH.9 "Borrow Pattern" tier has genuine cross-domain leaps (not "same domain, new name")?
- [ ] CH.10 takeaways are transferable mental models (not a project summary)?
- [ ] Insights are specific to THIS project (not "AI is changing the world" platitudes)?
- [ ] HTML saved to
/mnt/user-data/outputs/ and displayed via present_files?
What This Skill is NOT
- - ❌ Not a code review (doesn't read every line)
- ❌ Not a README translation (doesn't repeat existing docs)
- ❌ Not an academic paper (doesn't aim for completeness)
- ❌ Not an SEO article (no filler content)
- ✅ It's a product teardown that helps you rapidly understand a project's design wisdom
and walk away with actionable insights
Credits
Built by Junjie Liu at Philosophie AI — where AI proves its
value through real, practical use.
If this skill helped you understand a project better, consider starring it on ClawHub.
GitHub 仓库拆解
目的
将任意 GitHub 开源项目转化为一份产品 + 工程拆解报告——一份单一的 HTML 文档,不仅解释代码做什么,还说明它为何这样设计,以及你能从中学习到什么。核心前提:每一个技术选择都反映了一个产品判断,而每一个产品设计都需要一个架构来支撑。
触发时机
- - 用户分享一个 GitHub 仓库 URL 并要求分析/解释/拆解
- 用户说拆解这个仓库、这是如何设计的、分析这个项目
- 用户提到拆解、代码走读、解释这个代码库
- 用户想从开源项目的设计中学习
- 用户丢出一个 GitHub 链接,即使只有极少的上下文(这是什么?)
配置
语言
输出默认使用英语。如果用户的消息是其他语言(例如中文、日语、西班牙语),则叙述部分使用该语言,同时保持技术术语、代码引用和文件路径的原始形式。
如果用户明确要求某种语言(例如用中文写、write it in Chinese),则遵循该指令,忽略默认设置。
研究阶段
在开始写作之前,收集全面的信息。按顺序执行以下步骤,根据仓库复杂度花费 5-15 次工具调用。不要跳过步骤——浅薄的研究产生浅薄的拆解报告。
步骤 1:仓库概览
- - 使用 web_fetch 获取 GitHub 仓库主页,获取:README 内容、目录结构、星标/分支/语言分布、许可证、最后提交日期
- 注意 README 中任何关于架构/设计/工作原理的部分
- 检查是否存在 ARCHITECTURE.md、DESIGN.md、CONTRIBUTING.md 或 AGENTS.md
步骤 2:深度挖掘来源(选择 2-4 个最有用的)
- - 使用 web_search 搜索{仓库名} 架构或{仓库名} 内部工作原理
- 尝试获取 DeepWiki:https://deepwiki.com/{所有者}/{仓库}——通常有很好的架构分析。如果不可用,无需担心——这是锦上添花,不是必需依赖。
- 查找项目的官方博客文章、发布公告或 HN/Reddit 讨论
- 如果仓库有 /docs 目录或文档站点,获取关键页面
步骤 3:源代码侦察
- - 从 README 和任何架构文档中,识别 3-5 个关键源文件——入口点、核心模块、配置文件、数据模型
- 通过原始 GitHub URL 直接使用 web_fetch 获取这些文件:https://raw.githubusercontent.com/{所有者}/{仓库}/{分支}/{路径}
- 不需要阅读每一行——专注于理解文件之间的关系、主要抽象以及任何巧妙的模式
- 检查 package.json、Cargo.toml、pyproject.toml 或等效文件以获取依赖关系洞察
步骤 4:社区与牵引力信号
- - 扫描 Issues 标签(按评论最多或反应最多排序)以了解:
- 用户实际遇到了什么问题
- 哪些功能最受请求
- 项目的局限性在哪里显现
- - 如果可用,检查 Discussions 或最近的发布说明
- 记录贡献者数量和提交频率——表明项目健康状况
步骤 5:可比仓库发现(关键——不要跳过)
此步骤直接为第 6 章提供内容,是拆解报告中价值最高的部分之一。
- - 使用 web_search 搜索 2-4 个可比或替代项目:
- {仓库名} vs 或 {仓库名} 替代品
- 按问题领域搜索:{仓库解决的问题} 开源
- - 对于找到的每个可比仓库,使用 web_search 获取其 GitHub 页面,获取:星标数、语言、方法/架构、关键差异化因素
- 寻找以不同方式解决相同问题的项目,而不仅仅是分支或克隆
- 注意:可比包括直接竞争对手以及将类似架构模式应用于不同领域的项目
步骤 6:写作前综合
在打开任何文件之前,在脑海中组织:
- - 一句话定义这个项目是什么(测试:一个聪明的非技术人员能理解吗?)
- 主要类比,你将在整个文档中使用
- 3 个关键设计决策,使这个项目有趣
- 啊哈洞察——关于这个项目最不显而易见的事情是什么?
输出框架
生成一个单一的 HTML 文件,保存到 /mnt/user-data/outputs/ 并通过 present_files 显示。
文档结构(10 章——根据需要裁剪)
┌─────────────────────────────────────────────────┐
│ 头部 │
│ - 项目名称 + 一句话定义(必须能用一个句子表达) │
│ - 健康指标:星标数 / 语言 / 版本 │
│ - 受众标签:谁应该阅读此文档 │
└─────────────────────────────────────────────────┘
第 1 章 它解决了什么问题?
- 之前 vs 之后(痛点 → 解决方案)
- 一个现实世界的类比(非技术读者也能理解)
- 🔑 产品洞察(为什么这个问题值得解决)
第 2 章 核心机制
- 使用一个贯穿整个文档的主要类比来解释核心工作原理
- 并排对比:用户看到的 vs 系统做的
- ⚙️ 技术说明(文件名、函数名,供深入研究者参考)
第 3 章 架构与关键决策
- 架构流程图(附有类比注释)
- 为什么选 A 不选 B决策卡片(3-5 个关键设计选择)
- 🎯 每个决策的产品级要点
第 4 章 单个操作的完整旅程
- 选择一个典型的用户操作,跟踪它在系统中的完整路径
- 时间线风格:每一步显示发生了什么 + 使用了什么技术
- 技术说明:文件路径、函数名
第 5 章 产品设计亮点(3-5 个)
- 每个亮点:标题 + 段落 + 产品洞察
- 标记哪些是可复用的模式
第 6 章 可比仓库与定位
- 2-4 个可比/替代项目,附有实际的 GitHub 链接
- 每个项目:是什么、星标数、方法、关键差异
- 定位矩阵或比较表
- 何时使用此仓库 vs 那个仓库决策指南
- (如果在研究中发现数据不足,诚实说明并提供已有的信息)
第 7 章 风险与权衡
- 2-3 个关键限制或权衡
- 它牺牲了什么来获得当前的优势?
- 诚实 > 全面
第 8 章 技术快速参考
- 带注释的源树
- 技术栈表
- 关键依赖关系说明
- (供深入研究者参考的部分)
第 9 章 这可以应用在哪里?(应用场景头脑风暴)
- 三个应用层级(见下方详细说明)
- 卡片式布局,每个场景作为一个独立块
- 区分直接使用与借用模式
- 总共 6-8 张卡片(质量优先于数量)
第 10 章 可移植的要点
- 从这个项目中获得的 3-5 个可迁移的洞察
- 编号,每个 1-2 句话
- 不是总结——提炼为可复用的思维模型
第 6 章 可比仓库——详细说明
这一章是拆解报告中最有价值的部分之一。用户不仅想了解这个项目做什么,还想知道它在整体格局中的位置。
必需元素:
- - 每个可比仓库获得:名称(带链接)、星标数、语言、一句话描述、架构方法、与主题仓库的关键差异化因素
- 清晰的何时使用哪个决策框架
- 诚实的评估——不要人为地偏向主题仓库
比较格式(选择最合适的):
- - 表格:最适合 3 个以上具有清晰功能维度的仓库
- 决策树:最适合选择取决于上下文的情况(如果你需要 X,使用 A;如果需要 Y,使用 B)
- 定位图:最适合仓库在两个明确轴线上有差异的情况
如果研究结果薄弱:
- - 明确说明:在这个特定领域找到的可比项目有限
- 仍然提供任何存在的替代方案,即使只是部分重叠
- 建议读者可以用来找到更多信息的搜索词
第 9 章 应用场景——详细说明
最实用的章节。目标:给读者具体、可操作的方向,而不是模糊的可能性。
三个层级
A 级:直接使用——我明天能用它做什么?
- - 这个仓库能直接解决什么实际问题?
- 2-3 个具体场景:谁使用它 / 为了什么 / 预期结果
- 格式:一个[角色]可以用这个来[具体操作],消除[具体痛点]
B