pre-commit #
Check changed agent-instruction files as part of your normal commit workflow. Start with advisory findings, or add a severity threshold to block commits that need attention.
Setup #
With pre-commit available, add this entry to .pre-commit-config.yaml, preserving your existing hooks:
repos:
- repo: https://github.com/hermes-labs-ai/lintlang
rev: v0.8.0
hooks:
- id: lintlang
Install the repository's hooks:
pre-commit install
The default hook selects changed AGENTS.md, CLAUDE.md, GEMINI.md, and SKILL.md files at any depth; agent.yaml, agent.yml, and agent.json; .github/copilot-instructions.md; and *.instructions.md under .github/instructions/. No fixed input path is required.
Verify #
pre-commit run lintlang
pre-commit run lintlang --all-files
The first command checks matching staged files; the second checks all matching files tracked by Git. An unrelated commit can skip this hook. Findings are advisory by default, including a FAIL verdict; missing, unreadable, or unparseable inputs still fail.
Choose a blocking threshold #
Add this under the hook to block HIGH and CRITICAL findings:
- id: lintlang
args: [--fail-on, fail]
Use review instead of fail to include MEDIUM findings. pre-commit appends changed filenames to args, so adding a path there does not replace the default selection.
For one fixed path on every commit, use all three settings:
- id: lintlang
args: [AGENTS.md, --fail-on, fail]
pass_filenames: false
always_run: true
Next steps #
Review an existing backlog with baselines · Understand verdicts · All integrations
To remove the integration, remove only its entry from your pre-commit configuration. The released setup guide contains the full selection and argument contract.