review-pre-commit

Reviews working diffs for stubs and debug leftovers, then runs lint, format, and test checks.

1.4k|335|Updated Jun 10, 2014
One-click install
npx skills add https://github.com/openwpm/OpenWPM --skill review-pre-commit-openwpm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-pre-commit
Source: https://github.com/openwpm/OpenWPM/tree/main/.claude/skills/review-pre-commit
Command: npx skills add https://github.com/openwpm/OpenWPM --skill review-pre-commit-openwpm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents incomplete or messy code from being committed by enforcing a structured pre-commit quality gate that catches stub patterns, debug leftovers, lint failures, and undocumented issues before changes land. ## Core Features & Use Cases - Diff Review: Walks the full working diff checking correctness, edge cases, and security issues like hardcoded secrets. - Stub and Debug Detection: Scans for TODO/FIXME markers, unimplemented!()/todo!() calls, dbg!(), stray console.log/println!, and commented-out code blocks. - Multi-Toolchain Checks: Runs the appropriate lint, format, and test commands for Rust, Python, TypeScript, Go, or Elixir projects, then prints a PASS/FAIL checklist. - Use Case: Before committing changes to the OpenWPM Python codebase, trigger the review to run jj-precommit and pytest, verify the crosslink issue is documented, and get a clean checklist before handing off to the commit step. ## Quick Start Ask the assistant to review my changes and run the pre-commit quality gate before committing.

Frequently Asked Questions about review-pre-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review my changes before committing?

Run the pre-commit review to inspect the full working diff for correctness, edge cases, and security issues. It then scans for stub patterns and debug leftovers, runs lint, format, and test suites, and prints a PASS/FAIL checklist.

How to catch TODO and unimplemented code before commit?

The review scans the diff for TODO, FIXME, HACK, XXX markers, unimplemented!() and todo!() calls, empty function bodies, and placeholder returns. Any stubs found must be fixed before committing.

Does the pre-commit review support multiple languages?

Yes, it detects the project toolchain and runs the matching checks: cargo clippy and fmt for Rust, jj-precommit and pytest for Python, npm lint and test for the TypeScript extension, go vet for Go, and mix format and credo for Elixir.

What debug code does the review check for?

It flags dbg!() in Rust, console.log used for debugging, print/println! debug statements, and commented-out code blocks longer than two consecutive lines. These must be removed before the commit proceeds.

What happens if a pre-commit check fails?

The failing item is marked in the checklist, and you must fix the issue and re-run the failed checks. Only when all items pass does the review hand off to the commit step.