-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.pre-commit-hooks.yaml
More file actions
50 lines (47 loc) · 1.96 KB
/
Copy path.pre-commit-hooks.yaml
File metadata and controls
50 lines (47 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Pre-commit hooks exposed by netresearch/skill-repo-skill.
#
# Consume from a skill repo's .pre-commit-config.yaml:
#
# repos:
# - repo: https://github.com/netresearch/skill-repo-skill
# rev: vX.Y.Z # pin a tag; Renovate / Dependabot will bump
# hooks:
# - id: validate-skill
# - id: validate-evals
# - id: check-version-parity
#
# Each hook is a thin wrapper around the corresponding script in
# skills/skill-repo/scripts/. The hooks intentionally do NOT receive the
# staged-file list (pass_filenames: false) — the underlying scripts operate
# on the whole repo state, not the diff. The `files:` filter only controls
# WHEN the hook fires.
- id: validate-skill
name: Validate skill repo structure
description: >-
Run validate-skill.sh against the repo when skill metadata changes
(SKILL.md, checkpoints.yaml, plugin.json, composer.json).
entry: skills/skill-repo/scripts/validate-skill.sh
language: script
pass_filenames: false
files: '(^skills/.+/SKILL\.md$|^SKILL\.md$|^skills/.+/checkpoints\.yaml$|^checkpoints\.yaml$|^\.claude-plugin/plugin\.json$|^composer\.json$)'
require_serial: true
- id: validate-evals
name: Validate evals.json structure
description: >-
Run validate-evals.sh when any evals.json changes (schema, IDs, grading).
entry: skills/skill-repo/scripts/validate-evals.sh
language: script
pass_filenames: false
files: '(^skills/.+/evals/evals\.json$|^evals/evals\.json$)'
require_serial: true
- id: check-version-parity
name: Plugin/SKILL/composer version parity
description: >-
Run check-version-parity.sh when a versioned artefact changes.
composer.json must NOT have a version field; plugin.json is the source
of truth and SKILL.md metadata.version must match.
entry: skills/skill-repo/scripts/check-version-parity.sh
language: script
pass_filenames: false
files: '(^\.claude-plugin/plugin\.json$|^skills/.+/SKILL\.md$|^SKILL\.md$|^composer\.json$)'
require_serial: true