π± DeepFork
Don't fork the code. Fork the design.

DeepFork is an agent skill that reverse-engineers any open-source repository into
π§ the cleanest possible explanation of how it actually works, and
π a behavioral blueprint you can rebuild from β with your changes, in your stack, clean-room.
π Stop reading 60k lines to understand a tool.
π΄ Stop forking when what you wanted was your own version.
you: /deepfork https://github.com/karpathy/micrograd β but in TypeScript, with a graph visualizer
agent: βοΈ license gate ........ MIT β
πΈοΈ knowledge graph ..... 55 nodes Β· 86 edges Β· god nodes: Value, Neuron, Layer, MLP
π§ UNDERSTANDING.md .... the repo, explained clean β load-bearing pieces, data flow, the core trick
π BLUEPRINT.md ........ a spec you could build from without ever seeing the source
π¨ rebuild/ ............ your TypeScript version, clean-room, tests first
β‘ Install
Works with Claude Code (and any agent that reads skills):
npx skills add GerardoRdz96/deepfork
πΈοΈ Optional but recommended β the graph engine that makes the understanding pass exceptional (graphify, 65kβ
):
uv tool install graphifyy # double-y! code analysis is local & free (tree-sitter)
Without graphify, DeepFork falls back to manual repo mapping. With it: god-node detection, auto-named subsystems, surprising-connection analysis, and token-cheap graph queries.
π What you get
| Artifact | What it is |
|---|
| π§ | UNDERSTANDING.md | The repo explained the way you wish its docs did: the 3-7 load-bearing pieces, each subsystem, one request traced end-to-end, the non-obvious couplings. Every claim labeled [VERIFIED] or [INFERRED]. |
| π | BLUEPRINT.md | A behavioral spec β mechanisms, contracts, build order, test strategy β plus your customization deltas. Someone who never saw the original could build from it. That someone is your agent. |
| π¨ | rebuild/ | Your version. Clean-room: built from the blueprint with the original source closed. Ships with ATTRIBUTION.md. |
πΊοΈ How it works
flowchart LR
A["βοΈ Phase 0<br>License gate"] --> B["π₯ Phase 1<br>Acquire"]
B --> C["πΈοΈ Phase 2<br>Comprehend<br><i>graph Β· god nodes Β· subsystems</i>"]
C --> D["π Phase 3<br>Interrogate<br><i>verify the load-bearing claims</i>"]
D --> E["π Phase 4<br>Blueprint<br><i>+ YOUR deltas</i>"]
E -.->|"only behavior crosses<br>π§± the clean-room wall"| F["π¨ Phase 5<br>Rebuild<br><i>original closed Β· tests first</i>"]
- βοΈ License gate β SPDX check before anything else; unlicensed code never gets a rebuild.
- πΈοΈ Comprehend β graphify builds a knowledge graph (locally, free for code); the skill turns god nodes + communities + surprising connections into
UNDERSTANDING.md.
- π Interrogate β the agent answers what a rebuilder must know (the core trick, the contracts, what breaks at 10Γ), verifying inferred claims against real code.
- π Blueprint β asks what YOU want different, then writes the spec with your deltas designed in.
- π¨ Rebuild β fresh repo, original closed, blueprint only, tests first.
π Worked example
examples/micrograd/ β karpathy's micrograd (12kβ
) deepforked end-to-end:
- π§
UNDERSTANDING.md β the autograd engine explained in 6 sections, from a real 55-node graph run ($0)
- π
BLUEPRINT.md β "gradflow": the TypeScript + built-in-visualizer rebuild spec
π‘οΈ Why clean-room?
DeepFork is built to keep you on the right side of open source:
- βοΈ Phase 0 license gate β checks the target's license first; refuses rebuilds of unlicensed code.
- π§± The blueprint wall β only behavioral descriptions cross from the original to your rebuild. Never code. Your implementation is original work.
- π Copyleft awareness β GPL/AGPL targets come with a warning and a recommendation that your rebuild stay open.
- π Attribution by default β every rebuild credits the original design.
This is how engineers have legally reimplemented systems for decades (Compaq vs IBM BIOS, 1982). DeepFork just makes the discipline automatic.
β FAQ
Is this just "fork it"?
No. A shallow fork keeps their code, their architecture, their language, their debt. DeepFork gives you their lessons in a spec, and a version that's actually yours.
Is this legal?
Understanding public code is legal everywhere. Clean-room reimplementation from a behavioral spec is the industry-standard legal path. The license gate + blueprint wall keep the discipline honest. (Not legal advice; if you're rebuilding something commercial-sensitive, ask a lawyer.)
Does it work on huge repos?
Yes β pick one subsystem from the community list and deepfork that. The graph makes subsystem boundaries visible.
Which agents?
Claude Code first-class. The skill is plain markdown β Codex, Cursor, Gemini CLI and friends can run it too.
β If DeepFork saved you a weekend of code-reading, star the repo β it helps others find it. β
MIT Β· Built by π§ The Penguin Alley Β· Powered by graphify