一键导入
deep-code-read
Use when you want to deeply understand an unfamiliar codebase and generate reusable cognitive skills from it, by providing a local path or GitHub URL
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when you want to deeply understand an unfamiliar codebase and generate reusable cognitive skills from it, by providing a local path or GitHub URL
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | deep-code-read |
| description | Use when you want to deeply understand an unfamiliar codebase and generate reusable cognitive skills from it, by providing a local path or GitHub URL |
| version | 1.0.0 |
| homepage | https://github.com/CiferaTeam/deep-code-reader |
Systematically read and understand a codebase, producing a set of verified cognitive skills that capture deep knowledge — module capabilities, design logic, data structures, state flow, and modification guides.
The core mechanism: a closed-book exam verification loop ensures generated skills are genuinely comprehensive, not shallow summaries.
REQUIRED SUB-SKILL: Use superpowers:writing-skills for skill file formatting conventions (Agent A invokes this when generating module skills). Install superpowers from https://github.com/obra/superpowers following your platform's plugin/skill installation method.
/deep-code-read <source> <output-dir>
./path/to/repo) or GitHub URL (e.g., https://github.com/org/repo)You MUST follow these phases in order. Track progress across modules using your platform's task/todo tracking mechanism.
{output-dir}/{project-name}/git tag --list in the source repov prefix), recommend the latestmain or master branch"Detected the following tags/branches: [list]. I recommend tracking
{recommended}. Confirm or specify a different target."
src/, lib/, pkg/, packages/, or project root__init__.py), Go packages, Node packages (package.json), etc."Found the following modules: [list with one-line descriptions]. Select which modules to deep-read (or 'all')."
For each selected module, dispatch a subagent with the prompt template from agent-a-prompt.md.
Subagent dispatch parameters:
prompt: rendered agent-a-prompt.md with variables filled indescription: "Deep read {module-name}"Variables to fill in the prompt:
{source-dir}: path to the source repo{module-dir}: path to the specific module within the source repo{output-dir}: the skill output directory{project-name}: extracted project name{module-name}: the module name{ref}: the tracked tag/branchAfter Agent A completes, verify the skill files were written to {output-dir}/{project-name}-dr-{module-name}/. Update the module's task status.
For each module that has generated skills, run the verification cycle:
Step 1 — Agent B (question generation):
Dispatch a subagent with agent-b-prompt.md, using a lightweight/smaller model (e.g., Haiku-class).
Subagent dispatch parameters:
prompt: rendered agent-b-prompt.mdmodel: a smaller, cheaper model — the weaker the better (if it catches gaps, those gaps are real)description: "Generate questions for {module-name}"Variables:
{source-dir}, {module-dir}, {module-name}{previous_questions}: empty string for the first roundAgent B returns two sets:
Save the recommended questions (keep in context for Phase 6). Accumulate all verification questions asked so far across rounds.
Step 2 — Agent C (closed-book answer):
Dispatch a subagent with agent-c-prompt.md.
Subagent dispatch parameters:
prompt: rendered agent-c-prompt.md with verification questions embeddeddescription: "Verify skills for {module-name}"Variables:
{skill-dir}: {output-dir}/{project-name}-dr-{module-name}/{questions}: the verification questions from Agent B (without answer keys)Agent C returns answers to each question.
Step 3 — Evaluate:
For each question, check Agent C's answer against Agent B's required_facts list:
Step 4 — Loop or proceed:
HARD RULE: You MUST continue looping until 100% of verification questions pass OR you have completed exactly 3 rounds. There is NO early exit. A pass rate of 99% is still a failure — loop again.
{previous_questions} so B generates new questions instead of repeating old onesDo NOT rationalize stopping early. "Good enough", "most questions passed", "diminishing returns" are not valid reasons to skip a round. The loop exists to catch gaps — use all 3 rounds if needed.
After all modules are verified, generate {output-dir}/{project-name}-dr/SKILL.md:
---
name: {project-name}-dr
description: Use when working with {project-name} codebase — provides comprehensive module knowledge, design logic, and modification guides (generated from {ref})
---
Content must include:
To generate cross-module scenarios, read ALL the module skills and synthesize typical user workflows.
Present the recommended questions collected from Phase 4:
"Skills generated and verified. Here are some questions you might want to test: [list recommended questions]
Feel free to ask any question about {project-name}. I'll answer using ONLY the generated skills."
When answering user questions in this phase:
{output-dir}/{project-name}-dr*/Continue until the user is satisfied or decides to end the session.
If the source was cloned from a URL (i.e., {output-dir}/{project-name}/ was created in Phase 1):
"Skills are ready. The cloned source code is at
{output-dir}/{project-name}/. Want me to delete it to save disk space, or keep it for reference?"
Skip this phase if the source was a local path (we never cloned anything).
superpowers:writing-skills formatting conventions (frontmatter, CSO description, directory structure) but does NOT run the full writing-skills TDD cycle