PR

Configures and runs pre-commit hooks for project quality. Validates code style, configurations, and scripts automatically.

Install

mkdir -p .claude/skills/pre-commit && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9871" && unzip -o skill.zip -d .claude/skills/pre-commit && rm skill.zip

Installs to .claude/skills/pre-commit

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Standardized pre-commit workflow for linting, formatting, and local quality gates.
82 charsno explicit “when” trigger
Beginner

Key capabilities

  • Linting and formatting
  • Config validation
  • Shell script hygiene
  • Rust-specific quality gates

How it works

It automates linting, formatting, and quality checks before commits using a standardized pre-commit workflow.

Inputs & outputs

You give it
Codebase
You get back
Validated code

When to use pre_commit

  • Running linting hooks on demand
  • Validating config file syntax
  • Ensuring executable bits on shell scripts

About this skill

Pre-commit Skill

This skill defines the standard pre-commit workflow for pw-ac3-live.

Core Commands

1. Run all hooks on demand

Run the full hook suite on all tracked files.

UV_CACHE_DIR=/tmp/uv-cache uvx pre-commit run -a

2. Run one hook during debugging

Use this when a single hook fails and you want fast iteration.

UV_CACHE_DIR=/tmp/uv-cache uvx pre-commit run <hook-id> -a

Hook Coverage in This Project

  • File hygiene: trailing whitespace, EOF, line endings, merge/case conflicts, large files.
  • Config validation: YAML, TOML, JSON.
  • Shell scripts: shfmt and shellcheck.
  • Rust: cargo fmt, cargo clippy -D warnings, cargo test (pre-push).

Practical Notes

  • If uvx cache permission fails in restricted environments, set UV_CACHE_DIR=/tmp/uv-cache.
  • check-shebang-scripts-are-executable uses the executable bit from Git index; set it with:
git add --chmod=+x <script>

When not to use it

  • Manual linting

Prerequisites

uvxpre-commit

Limitations

  • Requires pre-commit configuration

How it compares

It provides a project-wide standardized quality gate.

Compared to similar skills

pre_commit side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
pre_commit (this skill)05moReviewBeginner
check-code-quality129dReviewAdvanced
verifier02moCautionIntermediate
verify02moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry