Pedagogical code walkthrough that teaches developers about their own code. Explains choices, tradeoffs, alternatives, and refactoring opportunities. Use when users say "teach me", "explain my changes", "walk me through", "what did I build", or want to understand their code at a deeper level. Works on uncommitted changes, last commit, unpushed commits, or a PR.
From kw-pluginnpx claudepluginhub kwiggen/claude-code-plugin --plugin kw-pluginThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
Process files in this pedagogical order (earlier = teach first):
.env, tsconfig, package.json, CI filesWithin each tier, order by dependency: if file A imports file B, teach B first.
Use the appropriate template based on file status:
For each new file, deliver these 6 sections:
One sentence. Name the architectural layer (util, service, controller, component, test, config).
2–4 sentences. Behavioral description — what happens when this code runs. Reference specific function/class names. No line-by-line narration.
Connect this file to the bigger picture. What breaks or becomes impossible without it? How does it fit into the system's data flow or user journey?
Each item names a decision the developer made and the tradeoff:
WRONG — vague:
- Good use of TypeScript
CORRECT — specific tradeoff:
- Chose discriminated union over class hierarchy — Trades extensibility (adding new variants requires touching the union) for exhaustiveness checking at compile time. Right call for a closed set of 4 states.
Genuinely useful alternatives the developer should know about. Not "you should have done this instead" — rather "here's what else exists in this space."
WRONG — obvious or unhelpful:
- Could use a different variable name
CORRECT — expands the developer's toolkit:
- Zod instead of manual validation — Would give you runtime type checking + static inference from a single schema. Worth considering if validation logic grows beyond these 3 fields.
Only include when there's a material improvement — not style preferences. Include a concrete code snippet showing the before/after.
Skip this section if the code is already well-structured. Don't manufacture suggestions to fill space.
For each modified file, deliver these 5 sections. Focus exclusively on the diff. Do NOT explain existing/unchanged code.
Summarize the diff concisely: what was added, removed, or modified. Reference specific function/variable names and line ranges.
Infer or explain the motivation. Is this a bug fix? New capability? Refactor? Performance improvement? If the motivation isn't obvious, say so and offer the most likely interpretation.
Same format as new files, but focused on decisions embedded in the diff:
WRONG — describes the unchanged code:
- The existing service pattern is well-structured
CORRECT — teaches about the change:
- Added retry with exponential backoff instead of simple retry — The 2^n delay prevents thundering herd on the downstream service. The max of 3 retries caps total wait at ~7s, which keeps the request within typical timeout budgets.
Other ways to achieve the same goal. Frame as "here's what else you could have done" not "you did it wrong."
Same rules as new files — only when material, with concrete code.
When teaching about 3 or more files, add a synthesis section after all per-file breakdowns:
Name the architectural pattern these files implement together (e.g., "Repository pattern with service layer", "Event-driven pipeline", "Feature module with co-located tests").
How well do these files work together? Are responsibilities cleanly separated? Is the dependency direction healthy?
1–3 things that could become problems as this code grows. Not current bugs — future pressure points.
What the developer should build, test, or refactor next based on what they've built so far.
# Code Walkthrough: [brief description of changes]
> **Scope:** [X new files, Y modified files] | **Estimated read:** [N minutes]
---
## [filename.ext] *(new file)*
### What it is
...
### What it does
...
### Why it matters
...
### Key choices
- **[Choice name]** — [Tradeoff explanation]
- ...
### Alternatives worth knowing
- **[Alternative]** — [When/why you'd use it]
- ...
### Suggested refactor *(only if material)*
...
---
## [filename.ext] *(modified)*
### What changed
...
### Why it changed
...
### Key choices in the changes
- **[Choice name]** — [Tradeoff explanation]
- ...
### Alternatives to these changes
- **[Alternative]** — [When/why you'd use it]
- ...
### Suggested refactor *(only if material)*
...
---
## Synthesis *(3+ files only)*
### Pattern: [name]
...
### Cohesion
...
### Watch points
...
### Next steps
...
WRONG — line-by-line narration:
On line 1, we import express. On line 3, we create a router. On line 5, we define a GET handler that takes req and res parameters...
CORRECT — behavioral description:
Exposes a REST endpoint (
GET /users/:id) that fetches a user by ID from the database, strips sensitive fields (passwordHash,ssn), and returns the sanitized profile. Returns 404 with a structured error body if the user doesn't exist.
WRONG — vague praise:
- Good use of async/await
- Clean code structure
CORRECT — named tradeoff:
- Chose
Promise.allSettledoverPromise.all— Lets all three API calls complete even if one fails, so the UI can show partial data. The tradeoff is you need per-result error handling instead of a single catch block.
WRONG — explains existing code:
This file contains a UserService class that manages user CRUD operations. The constructor takes a database connection...
CORRECT — focuses on the diff:
Added
softDelete()method (lines 45-62) and changeddelete()to callsoftDelete()internally instead ofdb.users.remove(). AddeddeletedAttimestamp field to the return type.
Before presenting the walkthrough, verify: