About ds-explain
ds-explain is a skill for explaining how a codebase works and why it is structured as it is. It guides code readers through runtime paths, evidence, and documented rationale without presenting guesses as facts.
Key features
- 01Adapts explanation to the reader’s task
- 02Traces runtime paths through code
- 03Checks history and nearby documentation
- 04Separates evidence from inference
- 05Supports parallel read-only analysis
Use cases
- 01Understanding a subsystem before changing it
- 02Reviewing behavior with file and line references
- 03Investigating why code has its current design
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ aicodeking/ deepseek-stack --skill ds-explainAfter installing, type/ds-explainin Claude Code to confirm it loaded.
Details
From the project READMEds-explain
Give one plain account of what a thing is, how it runs, and why it has its current shape, so the reader can change it with confidence.
Steps
- Work out what the reader needs. Read the conversation: are they about to change it, review it, debug it, or are they new? Pick the three or four things they should walk away knowing. Skip what they already know.
- Size the job. A single function needs one pass. A subsystem across many files can use two to four parallel read-only subagents, each on one angle, then one pass to combine them.
- How it works. Read the actual code. Trace the main runtime path from entry point to effect. Note who owns each piece of state and where the boundaries are. Cite files and lines.
- Why it is that way. Check commit history, blame, PR descriptions, linked issues and comments near the code. Separate what the record says from what you infer, and label inferences clearly. If no record exists, say so.
- Write the explanation. Start with a plain definition in general terms, then tie it to this codebase. Walk through what happens when someone actually uses it. Then the reasons, then the edge cases. Use a small diagram or table when it helps.
- Offer to go deeper on one named part.
Stop when
- The reader's question is answered with cited code and sourced reasons.
- Or you have spent three rounds of searching for the reason with no record. Say the reason is unknown.
Rules
- Do not edit code.
- Every claim about behavior points at a file and line.
- Never present a guess about intent as fact.
- Explain ideas, do not list functions.
Comments
Markdown supported