pre-commit

Analyze staged Git changes for security risks and formatting violations.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/hb9397/ai-agent-harness-docs --skill pre-commit-hb9397
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit
Source: https://github.com/hb9397/ai-agent-harness-docs/tree/main/plugins/ai-agent-harness/runtime/claude/skills/pre-commit
Command: npx skills add https://github.com/hb9397/ai-agent-harness-docs --skill pre-commit-hb9397

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill prevents common coding errors, security vulnerabilities, and technical debt from entering your codebase by automating rule enforcement before you commit your changes.

Core Features & Use Cases

  • Automated Rule Enforcement: Automatically scans for hardcoded secrets, missing error handling, and improper TODO comments.
  • Context-Aware Scanning: Detects whether you are working within a Git repository to scan only changed files or performing a full recursive scan on non-Git projects.
  • Use Case: Before pushing a new feature, use this Skill to ensure no API keys were accidentally hardcoded and that all external service calls include necessary timeout configurations.

Quick Start

Use the pre-commit skill to scan the current directory for rule violations and report the results.

Frequently Asked Questions about pre-commit

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

FAQPage Schema
How do I automate code quality checks before a Git commit?

To automate code quality checks before a Git commit, you can use a pre-commit hook to perform static analysis on staged changes, detecting security risks, formatting violations, and error handling gaps automatically.

What is static analysis for detecting hardcoded credentials and missing timeouts?

Static analysis for hardcoded credentials and missing timeouts is an automated code review process that scans source files to identify security risks and improper error handling before changes are committed to the repository.

Does automated code review work on non-Git project directories?

Automated code review works on non-Git project directories by performing a full recursive scan on the folder structure to validate code integrity and ensure compliance with coding standards.

How do I scan staged Git changes for unmanaged TODO comments and security risks?

To scan staged Git changes for unmanaged TODO comments and security risks, configure an automated pre-commit rule enforcement tool to validate code integrity and detect hardcoded secrets before submission.

What is the best way to prevent hardcoded secrets from entering a codebase?

The best way to prevent hardcoded secrets from entering a codebase is to enforce automated static analysis rules during the pre-commit stage, stopping vulnerable code from being committed.