[Agents] Add pre-commit check for agent files and skills (#59657)

Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Misha Goin
2026-10-02 09:38:22 -07:00
committed by GitHub
co-authored by Claude
parent e42d35d4f3
commit 1ab18599ca
10 changed files with 343 additions and 9 deletions
+8 -1
View File
@@ -30,7 +30,6 @@ repos:
- id: markdownlint-cli2
language_version: lts
args: [--config, tools/pre_commit/.markdownlint.yaml, --fix]
exclude: (^|/)CLAUDE\.md$
- repo: https://github.com/rhysd/actionlint
rev: v1.7.7
hooks:
@@ -177,6 +176,14 @@ repos:
files: ^\.github/mergify\.yml$
pass_filenames: false
additional_dependencies: [PyYAML, regex]
- id: check-agent-files
name: Check agent instruction files and skills
language: python
entry: python tools/pre_commit/check_agent_files.py
files: ^(\.agents/|\.claude/|(.*/)?(AGENTS|CLAUDE)\.md$|tools/pre_commit/check_agent_files\.py$)
pass_filenames: false
additional_dependencies: [PyYAML, regex]
verbose: true # `note:` lines are advisory, so the hook passes
- id: check-buildkite-step-keys
name: Check every Buildkite step declares an explicit key
language: python