hf.validate-tests-before-commit

Block Git commits when staged changes lack tests or fail the test suite.

5|2|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/T-rav/hydraflow --skill hf-validate-tests-before-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hf.validate-tests-before-commit
Source: https://github.com/T-rav/hydraflow/tree/main/.codex/skills/hf.validate-tests-before-commit
Command: npx skills add https://github.com/T-rav/hydraflow --skill hf-validate-tests-before-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automatically enforces that staged changes have corresponding tests and that those tests pass before a commit is allowed.

Core Features & Use Cases

  • Detects staged code changes and identifies missing tests.
  • Runs the project's test suite and blocks commits on failures.
  • Fits into standard Git workflows to reduce regression risk.

Quick Start

Stage your changes and attempt a commit to trigger the pre-commit check that ensures tests exist for altered code and that all tests pass.

Frequently Asked Questions about hf.validate-tests-before-commit

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

FAQPage Schema
How do I block a git commit when tests are missing or failing?

To block a git commit when tests fail or are missing, a pre-commit hook scans staged files for source changes, verifies corresponding tests exist, executes the suite, and prevents the commit on any lint or test failures.

How does a pre-commit hook detect missing tests for staged changes?

A pre-commit hook detects missing tests by scanning staged files for source code alterations and verifying that corresponding unit or integration test files exist before allowing the commit to proceed.

Can I enforce unit and integration tests before commit across different software projects?

Yes, you can enforce tests before commit across standard local Git workflows for software projects, as the hook applies generally to any repository with unit or integration tests.

What is the best way to prevent code regressions during local Git workflows?

The best way to prevent code regressions locally is enforcing a pre-commit hook that validates staged changes have corresponding tests and blocks the commit immediately if those tests fail.

Does the pre-commit hook run the full test suite or just the tests for staged files?

The hook runs the project's test suite to verify staged changes, blocking commits if any lint or test failures occur, ensuring the complete suite passes before the local commit is accepted.