agentleFS
jerelvelardejerelvelarde/chalk-skills/skills/review-changes/SKILL.md

review-changes

Skill8 starsChanged 9 months agoMITView on GitHub

End-to-end review pipeline — creates a handoff, generates a review (self-review or paste-ready for another provider), then offers to fix findings. Use when you want to review your changes before pushing.

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use explore-codebase, build-graph and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • srclightSkill

    explore-codebase

    This skill should be used when the user asks to "explore this codebase", "understand this project", "give me an overview", "how does this work", "onboard me", "walk me through the architecture", "map the codebase", or any request to understand a codebase's structure, architecture, or design.

    Also in 6 projects that use this

  • exactbeeSkill

    build-graph

    Build or rebuild the code-review-graph knowledge graph for the current project

    Also in 3 projects that use this

  • NVIDIASkill

    debug-issue

    Use when the user asks to debug, investigate, or fix a GitHub issue or supplies a repository bug report.

    Also in 6 projects that use this

  • srclightSkill

    refactor-safely

    This skill should be used when the user asks to "refactor", "rename", "move", "change a function signature", "extract a method", "delete unused code", "clean up", or any modification that could break callers or dependents. Provides a pre-change safety checklist using srclight's graph tools to assess blast radius before touching code.

    Also in 5 projects that use this

  • yu-iskwSkill

    test-and-fix

    Run unit tests and automatically fix code failures, regression bugs, or test mismatches. Use when tests are failing, after implementing new features, or to repair "broken" tests.

    Also in 3 projects that use this

  • sirakinbSkill

    build-feature

    Autonomous task loop that picks ready tasks, implements them, updates progress.txt, commits, and repeats. Use when asked to 'build feature', 'run the loop', or 'implement these tasks'.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

30 rules. 0 are common, 22 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 43 edited versions we read keep these.

  • 22

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before starting the review, check for workspace context assembled by the Chalk extension:

    line 36
  2. Very specific:

    Read .chalk/context/review-changes.md if it exists.

    line 38
  3. Distinctive:

    If the context file doesn't exist, proceed without it — the skill works standalone.

    line 43
  4. Distinctive:

    Use context to prioritize review focus:

    line 44
  5. Distinctive:

    If there are existing diagnostics errors, address those first

    line 45
  6. Distinctive:

    If tests are failing, flag test-related changes as high priority

    line 46
  7. Distinctive:

    If recently edited files don't match the diff, note potential forgotten files

    line 47
  8. Very specific:

    Run the full handoff generation inline (do not invoke /create-handoff as a sub-skill — execute the steps directly):

    line 51
  9. Very specific:

    If the user provided $ARGUMENTS, sanitize it using a shell command — not LLM interpretation — to produce a safe kebab-case string:

    line 55
  10. Distinctive:

    Use the output as the session name.

    line 59
  11. Distinctive:

    If on main/master, ask the user what to name the session

    line 61
  12. Distinctive:

    If a handoff file already exists with content, ask the user whether to overwrite or skip to Phase 2.

    line 70
  13. Very specific:

    If that fails, try origin/main, then master, origin/master

    line 75
  14. Distinctive:

    If nothing detected, note "No build system detected"

    line 96
  15. Distinctive:

    If any check fails, note the failure honestly — do NOT try to fix it.

    line 98
  16. Distinctive:

    If the user chooses self-review:

    line 146
  17. Very specific:

    Read the full diff: git diff {base}..HEAD

    line 148
  18. Distinctive:

    Read the handoff from Phase 1

    line 149
  19. Very specific:

    Write the findings to $SESSION_DIR/self.findings.md

    line 169
  20. Distinctive:

    If the user chooses external review:

    line 174
  21. Distinctive:

    Wait for the user to come back: When they say they're ready or tell you to continue, proceed to Phase 3.

    line 181
  22. Very specific:

    Do NOT use shell ls — use the Glob tool for safe discovery.

    line 199
  23. Distinctive:

    Run build/tests to verify

    line 254
  24. Very specific:

    Run /commit to commit the fixes

    line 255
  25. Distinctive:

    Create or update the PR

    line 256
  26. Distinctive:

    Do NOT modify source code during Phase 1 or Phase 2 — only during Phase 3 with user confirmation

    line 266
  27. Distinctive:

    Always ask before proceeding to the next phase — never auto-advance

    line 268
  28. Distinctive:

    Keep the self-review objective and rigorous — do not rubber-stamp your own changes

    line 269
  29. Distinctive:

    All file paths from findings must be validated as relative and within the repo

    line 270
  30. Distinctive:

    If multiple reviewers have conflicting suggestions, present both and let the user choose

    line 271

“Common” is measured: kept by at least 6 in 10 of the 43 edited versions of this file we could read. “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

Review Changes

Orchestrate the full review pipeline: handoff → review → fix. This skill chains three phases with user checkpoints between each.

Phase 0: Read Workspace Context

Before starting the review, check for workspace context assembled by the Chalk extension:

  1. Read .chalk/context/review-changes.md if it exists. This contains:
    • Current git state (branch, uncommitted changes, recent commits)
    • Active diagnostics (lint/type errors already flagged by the IDE)
    • Latest test results (pass/fail counts, failing test names)
    • Recently edited files (what the developer has been working on)
  2. If the context file doesn't exist, proceed without it — the skill works standalone.
  3. Use context to prioritize review focus:
    • If there are existing diagnostics errors, address those first
    • If tests are failing, flag test-related changes as high priority
    • If recently edited files don't match the diff, note potential forgotten files

Phase 1: Create Handoff

Run the full handoff generation inline (do not invoke /create-handoff as a sub-skill — execute the steps directly):

Step 1.1: Determine the session name

  1. If the user provided $ARGUMENTS, sanitize it using a shell command — not LLM interpretation — to produce a safe kebab-case string:
    echo "$ARGUMENTS" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9-]+/-/g; s/^-+//; s/-+$//; s/-{2,}/-/g'
    Use the output as the session name. If the sanitized result is empty, fall back to option 2.
  2. Otherwise, infer from the current branch name (e.g. feature/issue-24-authentication → issue-24-authentication)
  3. If on main/master, ask the user what to name the session

Step 1.2: Create the session directory

SESSION_DIR=".chalk/reviews/sessions/${session_name}"
mkdir -p "$SESSION_DIR"

If a handoff file already exists with content, ask the user whether to overwrite or skip to Phase 2.

Step 1.3: Determine the base branch

  1. git merge-base main HEAD
  2. If that fails, try origin/main, then master, origin/master

Store as {base}.

Step 1.4: Gather context

git log --oneline {base}..HEAD
git diff --stat {base}..HEAD
git diff {base}..HEAD

Step 1.5: Detect and run project checks

Auto-detect the project's build/check tooling and run what's available:

  • Node.js (package.json): detect pm from lockfile, run build/typecheck/lint/test
  • Rust (Cargo.toml): cargo check, cargo test --no-run, cargo clippy
  • Go (go.mod): go build, go vet, go test -short
  • Python (pyproject.toml/requirements.txt): py_compile, pytest --co
  • Make (Makefile with build/check/test targets): make build/check/test
  • If nothing detected, note "No build system detected"

If any check fails, note the failure honestly — do NOT try to fix it.

Step 1.6: Write the handoff

Write to $SESSION_DIR/handoff.md:

# Handoff

## Scope
- Item: {item reference}
- Goal: {1-sentence summary}

## What Changed
{bullet list of logical changes}

## Files Changed
{bullet list from git diff --stat}

## Risk Areas
{bullet list of things that could break}

## Commands Run
{bullet list with pass/fail status}

## Known Gaps
{bullet list of things NOT done}

## Suggested Focus For Reviewers
{bullet list prioritized by risk}

Step 1.7: Report handoff

Show the handoff file path and a brief summary of what was captured.


Phase 2: Review

Ask the user how they want to proceed:

Present these options:

  • Self-review — Claude reviews the changes right now in this session
  • Copy for external review — Generate a paste-ready prompt to use with another AI (Codex, Gemini, GPT, etc.)

Option A: Self-review

If the user chooses self-review:

  1. Read the full diff: git diff {base}..HEAD
  2. Read the handoff from Phase 1
  3. Review the changes using the same structured format as the universal reviewer template:
## Verdict
- Block merge: yes|no
- Blocking findings: P0=<n>, P1=<n>

## Findings

| ID | Severity | Category | File:Line | Issue | Failure mode | Suggested fix | Confidence |
|---|---|---|---|---|---|---|---|

## Testing Gaps
-

## Open Questions
-
  1. Write the findings to $SESSION_DIR/self.findings.md
  2. Present the findings summary to the user

Option B: External review

If the user chooses external review:

  1. Bootstrap the review pipeline scripts if not already present — invoke /create-review which will create the scripts and templates with their exact, version-controlled content. Do NOT generate the scripts inline.
  2. Generate the review pack: bash .chalk/reviews/scripts/pack.sh "{base}" "{session_name}"
  3. Generate the prompt: bash .chalk/reviews/scripts/render-prompt.sh "reviewer" "" "" "" "{session_name}"
  4. Copy to clipboard if possible
  5. Tell the user: "Prompt copied — paste it into your reviewer. When you have the findings, save them to $SESSION_DIR/{reviewer-name}.findings.md and tell me to continue."
  6. Wait for the user to come back. When they say they're ready or tell you to continue, proceed to Phase 3.

Phase 3: Fix Findings

Ask the user: "Want me to fix the findings?"

If yes:

Step 3.1: Load findings

Discover all *.findings.md files in the session directory using the Glob tool:

.chalk/reviews/sessions/{session_name}/*.findings.md

Do NOT use shell ls — use the Glob tool for safe discovery.

Step 3.2: Parse and prioritize

Extract the findings table from each file. Sort by severity: P0 > P1 > P2 > P3.

Deduplicate findings that target the same file and line (or lines within 5 of each other) across reviewers.

Step 3.3: Present findings

Show a prioritized summary table and ask the user:

  • All — fix P0-P2
  • Blocking only — fix P0 and P1
  • Let me choose — pick specific IDs

Step 3.4: Apply fixes

For each finding:

  1. Validate the file path — must be relative and within the repo. Reject absolute paths or .. traversal
  2. Read the file with at least 30 lines of surrounding context
  3. Design the fix using the suggested fix as guidance
  4. Show the proposed fix and ask for confirmation before applying
  5. Apply using Edit tool

Step 3.5: Update resolution log

Write .chalk/reviews/sessions/{session_name}/resolution.md:

# Finding Resolution Log

## Summary
- Session: {session_name}
- Item: {from session name}
- Reviewers: {list of sources}
- Decision owner:

## Findings

| ID | Severity | Source | File:Line | Decision | Notes |
|---|---|---|---|---|---|

## Follow-up Tasks
-

## Final Gate
- Build:
- Tests:
- Ready to merge: yes/no

Step 3.6: Final summary

Show results table, resolution log path, and suggest:

  • Run build/tests to verify
  • Run /commit to commit the fixes
  • Create or update the PR

If no:

Tell the user the findings are saved at their session path and they can run /fix-findings later when ready.


Rules

  • Do NOT modify source code during Phase 1 or Phase 2 — only during Phase 3 with user confirmation
  • Be honest about failures in the handoff
  • Always ask before proceeding to the next phase — never auto-advance
  • Keep the self-review objective and rigorous — do not rubber-stamp your own changes
  • All file paths from findings must be validated as relative and within the repo
  • If multiple reviewers have conflicting suggestions, present both and let the user choose

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.