pre-commit

Audit staged files, run tests, and block commits on critical issues.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/tylern91/dotfiles --skill pre-commit-tylern91
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit
Source: https://github.com/tylern91/dotfiles/tree/main/claude/.claude/skills/pre-commit
Command: npx skills add https://github.com/tylern91/dotfiles --skill pre-commit-tylern91

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This pre-commit quality gate automatically audits staged files and runs tests to prevent committing code with issues, saving time and avoiding regressions.

Core Features & Use Cases

  • Identify staged files: quickly detects what will be committed.
  • Secret detection & linting: scans for sensitive keys and lint Markdown files.
  • Test execution & gating: runs the project test suite and blocks commits on failures.

Quick Start

Run the pre-commit workflow on your changes to automatically audit staged files, run tests, and block commits when critical issues are found.

Frequently Asked Questions about pre-commit

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

FAQPage Schema
How do I block bad git commits automatically before they are pushed?

To block bad git commits automatically, you can run a pre-commit quality gate that audits staged files, runs tests, and prevents commits when critical issues or test failures are detected.

What is the best way to run tests and lint markdown on staged files?

The best way to run tests and lint markdown on staged files is using a pre-commit workflow that identifies staged changes, executes linting checks, runs the test suite, and enforces a pass or fail policy.

How does a pre-commit quality gate detect secrets in staged code?

A pre-commit quality gate detects secrets by scanning staged files for sensitive keys as part of its code auditing process, automatically blocking the commit if critical security issues are found.

Can I use pre-commit checks to run a code-auditor and enforce a pass/fail policy?

Yes, you can use pre-commit checks to run a code-auditor on staged files and enforce a strict pass/fail policy, ensuring commits are blocked if critical issues or test failures are found.

Do I need external dependencies to run pre-commit linting and test execution?

No, you do not need external dependencies to run pre-commit linting and test execution, as this skill operates independently to identify staged files, run secrets checks, lint markdown, and execute tests.

Why does my pre-commit workflow block commits when critical issues are found?

Your pre-commit workflow blocks commits when critical issues are found because it applies a strict pass/fail policy after running code-audits, secret checks, and tests on your staged files to prevent regressions.