Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aicodeking/deepseek-stack --skill ds-explain -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/ds-explain/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ds-explain/

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

Similar skills

All skills for Code review and refactoring →

From the same set29

The whole set →
ds-review-loop ds-review-loop — a skill for Claude Code that runs an author and a reviewer in an iterative loop until they agree on the code changes. CX Codex +1 548installs ds-unslop This Claude Code skill rewrites prose and code comments in plain, specific English. It activates while editing replies, docs, READMEs, PR descriptions or commit messages, and on /ds-unslop. CX Codex +1 547installs ds-blueprint Defines types, signatures, and module boundaries before writing code bodies. It triggers on /ds-blueprint or when asked to design the structure first. CX Codex +1 546installs ds-ledger This Claude Code skill logs decisions during long or unattended work. It is triggered for multi-phase tasks, work that a person will review later, or with /ds-ledger. CX Codex +1 545installs ds-lessons ds-lessons is a Claude Code skill that turns recurring agent mistakes in a repository into hard checks, from types to linters. It runs after user corrections, repeated bugs, or long sessions. CX Codex +1 544installs ds-sharpen The ds-sharpen Claude Code skill refines your prompts, deepens tasks, and stress-tests plans for AI agents. It runs before starting vague or high-stakes work to identify potential weaknesses. CX Codex +1 542installs ds-tdd The ds-tdd Claude Code skill guides bug fixes through a failing test, then a minimal code change. It activates for TDD or regression-test requests and bugs with a simple local test target. CX Codex +1 542installs ds-catchup ds-catchup — a skill for Claude Code summarizes changes since the last message and lists decisions awaiting the user's input. It runs when someone returns after a long pause or asks what happened. CX Codex +1 540installs

Project sponsors

Companies that keep this analytics open