skills/diff-review/SKILL.md
Runs an iterative review-and-fix loop on a git diff. Use when reviewing a staged or branch diff and fixing findings in place — presents findings by severity, lets you choose which to fix, applies fixes, and re-reviews. Max 3 iterations.
npx skillsauth add philoserf/claude-code-setup skills/diff-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
!git branch --show-current!git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'!git status --short!git diff --stat!git diff --staged --statAsk the user which diff to review. Skip if the user already specified scope inline (e.g., "review my branch diff" or "review uncommitted changes").
| Option | Diff command | When to use |
| ---------------------- | ---------------------------------- | ----------------------- |
| Uncommitted changes | git diff HEAD | Before committing |
| Branch diff vs default | git diff <default-branch>...HEAD | Before PR |
| Specific commit | git diff <sha>~1..<sha> | Reviewing a past commit |
Use the default branch from pre-loaded context. If it resolved to empty,
fall back to main.
Run the selected diff command with --stat to verify it is non-empty. If
empty, tell the user there is nothing to review and stop.
If the diff exceeds 2000 lines, warn and ask whether to proceed or narrow scope (e.g., limit to specific files or directories).
Store the selected diff command — it is reused in every re-review iteration.
Dispatch the code-reviewer agent to review the diff.
Generate the full diff:
git diff <selected scope>
Launch the code-reviewer agent via the Agent tool with this prompt:
Review the following git diff. Apply your standard severity tiers (Critical, High, Medium, Low). Report findings with file paths and line numbers. End with a verdict: APPROVE, APPROVE WITH WARNINGS, or BLOCK.
<diff output>
Present the agent's findings to the user verbatim. Number each finding sequentially (1, 2, 3...) so the user can reference them by number in Phase 3.
If the verdict is APPROVE: announce "Clean review — no issues found." and stop. The loop is complete.
Track the current iteration number (starts at 1 of 3).
Present findings grouped by severity. Ask the user using AskUserQuestion:
Iteration N/3 — The review found issues. Which would you like me to fix?
- all — fix everything
- critical/high only — skip medium/low
- specific — list the ones to fix (e.g., "1, 3, 5")
- none — stop here, I'll handle it manually
If the user chooses none: print the findings summary and exit.
For each approved finding:
After all fixes are applied, detect and run project test/lint commands:
| Indicator | Command |
| -------------------------------- | --------------- |
| package.json with test script | bun test |
| go.mod | go test ./... |
| Makefile with test target | make test |
| pytest.ini or pyproject.toml | uvx pytest |
| None of the above | Skip test step |
If tests or lint fail, fix the failures before proceeding to re-review.
After fixes are applied:
If verdict is APPROVE: announce "Clean on iteration N/3." and stop.
If issues remain and iteration < 3: return to Phase 3 (Interactive Approval) with the new findings. Increment the iteration counter.
If iteration = 3 and issues remain: stop with a summary of all unresolved findings. Do not continue — the user should review manually.
| Situation | Action | | -------------------------- | -------------------------------------------------- | | Not a git repository | Stop and tell the user | | Empty diff | Stop — nothing to review | | Agent returns no findings | Treat as APPROVE | | Fix causes test regression | Fix the regression before re-review | | 3 iterations exhausted | Print unresolved findings summary, exit gracefully |
code-auditcc-reviewrefactor-cleantesting
Audits ~/.claude/skills/ for unused entries, duplicate names, missing descriptions, and the longest descriptions. Use when trimming the user-level skill set, asking which skills are unused, finding duplicates, or auditing skill hygiene.
tools
Publishes and manages Flowershow sites with the `fl` CLI (the Go-based successor to the deprecated `@flowershow/publish` npm package). Use when publishing a note or folder to Flowershow, syncing updates to an existing site, managing auth, listing or deleting sites, or installing/upgrading the CLI.
tools
Copy edits prose while preserving voice and register. Use when asked to edit, copy edit, line edit, proofread, revise, polish, tighten, rewrite, or clean up essays, articles, drafts, or fiction. Flags wordiness, passive voice, clichés, hedging, and nominalizations with bracket markup or clean rewrites.
tools
Improves CLAUDE.md by analyzing conversation patterns. Use when Claude keeps repeating a mistake, when teaching a new preference, or when consolidating guidance from repeated instructions. Captures recurring corrections and style preferences into project instructions.