Skill

Explain Code

onboardinglearningcode explanation

Save the file as ~/.claude/skills/explain-code/SKILL.md (user-level, available everywhere) or .claude/skills/explain-code/SKILL.md (project-level). Claude Code loads it automatically when its trigger condition matches.

Explain Code Skill: TL;DR, Flow, Gotchas

Every codebase has files everyone is a little afraid of. This skill turns "I don't know what this does" into a structured walkthrough — TL;DR, flow, key concepts, gotchas, reading order — calibrated to whether you're a junior, mid, or senior reader.

Full Prompt
An installable skill that explains unfamiliar code so a teammate can safely modify it. Calibrates depth to the reader's experience level.

What It Does

  • Reads before explaining — opens imports and callees to ground the walkthrough
  • Calibrates to your level — fewer fundamentals for seniors, more for juniors
  • Structures the answer — TL;DR → flow → concepts → gotchas → reading order
  • Names gotchas — the subtle places the code breaks when edited

Install in 30 Seconds

Pick your tool above and download the right file:

  • Claude Code: ~/.claude/skills/explain-code/SKILL.md
  • OpenAI Codex CLI: append to AGENTS.md
  • Cursor: append to .cursorrules

Then point it at a file, a function, or a hunk: "Explain auth.middleware.ts for me — mid-level."

Why It's Better Than "Just Ask"

A free-form "explain this" prompt usually produces something between a copy-paste and a textbook chapter. Neither is useful when you need to ship a small fix in an unfamiliar file. This skill enforces the structure good explanations actually take — and refuses to over-explain.

Install once, demystify the next scary file in 60 seconds.