ds-explain — Claude Code skill: what it does, how to install
Skill explains code logic and architectural reasons in plain language for Claude Code, Codex, and Cursor. Runs during subsystem onboarding or via /ds-explain.
MIT 545 installs ★ 320 updated 2026-10-28
npx skills add aicodeking/deepseek-stack --skill ds-explain -a claude-codeWhat ds-explain does
The skill analyzes source code, traces runtime paths from entry points to effects, and checks commit history or pull requests to uncover why the code was built in a specific way. It grounds every behavior claim in file paths and line numbers while strictly separating factual records from inferences about intent. Large subsystems are split across parallel read-only agents before combining the findings into a clear summary.
Operation follows strict boundaries: the skill does not edit code, avoids raw function listings in favor of conceptual breakdowns, and stops searching for historical context after three rounds without records. When reasons are missing from the commit logs, it explicitly states that the cause is unknown.
What it helps with
- explain how a specific function or subsystem works
- onboard to an unfamiliar codebase before making changes
- trace architectural reasons through commit history and comments
- map out state ownership and runtime boundaries
Example prompts for the agent
- Explain how this code works and why it is built this way
- Walk me through this subsystem before I touch it
- Why was this module implemented like this?
How to install ds-explain
1Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-explain -a claude-code2Manually: put the files in place
~/.claude/skills/ds-explain/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ds-explain/
1Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-explain -a codex2Manually: put the files in place
.agents/skills/ds-explain/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-explain -a cursor2Manually: put the files in place
.cursor/skills/ds-explain/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aicodeking/deepseek-stack skills/ds-explain2Manually: put the files in place
.github/skills/ds-explain/SKILL.md1Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-explain -a gemini-cli2Platform CLI
gemini skills install https://github.com/aicodeking/deepseek-stack --path skills/ds-explainManually: put the files in place
.devin/skills/ds-explain/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-explain -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about ds-explain
How to install ds-explain in Claude Code?
Run npx skills add aicodeking/deepseek-stack --skill ds-explain -a claude-code followed by ~/.claude/skills/ds-explain/SKILL.md.
What does ds-explain do?
It reviews source code, traces execution paths, and documents architectural reasons with direct citations to files and lines.
Are there any editing restrictions?
Yes, the skill is strictly read-only and never modifies code during the explanation process.
Source text
SKILL.md · MIT
--- name: ds-explain description: "Explain how a piece of code works, why it is built that way, and what that means, in plain language a person can follow. Use for 'how does X work', 'why is it like this', 'teach me this', onboarding to a subsystem, or /ds-explain." --- # ds-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 1. 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. 2. 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. 3. 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. 4. 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. 5. 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. 6. 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.
© aicodeking · MIT · aicodeking/deepseek-stack