Skip to content

ci: enforce skills-only diffs on PRs#62

Open
kevarifin14 wants to merge 2 commits intomainfrom
ci/enforce-skills-only-diffs
Open

ci: enforce skills-only diffs on PRs#62
kevarifin14 wants to merge 2 commits intomainfrom
ci/enforce-skills-only-diffs

Conversation

@kevarifin14
Copy link
Copy Markdown
Contributor

Adds a CI check that fails any PR touching files outside the allowed set:

  • `*.md` (any markdown — SKILL.md, references, repo docs)
  • `.claude-plugin/marketplace.json`

Why

We just closed a PR (#57/#61, zyfai-yield) that shipped `scripts/*.js` helper files. CONTRIBUTING.md already forbids code in skills, but nothing enforced it — reviewers have to catch it manually, and I missed it on approval. This makes the rule machine-enforced.

Escape hatch

Adding the `allow-infra-change` label to a PR bypasses the check. Use this when legitimately updating:

  • `.github/workflows/*`
  • `scripts/*` (build tooling)
  • `CODEOWNERS`, `LICENSE`, `.gitignore`, etc.

The label is controlled by maintainers, so contributors can't bypass without sign-off.

Test plan

  • CI passes on this PR (it only adds a `.yml` workflow, but it exempts itself via the label on merge — or alternately, the workflow only runs on PRs opened after it lands, so no chicken-and-egg)
  • Add a test PR that tries to sneak in a `.js` file and confirm it's rejected
  • Confirm a plain skill PR (SKILL.md + marketplace.json) still passes

Note: this PR itself touches `.github/workflows/` so I'll need the `allow-infra-change` label applied (or merge it before the workflow is live on the base).

Blocks any PR that adds or modifies files outside the allowed set:
- `*.md` (SKILL.md, references, docs)
- `.claude-plugin/marketplace.json`

Prevents helper scripts, SDK code, and other non-instructional files from landing. Matches the no-code rule in CONTRIBUTING.md.

Maintainers can bypass via the `allow-infra-change` label when legitimately updating CI, scripts, LICENSE, etc.
christopherdro
christopherdro previously approved these changes Apr 21, 2026
@parkintr
Copy link
Copy Markdown

#62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants