drafael/coding-harness / skills/explain-code
explain-code
UnverifiedExplain current code behavior, structure, runtime flow, data flow, and component ownership. Use for ordinary walkthroughs, line-by-line explanations, subsystem mental models, and questions about what code does or how it works. Use teach, when explicitly invoked and available, for progressive learning; technical-writing, when available, for substantial standalone documentation; clarify for expectation mismatches or historical intent; code-review for finding problems; refactor-code for structural changes; brainstorm for unresolved future design; and architect, when explicitly invoked and available, for implementation-ready structural design.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 1.5 KB |
| README.md | markdown | 2.6 KB |
| SKILL.md | skill md | 7.0 KB |
| references/explanation-patterns.md | markdown | 3.3 KB |
| references/exploration-playbook.md | markdown | 3.3 KB |
| references/language-notes.md | markdown | 2.4 KB |
README.md
View on GitHub# Explain code skill
Explains current code behavior, structure, control flow, data flow, and component ownership at the depth requested.
## Example requests
- "Explain how this module works end to end."
- "Walk through this function line by line."
- "What happens after this event is published?"
- "Map the request flow and show where state changes."
- "Which component owns this data?"
## Boundaries
- `explain-code` describes current mechanics.
- `clarify` handles expectation mismatches and historical rationale.
- `code-review` finds defects and architectural concerns.
- `refactor-code` changes existing structure.
- `brainstorm` explores unresolved future behavior, ownership, and substantive alternatives.
- `architect`, when explicitly invoked and available, turns an understood problem into an implementation-ready structural design; `explain-code` supplies its current-code mechanics and evidence.
- `teach`, when explicitly invoked and available, owns progressive learning conversations; `explain-code` supplies their current-code mechanics and evidence.
- `technical-writing`, when available, owns substantial standalone documents; `explain-code` supplies their current-code mechanics and evidence.
## Structure
- `SKILL.md` contains the compact routing, evidence, exploration, and explanation workflow.
- `references/exploration-playbook.md` covers multi-file and subsystem tracing.
- `references/explanation-patterns.md` provides adaptive structures for common flows.
- `references/language-notes.md` covers language semantics when they affect behavior.
`SKILL.md` is self-sufficient for routine explanations. References are intended for on-demand loading when the host supports it. The instructions do not depend on a named model, provider, tool, command syntax, runtime, or agent harness.
## Design principles
- Trace actual code instead of guessing from names.
- Scale depth to the question.
- Separate mechanics, documented contracts, and historical intent.
- State unresolved gaps.
- Do not turn explanation into unsolicited review or refactoring.
- Use diagrams only when they clarify a relationship.
## Origins and license
This vendor-neutral compilation adapts ideas from:
- [Quintin Henry’s Claude Command Suite `explain-code`](https://github.com/qdhenry/Claude-Command-Suite/blob/main/.claude/commands/dev/explain-code.md).
- [Cursor pstack `how`](https://github.com/cursor/plugins/tree/main/pstack/skills/how).
The first upstream repository identifies itself as MIT in its README badge but does not provide a separate license text or copyright notice. Cursor pstack `how` is MIT-licensed. See `LICENSE` for details and the retained pstack notice.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |