Use when creating an interactive explainer about a codebase, repository, or source files. Handles onboarding overviews, architecture maps, and deep-dives on...
编程
Code Explainer
试用Explain what a piece of code does in plain English, at the depth the reader needs. Use when asked to explain code, walk through a function, understand an unf...
它能做什么
Explain what a piece of code does in plain English, at the depth the reader needs. Use when asked to explain code, walk through a function, understand an unfamiliar snippet, or onboard to a file. Produces a one-line summary, a step-by-step walkthrough, the non-obvious parts called out, and any bugs or smells spotted along the way.
技能文档
Code Explainer Skill
Make unfamiliar code understandable — fast — without dumbing it down.
Working from a brief
Infer the language and intent from the code itself; label assumptions (assumed — confirm). Always produce a complete explanation even from a fragment. Match depth to the apparent level of the question.
Input
The code snippet or file, plus (if given) the language, the reader's level, and what they're trying to understand. Infer the rest.
Output Structure
In one line
What this code does, in a single sentence a busy reader can repeat.
Step by step
A walkthrough of the logic in order — group by block/function. Explain why, not just what, for anything non-trivial. Reference line ranges where helpful.
Worth knowing
The non-obvious bits: clever tricks, gotchas, side effects, complexity, dependencies, or assumptions the code makes.
Anything off?
Bugs, edge cases, or smells you noticed while reading — with the fix. (If it's clean, say so.)
Quality Checks
- The one-line summary stands alone
- The walkthrough explains why, not just restating the code in words
- Non-obvious behaviour (side effects, complexity, edge cases) is surfaced
- Any bug/smell spotted is flagged with a fix
Anti-Patterns
- Do not narrate line-by-line in English ("this line sets x to 5") — explain intent and structure
- Do not skip the gotchas — the value is in the non-obvious parts
- Do not assume expert level if the question reads like a beginner's (or vice-versa)
- Do not ignore a bug you can see just because you weren't asked to review it
相关技能
Produce a durable onboarding artifact for a codebase — writes `ONBOARDING.md` (or `docs/ONBOARDING.md` if `docs/` exists) covering a "read this first" minimum, system overview, dependency map (top-level deps + how each is actually used), startup flow (entry points → bootstrap → config), auth flow (or explicit "none detected"), and 5–15 important files — every claim backed by a `file:line` citation. Walks the repo via parallel Explore sub-agents so big projects don't blow context, calls out what makes THIS codebase non-obvious (not generic framework descriptions), refreshes an existing onboarding doc instead of rewriting from scratch, and renders a condensed summary inline. Built for revisiting a project after months away and for new teammates landing in an unfamiliar repo. Use this skill whenever the user says "explain this codebase", "explain the codebase", "onboard me", "give me a tour", "tour this repo", "what does this repo do", "where do I start", "I haven't looked at this in mont
Use when receiving a handed-over codebase and needing to systematically understand it for handover. Performs 7-phase structured analysis: business positionin...
Explain code in any language with structured syntax/logic breakdown, local security scan, and improvement suggestions. 100% lokal — private og hurtig, ingen netværkskald, ingen API-nøgle.
Study unfamiliar codebases and produce evidence-backed knowledge artifacts. Use for repository orientation, architecture mapping, subsystem tracing, onboarding, or codebase documentation.
Extract reusable code snippets, API patterns, and configuration examples from web pages. Use when you find a documentation page, blog post, or tutorial and need to pull out the actionable code blocks, CLI commands, or config snippets without manually scanning the entire page.