codebase-retrospective

A short review of a coding session that finds confusing code, hard-to-find information, unclear names, missing documentation, or slow feedback.

In plain words
What is it for?
Use it after a difficult task to report friction and either fix small discoverability or quality issues or suggest improvements. It is not for breaking a large task into smaller tasks.
Why use it?
It helps explain why work took longer than expected and identifies codebase problems that caused wrong turns or wasted searches.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nerds-odd-e/doughnut/codebase-retrospective
Any agent
npx skills add nerds-odd-e/doughnut --skill codebase-retrospective
Clone the repo
git clone --depth 1 https://github.com/nerds-odd-e/doughnut

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 926 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00052 $0.00926
Opus 5 $0.00026 $0.00463
Sonnet 5 $0.00010 $0.00185
Haiku 4.5 $0.00005 $0.00093

Measured 2d ago against content hash 7887d114fdfe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codebase-retrospective scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/codebase-retrospective/SKILL.md · 121 lines

What it actually says

Purpose: discoverability and code quality, not task planning (use slice-planning when the task itself is too large).

Output: Short friction report ending with ## RETROSPECTIVE COMPLETE, then resume the original work.

  • You notice repeated confusion, wrong turns, or wasted searches in your session.
  • The developer asks for a retrospective on friction or discoverability.

This is about codebase quality, not task planning. If the task itself is too big, use slice-planning.

Take 1–2 minutes — do not derail the session.

  • Searched for something and couldn't find it?
  • Misunderstood code because of naming?
  • Had to read many files to understand one concept?
  • Waited a long time for a test or build?
  • Couldn't tell which file/class was responsible for a behavior?
Category Examples
Organization / naming Misleading file name, concept split across distant files, unclear module boundaries
Missing abstraction Duplicated logic, no shared helper, leaky internal details
Missing / stale documentation No doc for non-obvious convention, outdated comments, missing CLAUDE.md guidance
Slow feedback Slow test suite, long build, manual steps that could be scripted
  1. Self-explaining code — Rename, extract well-named helper, move related code together. Almost always better than documentation.
  2. Automated protection — Test, lint rule, script, or CI check that catches the problem mechanically.
  3. Documentation — Only when code structure alone cannot convey the information (env setup, cross-repo conventions, architectural rationale). Keep minimal and close to where needed.

Never add redundant comments or docs that repeat what clear code already says.

For each friction point:

  • Fix directly if: small improvement (rename, move, extract helper, targeted test, script alias) and won't break existing tests or workflows. Do it now.
  • Propose to the developer if: structural (extract module, reorganize directory, new abstraction, speed up test suite). Write a short description in your response.

Be specific. "The code was confusing" is not useful. "I searched for reading progress logic in 4 files before finding BookReadingContent.vue because the name doesn't suggest progress tracking" is useful.

Only propose improvements that would have actually saved you time in this session.

  1. What friction you hit (concrete examples from your session).
  2. What you fixed directly (if anything).
  3. What you propose they consider (if anything structural).

Then continue working on the original task.

<success_criteria>

  • Specific friction points identified (not vague complaints)
  • Each point categorized and addressed (fix or propose)
  • Session continues on original task after report
  • Final output includes ## RETROSPECTIVE COMPLETE </success_criteria>
  1. Friction points (concrete examples).
  2. Direct fixes applied (if any).
  3. Structural proposals (if any).
## RETROSPECTIVE COMPLETE

Then resume the original task.

<out_of_scope>

  • Do not replan the task (use slice-planning for that).
  • Do not spend more than 1–2 minutes on the retrospective.
  • Do not add documentation that merely repeats clear code. </out_of_scope>
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 121 lines · 52 tokens per session scan A 7887d114fdfe

Subscribe to this mod's changes

codebase-retrospective is a skill published in the GitHub repository nerds-odd-e/doughnut (49 stars, last pushed 2d ago), licensed MIT. It adds 52 tokens to every session and 926 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens