pre-commit-cleanup

Remove AI-style slop and validate critical paths in patches.

23|3|Updated May 17, 2024
One-click install
npx skills add https://github.com/johnend/dots --skill pre-commit-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-cleanup
Source: https://github.com/johnend/dots/tree/main/common/.ai/skills/pre-commit-cleanup
Command: npx skills add https://github.com/johnend/dots --skill pre-commit-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clean up patches before review by removing AI-style slop, validating key paths, and surfacing remaining risks to ensure reviewers focus on substantive changes.

Core Features & Use Cases

  • Remove noisy, unnecessary comments and defensive branches that do not affect public behavior.
  • Validate patch integrity by checking critical paths and tests, surfacing potential risks for review.
  • Use case: when a patch is nearly complete but requires tightening before submission to maintain code quality.

Quick Start

Run a focused cleanup pass on the current patch to remove noise while preserving behavior.

Frequently Asked Questions about pre-commit-cleanup

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

FAQPage Schema
How do I clean up AI-style slop in a patch before code review?

To clean up AI-style slop before code review, run a focused validation pass to remove noisy comments and defensive branches. This tightens the patch by stripping unnecessary additions while preserving public behavior and surfacing substantive changes.

What is the best way to surface risks in a patch before submission?

The best way to surface risks before submission is to validate critical paths and test considerations during patch cleanup. This process identifies potential instabilities early, ensuring reviewers can confidently approve the auditable diff without hidden regressions.

How do I remove unnecessary defensive branches from a code diff?

To remove unnecessary defensive branches from a code diff, execute a cleanup pass that targets and strips code not affecting public behavior. This eliminates noise and defensive slop, tightening the patch for a more focused and auditable review.

Does pre-commit cleanup preserve existing test behavior and public paths?

Pre-commit cleanup preserves existing test behavior and public paths by validating key routes during the tightening process. It specifically targets noisy, non-behavioral code for removal while ensuring critical tests and stable public behavior remain intact.

When do I need to run a patch cleanup pass for code quality?

You need to run a patch cleanup pass for code quality when a patch is nearly complete but requires tightening before submission. It removes AI-style slop and validates critical paths to ensure the diff is clean, auditable, and ready for review.

Can I validate patch integrity and check critical paths before review?

You can validate patch integrity and check critical paths before review by running a targeted cleanup pass. This process surfaces potential risks and verifies test considerations, ensuring the patch maintains stable public behavior and is safe to submit.