pre-commit-review

Automate pre-commit code reviews with change analysis and test-coverage verification.

1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/awegg/BackupChrono --skill pre-commit-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-review
Source: https://github.com/awegg/BackupChrono/tree/main/.github/skills/pre-commit-review
Command: npx skills add https://github.com/awegg/BackupChrono --skill pre-commit-review

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill solves the challenge of inconsistent pre-commit code quality by providing a structured, automated workflow that enforces specification alignment, maintainability standards, and adequate test coverage before changes are committed.

Core Features & Use Cases

  • Automated change analysis using the provided PowerShell scripts to surface changed files, lines touched, and potential issues.
  • Systematic review guided by the references/review-checklist.md to verify specification alignment, maintainability, and security considerations.
  • Test-coverage enforcement via the run_tests_with_coverage.ps1 script to ensure overall code quality exceeds the 50% threshold.
  • Use Case: Before submitting a commit, run the analysis and checklist to produce actionable findings and confirm readiness for review.

Quick Start

Run the pre-commit review workflow on your working tree:

  • Analyze changes: .github/skills/pre-commit-review/scripts/analyze_changes.ps1
  • Open the checklist: references/review-checklist.md
  • Run tests with coverage: .github/skills/pre-commit-review/scripts/run_tests_with_coverage.ps1

Frequently Asked Questions about pre-commit-review

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

FAQPage Schema
How do I automate pre-commit code reviews to check specification alignment and test coverage?

Automate pre-commit code reviews by running a scripted change analysis to surface modified files and issues, applying a review checklist for specifications, and executing a test-coverage verification script to enforce a 50% threshold before committing.

What is the best way to enforce a test coverage threshold before a Git commit?

The best way to enforce a test coverage threshold before a Git commit is to run the PowerShell test-coverage script, which verifies that overall code quality exceeds the 50% threshold and blocks changes from proceeding if standards are not met.

Does this pre-commit review workflow work with PowerShell scripts on any repository?

Yes, this pre-commit review workflow works with any repository where the workflow is adopted, utilizing provided PowerShell scripts to analyze changes and run tests with coverage before commits, pull requests, or merges.

How do I use a review checklist to verify maintainability and security considerations before submitting code?

Use the references review checklist to systematically verify specification alignment, maintainability standards, and security considerations, ensuring code changes meet all requirements before you submit a commit or pull request for review.

Why does my pre-commit code quality check fail to surface potential issues in changed files?

Pre-commit code quality checks may fail to surface issues if the change analysis script is not run against the working tree, which specifically analyzes changed files and lines touched to identify potential problems before submission.

Can I run a pre-commit analysis on my working tree without installing external dependencies?

Yes, you can run the pre-commit analysis on your working tree without external dependencies by executing the provided PowerShell scripts directly to analyze changes and verify test coverage readiness.