From patchy-bot
This skill should be used when the user asks to "review my diff", "check before commit", "diff review", "pre-commit check", "what changed", "scan my changes", "review staged changes", or needs a quality gate before any git commit. Trigger automatically before committing when preparing changes for review. Catches debug leftovers, accidental changes, leaked secrets, and quality issues in the actual diff that linters and security-review miss.
npx claudepluginhub kman182401/patchy-operationalThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Pre-commit quality gate that inspects the actual git diff to catch issues hiding in changed lines. Linters catch formatting, security-review catches design flaws — this skill catches the diff itself: debug statements left behind, accidental edits, leaked credentials, and dead code sneaking into a commit.
git commit — run this after implementation is "done" but before committingRun git diff --staged first. If nothing is staged, fall back to git diff. If both are empty, check for untracked files with git status and report that there is nothing to review.
Also run git diff --staged --stat (or git diff --stat) to get the file-level summary of changes.
Walk through every hunk in the diff. Focus only on added lines (+ prefix) — removals are not introducing new problems. For each added line, check against the categories below.
If a task description or plan is available, compare the files touched against the expected scope. Flag any file modifications that fall outside the stated task.
Output a structured report using the format defined in the Output Format section. Assign a verdict.
Scan added lines for patterns that should not ship to production.
Print/log statements added for debugging:
print( / pprint( / breakpoint() in Pythonconsole.log( / console.debug( / debugger in JavaScript/TypeScriptvar_dump( / dd( / dump( in PHPSystem.out.println( in Javafmt.Println( used as debug output in Goputs / p used as debug output in RubyDistinguish intentional logging (using a logger, structured output) from debug prints (raw print to stdout). If a print() is inside a logging utility or CLI output function, do not flag it.
TODO/FIXME/HACK/XXX comments added:
+ prefix in the diff — pre-existing ones are not this skill's concernCommented-out code blocks:
Hardcoded test values:
localhost / 127.0.0.1 in non-test, non-config filestest@test.com, example@example.com in production codepassword123, admin, changeme, secret as string literalsDetect changes that are likely unintentional side effects of the editor or tooling.
Whitespace-only changes:
Import reordering:
Out-of-scope file modifications:
Config/lockfile churn:
package-lock.json, poetry.lock, Cargo.lock, or similar lockfiles when no dependency was intentionally added or removedThese issues must be fixed before committing. No exceptions.
Credentials in the diff:
sk-, ghp_, AKIA, Bearer , or matching common key formatspassword, secret, token, api_key assigned a literal string valueSensitive files staged:
.env, .env.local, .env.production files in the diffcredentials.json, service-account.json, *.pem, *.key files.gitignore — if these file types are not ignored, flag as BLOCK and recommend adding themHardcoded credentials:
user:password@ patternsNew endpoints without auth:
Code quality concerns that are worth noting but rarely block a commit.
Unreferenced functions or classes:
Dead code introduced:
return, raise, break, or continue statementif False:)Overly large hunks:
Missing error handling:
await calls without error handling in async codeType hint gaps (Python-specific):
Structure every diff review report as follows:
## Diff Review Report
**Files changed:** N files (+X lines / -Y lines)
**Scope:** [Brief description of what the changes do]
### Issues Found
#### BLOCK (must fix before commit)
- [file:line] Description of the blocking issue
- [file:line] Description of the blocking issue
#### WARN (review before committing)
- [file:line] Description of the warning
- [file:line] Description of the warning
#### INFO (noted for awareness)
- [file:line] Description of the informational note
### Verdict: CLEAN | WARN | BLOCK
[One-sentence summary explaining the verdict]
Verdict rules:
If the verdict is BLOCK, list the specific fixes needed and offer to apply them.
If the verdict is WARN, list the warnings and ask whether to proceed or fix first.
If the verdict is CLEAN, confirm and move to commit.
With other skills:
linter and test-runner — those catch syntax and logic errors; this catches diff-level issues they misscode-reviewer — code-reviewer does deep analysis; diff-review is a fast pre-flight checksecurity-review already ran on the same changes, still check for credentials in the diff — security-review focuses on design patterns, not literal strings in the diffscope-guard is available, defer scope judgments to it and note alignment in the reportAutomatic triggering:
*.min.js, dist/, build/, __pycache__/), note it but do not flag issues inside it.test/, tests/, *_test.*, test_*.*, or spec/. Classify as INFO instead of WARN.