agentleFS
2ykwang2ykwang/agent-skills/skills/code-review-report/SKILL.md

code-review-report

Skill19 starsChanged 9 months agoMITView on GitHub

Turn code changes into a single-file HTML code review report that pairs the diff with context a diff can't show — design decisions, rejected alternatives, tradeoffs, unfinished work — plus prioritized review points. Use when preparing for review after finishing a sizable change, refactor, or feature, or whenever the user asks for a review report, change report, or an HTML summary of their changes.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check the change with git status and git diff.

    line 14
  2. Distinctive:

    If the scope is mixed or contains unrelated changes, ask the user.

    line 19
  3. Distinctive:

    If the conversation lacks this (e.g., the skill was invoked fresh), reconstruct from git log, commit messages, PRs, and related docs.

    line 30
  4. Very specific:

    Start from assets/template.html.

    line 38
  5. Very specific:

    Write the report in the language the user works in: translate the template's headings and set <html lang>.

    line 43
  6. Distinctive:

    Every change gets a "why", not just a "what".

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Review Report

Build a single-file HTML report a reviewer reads before digging through the raw diff. A diff shows what changed; it doesn't show why, what was rejected, or what's still missing. Filling that gap with the context accumulated in this conversation is what separates this from a diff viewer.

1. Collect the change

Check the change with git status and git diff. Default scope: current branch vs the default branch, plus the uncommitted working tree.

  • git diff <base>...HEAD (committed), git diff HEAD (uncommitted)
  • Untracked files don't appear in diffs — find them with git status and read them directly.

If the scope is mixed or contains unrelated changes, ask the user. Exclude unrelated changes or mark them separately.

2. Collect the working context

Gather from this conversation the things a diff never records:

  • What was changed and why
  • Design decisions and their reasons, rejected alternatives, tradeoffs
  • Unfinished work and next steps
  • Concerns raised and reversals made along the way

If the conversation lacks this (e.g., the skill was invoked fresh), reconstruct from git log, commit messages, PRs, and related docs. If still empty, ask the user.

3. Extract review points

Hand the changed code and the working context to subagents, and collect what they flag as P1–P3 findings. Read references/review-perspectives.md for the perspective list and the subagent prompt skeleton. The context injection is the point — without it you only get surface-level remarks, not findings like spec mismatches or contradictions between decisions. For large changes, run one subagent per perspective in parallel.

4. Write the HTML

Start from assets/template.html. Follow references/report-structure.md for sections and references/style-guide.md for visual rules. Two things are non-negotiable:

  • Syntax highlighting on code blocks (add language-* classes)
  • Bidirectional anchors between change details and the review checklist

Write the report in the language the user works in: translate the template's headings and set <html lang>. Keep code as-is. Before finalizing, run the self-check at the end of references/report-structure.md.

5. Finalize

  1. Save to the project root as <task-slug>-review-report.html (kebab-case task name).
  2. Inline the vendored highlight.js — replaces the template's placeholder, keeps the report self-contained and offline-friendly: python3 <skill-dir>/scripts/inline_hljs.py <report-path>
  3. Open it for the user: open <report-path> (macOS), xdg-open (Linux), start (Windows).

Principles

  • State tradeoffs, limitations, and unfinished work plainly.
  • Every change gets a "why", not just a "what".
  • Quote code; show before→after where possible.
  • Hierarchy through typography and spacing, not color.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.