precommit-setup

Configure pre-commit guards with runtime selection for Claude or Codex.

11|1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/ylxmf2005/AgentCorp --skill precommit-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: precommit-setup
Source: https://github.com/ylxmf2005/AgentCorp/tree/main/agentcorp/precommit-setup
Command: npx skills add https://github.com/ylxmf2005/AgentCorp --skill precommit-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Use when AgentCorp needs to set up or improve repository pre-commit checks, commit-time guardrails, Git hook workflows, staged-file quality checks, or optional slow AI commit review with Codex or Claude. Use when the user asks to setup precommit, add commit constraints, wire local pre-commit hooks, or make AI review an opt-in pre-commit step.

Core Features & Use Cases

  • Seamless integration with popular hook managers (pre-commit, Husky, Lefthook) and a runtime selector (runtime: claude|codex|both).
  • Provides fast local checks to keep commits small and safe, plus optional AI-review for slow, opt-in validation.
  • Includes templated configuration patterns and verification steps to ensure hooks install and run reliably across languages.

Quick Start

Install and configure pre-commit guards tailored to your runtime (Claude, Codex, or both) and verify the hook works in your repo.

Frequently Asked Questions about precommit-setup

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

FAQPage Schema
How do I set up pre-commit hooks for AI code review in my repository?

Pre-commit hooks for AI code review are configured by selecting a runtime (Claude, Codex, or both) and mounting appropriate hook templates. This enables fast local checks during commits alongside optional AI-based validation.

Can I use pre-commit guards with both Claude and Codex in a multi-language repo?

Pre-commit guards support multi-language repositories and offer a runtime selector for Claude, Codex, or both. This allows you to mount appropriate hooks that run AI-based reviews tailored to your specific environment.

What's the best way to add commit guardrails using Husky or Lefthook?

Commit guardrails are best added by integrating with popular hook managers like Husky or Lefthook using templated configuration patterns. Verification steps such as running pre-commit install and pre-commit run --all-files ensure hooks work reliably.

How do I verify that my staged-file quality checks are working correctly?

Staged-file quality checks are verified by running pre-commit run --all-files in your repository. This validation step confirms that your installed hooks execute reliably and catch issues before commits are finalized.

Does pre-commit setup work with existing Git hook workflows?

Pre-commit setup integrates seamlessly with existing Git hook workflows by wiring local pre-commit hooks into standard templates. It supports popular hook managers and ensures commit-time guardrails mount correctly across languages.