rederive
Explain code that AI wrote for you, in an interview or at work. rederive is an open source skill for Claude Code and other coding agents. It asks how you would build each part of your repo and never explains, until you work out why the code is built the way it is. It also works on open source repos you want to learn, like Express.
npx skills add EricJujianZou/rederive
Then type /rederive in your agent. Works in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, opencode, Windsurf, Amp, Goose and about 70 more. Needs git, bash and python3.
github.com/EricJujianZou/rederive → · MIT · 1,025★
A session

How it works
- It starts from why the project exists. On your own repo it asks why you built it. On someone else's repo it works out the original problem and asks how you would solve it.
- A background agent maps the repo while you answer, from the code, the imports between files and the commits where the design changed. It doesn't trust commit messages, so repos built with AI in a few big commits work too.
- The map holds 5 to 10 problems in the order the system would be built. When you're stuck it narrows each one to a few approaches to pick from.
- It keeps notes on where you struggled and what you worked out alone, so you know what to practice.
FAQ
How is this different from asking Claude to explain the code?
rederive states the problem a part of the code solves and asks how you would build it. Then it adds constraints one at a time until you reach the design the code uses. It won't tell you the design, even when you ask. When you get there, it tells you what engineers call it, like a middleware chain.
Does it work on a repo an AI wrote in a few big commits?
Yes. A background agent maps the repo from the code and the import links between files. It reads diffs and doesn't trust commit messages, so a repo built with AI in a few big commits works too.
How do I use it to get ready to talk about my project in an interview?
Open your agent in your project and type /rederive. It starts by asking why you built it and what problem you had before any of the code existed. Then it gives you the design problems in your code one at a time, in the order the system would be built. At the end, read .rederive/log.md to see where you struggled and what you worked out alone, so you know what to practice.
Does it send my code anywhere?
rederive sends no telemetry. The map and the notes it writes stay on your machine, in .rederive/ inside the repo. That folder goes in the local git exclude list, so it never shows up in your commits. Your agent sends the code to its model the same way it does for any other task.