commit-precheck

Validate staged Git files against forbidden patterns before committing.

1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/jimmymalhan/codereview-pilot --skill commit-precheck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-precheck
Source: https://github.com/jimmymalhan/codereview-pilot/tree/main/.claude/skills/commit-precheck
Command: npx skills add https://github.com/jimmymalhan/codereview-pilot --skill commit-precheck

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill prevents commits that contain non-feature files, ensuring that only relevant code and template work are added to the repository, maintaining a clean and focused commit history.

Core Features & Use Cases

  • Commit Validation: Automatically checks staged files against a predefined list of forbidden patterns before a commit is finalized.
  • Blocking Non-Feature Files: Prevents the inclusion of task breakdowns, progress reports, implementation notes, and other administrative or planning documents in commits.
  • Use Case: A developer accidentally stages a TASK_BREAKDOWN.csv file along with new feature code. Running the commit precheck will block the commit and alert the developer to unstage the CSV file.

Quick Start

Run bash .claude/hooks/commit-precheck.sh before your git commit.

Frequently Asked Questions about commit-precheck

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

FAQPage Schema
How do I prevent non-feature files from being committed to a Git repository?

You can validate staged files against forbidden patterns to block non-feature files from being committed. This prevents task breakdowns, progress dashboards, and implementation reports from polluting the repository history.

What is a pre-commit hook for repository cleanliness?

A pre-commit hook for repository cleanliness validates staged files before finalizing a commit. It blocks administrative documents like task breakdowns and implementation reports, ensuring only relevant code work is added.

How do I run a commit precheck before finalizing my git commit?

Run the validation hook script before your git commit to check staged files. The script checks staged Git files and alerts you to unstage any items matching forbidden patterns before the commit finalizes.

Does commit validation work with specific file naming conventions?

Commit validation does work with specific file naming conventions by enforcing directory structures for allowed files. It blocks files matching forbidden patterns, ensuring only properly named code passes the pre-commit checks.

What happens if I accidentally stage a task breakdown file?

If you accidentally stage a task breakdown file, the commit precheck blocks the commit and alerts you to unstage it. This prevents planning documents and other non-feature files from entering the repository.