---
name: "pre-commit-framework-git-hooks"
description: "Enforce automated linting, secret detection, and formatting before commits are created."
metadata:
  author: "pre-commit"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "setup pre-commit hooks"
  - "run pre-commit all-files"
  - "update pre-commit repos autoupdate"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# pre-commit Framework Multi-Language Git Hooks

Configures pre-commit framework: authoring .pre-commit-config.yaml, managing multi-language hooks (Python, JavaScript, Shell, Docker), running hooks across all files (pre-commit run --all-files), and auto-updating hook versions.

## When to Invoke
Invoke this skill whenever you need to:
- setup pre-commit hooks
- run pre-commit all-files
- update pre-commit repos autoupdate

## Execution SOP & Rules
1. Install pre-commit: pip install pre-commit or brew install pre-commit.
2. Create .pre-commit-config.yaml declaring repos, revs, and hook IDs.
3. Install hooks into Git directory: pre-commit install.
4. Verify hooks pass: pre-commit run --all-files before submitting pull requests.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
