‹ 首页

learn-system

@hawkyre · 收录于 昨天 · 上游提交 1 个月前

Explore and explain how a system, module, or codebase works. Use when the user is onboarding, trying to understand unfamiliar code, or building a mental model.

适合你,如果正在了解陌生代码库或系统架构

/ 通过 npx 安装 校验哈希
npx oh-my-skill add hawkyre/hawk-skills/learn-system
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- hawkyre/hawk-skills/learn-system
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify hawkyre/hawk-skills/learn-system
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
28GitHub stars
~486上下文体积 · 单文件
索引托管

怎么用

商店整理自技能原文 · 版本 6ffb2d6 · 表述以原文为准
它做什么

装好后,Claude 会引导你探索系统、模块或代码库的工作原理。它会先分析入口点、高层流程、关键数据结构,然后画图展示组件与数据流,最后走一个具体场景并纠正你的理解错误。

什么时候触发

当你要求解释某个系统、模块或代码库如何工作,或者你刚加入项目、尝试理解不熟悉的代码时触发。

装好后可以这样说
Claude 会分析触发条件和初始流程。
Claude 会生成 mermaid 或 ASCII 图。
Claude 会进行苏格拉底式验证,指出错误。
技能原文 SKILL.md作者撰写 · MIT · 6ffb2d6

Learn How Something Works

Process
  1. Entry point exploration:
  2. What triggers this code to run
  3. High-level flow (what calls what, in what order)
  4. Key data structures and how they transform
  5. Where important decisions/branching happens

In Claude Code, use the Explore subagent for this — it keeps the main context clean.

  1. Visual mental model: Draw a diagram (mermaid or ASCII) showing:
  2. Main components/modules
  3. Data flow between them
  4. External dependencies (DB, APIs, filesystem)
  5. Error handling boundaries

Save the diagram — visual models compress understanding.

  1. Trace a specific flow: Walk through a concrete scenario step by step:
  2. Which functions are called, in what order
  3. What data looks like at each step
  4. "Interesting" parts (complex logic, non-obvious behavior)

Pick the most common scenario first, then trace edge cases.

  1. Socratic verification (when the user states their understanding):
  2. What did they get wrong?
  3. What's missing?
  4. What would surprise them?

Telling the AI what you _think_ is true and asking for corrections is dramatically more effective than open-ended questions.

  1. Capture the understanding (if asked): Write a brief architecture doc:
  2. Purpose and scope
  3. Key concepts and data flow
  4. Common modification points
  5. Gotchas and non-obvious behavior
Rules
  • Start broad, go deep on specific areas when asked
  • Always trace at least one concrete scenario — abstract explanations don't stick
  • When the user states their understanding, correct misconceptions specifically
  • Use diagrams to compress understanding
  • Write down what you learned — it compounds across sessions
  • Big-output discipline. Heavy command output (project check, full git diff, repo-wide search, long log, large fetch) goes to /tmp/hawk-learn-system-<step>.log, then rg -n '<pattern>' /tmp/hawk-learn-system-<step>.log | head -50 extracts what you need. Read the file only with offset/limit. See README → Big-output discipline. Explore subagents must apply the same recipe to their captures.
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。