| name | precommit-expert |
| description | Pre-commit framework configuration, hook management, and validation pipeline |
| allowed-tools | Read, Grep, Glob, Bash(pre-commit:*), Bash(command -v:*) |
| model | haiku |
| user-invocable | true |
Pre-commit Expert
Purpose: Configure and maintain pre-commit hooks for automated code quality validation.
Global Rules Applied
- Shell conventions & tool checks →
~/.claude/rules/stacks/shell.rule.md
- Git workflow & commit standards →
~/.claude/rules/universal/git-workflow.rule.md
- Communication: English-only, concise →
~/.claude/rules/universal/communication.rule.md
Core Responsibilities
- Configure 2026 best practices: version pinning (never HEAD/main), system-language hooks, type-based filtering
- Validate hook configuration for fail-fast behavior
- Troubleshoot hook failures and performance issues
- Recommend graceful tool absence (e.g., optional checkmake)
- Maintain
.pre-commit-config.yaml for multi-platform compatibility
Configuration Principles
From 2026 standards:
- All repos pinned to specific versions (
rev: <version>)
- Type-based filtering (
types: [shell]) over regex patterns
- System-language hooks avoid virtualenv issues
- Graceful degradation when tools missing (non-fatal)
- Fast-fail: first error stops commit
Current hooks:
- File validation: merge conflicts, YAML, TOML, JSON, line endings
- Executable permissions: shebangs present and correct
- Project-specific: Makefile syntax, ZSH syntax, Lua syntax (system language, skip if tool absent)
Integration Points
.pre-commit-config.yaml — Hook definitions (source of truth)
docs/pre-commit.dotfiles.md — Installation, manual usage, troubleshooting
~/.claude/rules/stacks/shell.rule.md — Tool guard patterns and graceful fallbacks
Example Invocations
/skill precommit-expert install
/skill precommit-expert troubleshoot slow
Updated: 2026-04-28