Skip to content

Commit 674f741

Browse files
committed
chore: adopt the shared skill template
Brings .github/ in line with netresearch/.github/templates/skill and adds .github/template.yaml, so the template drift check applies from now on. This repo carried an older generation of the shared workflows: they predate the top-level `permissions: {}` block and, in release.yml, the id-token and attestations scopes that Sigstore signing and the GitHub attestation API require. Every affected file existed here in exactly one revision shared with the other skill repos, so this is a generation gap rather than local customisation. Added: template.yaml labeler.yml check-template-drift.yml labeler.yml scorecard.yml Replaced: zizmor.yml dependabot.yml release.yml security.yml lint.yml auto-merge-deps.yml harness-verify.yml eval-validate.yml Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
1 parent 7f27a0f commit 674f741

13 files changed

Lines changed: 194 additions & 17 deletions

.github/dependabot.yml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,52 @@
1+
# Managed by netresearch/.github/templates/skill/
2+
#
3+
# Declares only the ecosystems every skill consumer is guaranteed to have:
4+
# github-actions (CI workflows) and composer (every skill repo ships a
5+
# composer.json for split-licensing / Packagist distribution).
6+
#
7+
# npm and devcontainers are OPT-IN: a repo that actually has package.json
8+
# fixtures (e.g. skills/<name>/references/examples/**) or a devcontainer adds
9+
# the block below to its own dependabot.yml and lists `.github/dependabot.yml`
10+
# under `intentional-drift:` in .github/template.yaml so the template sync
11+
# stops managing the file. Declaring an ecosystem without its manifest makes
12+
# the Dependabot run fail with `dependency_file_not_found`.
13+
#
14+
# Opt-in npm (use Dependabot's plural `directories:` to consolidate multiple
15+
# fixture dirs into one grouped PR):
16+
# - package-ecosystem: npm
17+
# directories:
18+
# - /skills/<name>/references/examples/<project>
19+
# schedule:
20+
# interval: weekly
21+
# day: monday
22+
# open-pull-requests-limit: 5
23+
# groups:
24+
# npm:
25+
# patterns: ['*']
26+
# cooldown:
27+
# default-days: 7
128
version: 2
229
updates:
330
- package-ecosystem: github-actions
431
directory: /
532
schedule:
633
interval: weekly
34+
day: monday
35+
open-pull-requests-limit: 5
736
groups:
837
github-actions:
9-
patterns:
10-
- "*"
38+
patterns: ['*']
39+
cooldown:
40+
default-days: 7
41+
42+
- package-ecosystem: composer
43+
directory: /
44+
schedule:
45+
interval: weekly
46+
day: monday
47+
open-pull-requests-limit: 5
48+
groups:
49+
composer:
50+
patterns: ['*']
51+
cooldown:
52+
default-days: 7

.github/labeler.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
documentation:
2+
- changed-files:
3+
- any-glob-to-any-file: ['**/*.md', 'docs/**/*', '**/SKILL.md', 'README.md']
4+
ci:
5+
- changed-files:
6+
- any-glob-to-any-file: ['.github/**/*', 'Makefile']
7+
dependencies:
8+
- changed-files:
9+
- any-glob-to-any-file:
10+
- 'composer.json'
11+
- 'composer.lock'
12+
- 'package.json'
13+
- 'package-lock.json'
14+
- 'bun.lock'
15+
- 'bun.lockb'
16+
- 'yarn.lock'
17+
- '.devcontainer/**/*'
18+
skill:
19+
- changed-files:
20+
- any-glob-to-any-file: ['skills/**/*', '.claude-plugin/**/*', 'plugin.json']
21+
evals:
22+
- changed-files:
23+
- any-glob-to-any-file: ['**/evals/**/*', '**/eval/**/*', '**/*.eval.yaml', '**/*.eval.yml']

.github/template.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Managed by netresearch/.github/templates/skill/
2+
# Drift from the template is blocking CI in this repo (check-template-drift.yml).
3+
# Record explicit exceptions under intentional-drift[] to unblock.
4+
#
5+
# CodeQL: skill repos use GitHub **CodeQL default setup** (a repo setting,
6+
# enabled via Settings > Code security, or `gh api -X PUT
7+
# repos/<owner>/<repo>/code-scanning/default-setup -f state=configured`).
8+
# Default setup auto-detects the repo's interpreted languages and conflicts
9+
# with an advanced codeql.yml workflow — so this template intentionally ships
10+
# NO codeql.yml. Scorecard (scorecard.yml) is separate and IS templated.
11+
#
12+
# Common opt-ins for skill repos (list the file here so the template sync
13+
# stops managing it, then customize it in-repo):
14+
# - .github/workflows/validate-agents.yml (only for skills that ship an
15+
# AGENTS.md generator under skills/<name>/scripts; the reusable's
16+
# scripts-path input is repo-specific so this is never byte-identical)
17+
# - .github/dependabot.yml (when the repo has npm fixtures/devcontainers
18+
# beyond the guaranteed github-actions + composer ecosystems)
19+
template: skill
20+
intentional-drift: []

.github/workflows/auto-merge-deps.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: Auto-merge dependency PRs
22

33
on:
4-
pull_request_target:
4+
# auto-merge only calls `gh pr merge` via the reusable with the base-repo
5+
# token; it never checks out or runs PR head code, so pull_request_target
6+
# (required for a write token on Dependabot/Renovate fork PRs) is safe here.
7+
pull_request_target: # zizmor: ignore[dangerous-triggers]
58

69
permissions: {}
710

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Template Drift
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
merge_group:
9+
10+
permissions: {}
11+
12+
jobs:
13+
drift:
14+
uses: netresearch/.github/.github/workflows/check-template-drift.yml@main
15+
with:
16+
template: skill
17+
permissions:
18+
contents: read
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
name: Eval Validation
22

3+
# Runs the skill's eval suite via the skill-repo-skill reusable. The reusable
4+
# declares `permissions: contents: read` at top level (read-only validator);
5+
# the calling job mirrors it explicitly.
6+
37
on:
48
push:
59
branches: [main]
610
pull_request:
711

8-
permissions:
9-
contents: read
12+
permissions: {}
1013

1114
jobs:
1215
eval-validate:
1316
uses: netresearch/skill-repo-skill/.github/workflows/eval-validate.yml@main
17+
permissions:
18+
contents: read
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
name: Harness Verification
22

3+
# Verifies agent-harness consistency (AGENTS.md index, docs drift) via the
4+
# skill-repo-skill reusable. The reusable declares `permissions: contents:
5+
# read` at top level (read-only validator); the calling job mirrors it.
6+
37
on:
48
pull_request:
59
branches: [main]
610

7-
permissions:
8-
contents: read
11+
permissions: {}
912

1013
jobs:
1114
harness-verify:
1215
uses: netresearch/skill-repo-skill/.github/workflows/harness-verify.yml@main
16+
permissions:
17+
contents: read

.github/workflows/labeler.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Labeler
2+
3+
on:
4+
# labeler only applies labels via the reusable using the base-repo token; it
5+
# never checks out or runs PR head code. pull_request_target is required to
6+
# label fork PRs.
7+
pull_request_target: # zizmor: ignore[dangerous-triggers]
8+
types: [opened, synchronize, reopened]
9+
10+
permissions: {}
11+
12+
jobs:
13+
labeler:
14+
uses: netresearch/.github/.github/workflows/labeler.yml@main
15+
permissions:
16+
contents: read
17+
pull-requests: write

.github/workflows/lint.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
name: Lint
22

3+
# Skill validation (SKILL.md word cap, plugin.json schema, markdown lint, …)
4+
# via the skill-repo-skill reusable. The reusable declares `permissions:
5+
# contents: read` at top level; the calling job mirrors it explicitly so the
6+
# grant is visible at the call site and independent of the repo default.
7+
38
on:
49
push:
510
branches: [main]
611
pull_request:
712

8-
permissions:
9-
contents: read
13+
permissions: {}
1014

1115
jobs:
1216
validate:
1317
name: Skill Validation
1418
uses: netresearch/skill-repo-skill/.github/workflows/validate.yml@main
19+
permissions:
20+
contents: read

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
name: Release
22

3+
# Skill release pipeline (composer/npm package publish + Sigstore cosign +
4+
# SHA256SUMS attestation) via the skill-repo-skill reusable. The reusable's
5+
# release job declares contents/id-token/attestations: write; the calling job
6+
# grants exactly that union. id-token + attestations are required for the
7+
# OIDC-backed Sigstore signing and the GitHub native attestation API.
8+
39
on:
410
push:
511
tags:
612
- 'v*'
713

14+
permissions: {}
15+
816
jobs:
917
release:
1018
uses: netresearch/skill-repo-skill/.github/workflows/release.yml@main
1119
permissions:
1220
contents: write # release upload
13-
id-token: write # OIDC for sigstore (required by the attest job)
14-
attestations: write # GitHub native attestation API (required by the attest job)
21+
id-token: write # OIDC for sigstore (cosign + attest)
22+
attestations: write # GitHub native attestation API

0 commit comments

Comments
 (0)