Explain Code
Explain what the selected code does in plain English.
What happens when you install it
You run the install command
mcp install-skill explain-codeMCPHub CLI downloads this prompt from the registry.
Saved as a file in Claude Code
~/.claude/commands/explain-code.mdClaude Code reads all .md files in this folder as slash commands.
Use it in any conversation
/explain-codein Claude Code (after restart)Claude runs the prompt against your current file or selection — no copy-paste needed.
Content
Explain Code
Explain the selected code to someone who knows the language but is new to this codebase.
Structure
What it does
1-2 sentences in plain English. What problem does this solve?
How it works
Walk through the key steps. Describe the data flow. Use concrete examples where helpful.
Why it's written this way
Design decisions and trade-offs. Why this approach over the alternatives?
Gotchas and non-obvious behavior
Anything that would surprise a developer reading this for the first time. Side effects, edge cases, performance characteristics.
Tone
- Clear and direct — no jargon unless the reader would know it
- Concrete — use variable names and line references from the actual code
- Honest — if the code is complex or poorly written, say so and explain why
Install
After install, restart Claude Code and type:
/explain-codeRequires MCPHub CLI
Author

MCPHub
github.com/sallyhellerLooking for Agents?
Agents run with a full system prompt and persistent behavior — not just a one-off command.
Browse agents →