Repository navigation
ci: validate SKILL.md frontmatter on pull requests - #202
Conversation
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
Original prompt from Matt
|
…date-skill-frontmatter
Co-Authored-By: Matt Apperson <me@mattapperson.com>
There was a problem hiding this comment.
Perry's Review
Verdict: ✅ LGTM
Both findings from my previous review are fixed in 00679152, and I verified the fixes rather than reading them:
- The
actions/checkoutstep — pinned to11d5960a326750d5838078e36cf38b85af677262, which is the commit thev4tag resolves to. - The "Install pinned GitHub CLI" step — the tarball is downloaded, its published checksum verified, and only then extracted. I ran the step in a clean
RUNNER_TEMP: it installs gh 2.103.3 and exits 0. I then tampered the tarball and re-ran it:FAILED … 1 computed checksum did NOT match, exit 1. I also checked the case wheregrepmatches nothing —sha256sum: 'no properly formatted checksum lines found', exit 1 — so a renamed or missing asset fails closed rather than checking nothing.
The check still does its job on the current head: gh skill publish --dry-run . exits 0 on this tree, and exits 1 with invalid frontmatter YAML: yaml: line 2: mapping values are not allowed in this context when the pre-#198 unquoted description is restored. It also catches a newly added skill with broken YAML, a skill with no frontmatter, and a name/directory mismatch, and it correctly ignores the license/long-body warnings. The stale "will fail until #198 merges" caveat is gone from the description.
One thing this PR does not do, which is worth stating plainly so nobody reads more safety into it than exists: the check is not yet required to merge. The active basic ruleset (14604602) contains only deletion, non_fast_forward, and pull_request rules — there is no required_status_checks rule. A red run here is visible on the PR but does not block the merge, so recurrence is still possible. Adding "Validate skills" under Settings → Rules → basic → required status checks closes it. I am approving the workflow because that is a repository-settings change outside this diff, not a defect in it — but please make that change, or this is a signal rather than a gate.
Risk assessment
Risk: 🟡 Medium
| Dimension | Severity | Risk | Reasoning |
|---|---|---|---|
| Implementation risk | 🟩 | Low | Install, checksum, tamper-detection, and the validation step were all executed and behave correctly. |
| Premise risk | 🟨🟨 | Medium | The check catches the regression, but as merged it reports rather than blocks until it is made required. |
| Estimated impact | 🟨🟨 | Medium | Worst case a broken skill frontmatter ships again and users hit the same install error. |
| Risk Factor | Severity | Risk | Reasoning |
|---|---|---|---|
| Reversibility | 🟩 | Low | A workflow file reverts cleanly. |
| Detectability | 🟩 | Low | The failure is printed on every affected PR. |
| Blast radius | 🟩 | Low | Repo CI only; no runtime surface. |
| Data integrity | None | No persisted state. | |
| Financial exposure | None | No billing surface. | |
| Security and privacy exposure | 🟩 | Low | Download is now checksum-verified and the action is commit-pinned. |
| Propagation | 🟨🟨 | Medium | A bad skill still reaches users via gh skill install and the plugin marketplace if merged past a red run. |
| Availability | 🟩 | Low | A failed download fails one job, not a product path. |
| Recovery cost | 🟩 | Low | One-line quoting fix, as #198 showed. |
| Time to correct | 🟩 | Low | Immediate once noticed. |
Estimated impact: Worst case is a repeat of #192 — malformed skill frontmatter reaches main and every user installing that skill gets an error that looks like a CLI fault rather than a repo defect.
Summary
Adds
.github/workflows/validate-skills.yml. It runsgh skill publish --dry-run .on every PR and on every push tomain. This is the first CI in the repo.Why: #192 merged a
descriptionwith an unquoted:. After that,gh skill install OpenRouterTeam/skills openrouter-decisionsfailed withinvalid frontmatter YAML: yaml: line 2: mapping values are not allowed in this context.publish --dry-runuses the same frontmatter parser asinstall, plus the agentskills.io checks:nameanddescriptionare present, andnamematches the directory. So the check fails on exactly the errors users hit at install time. Warnings such as a missinglicenseor a long body don't fail it.gh skillis a preview command and may not exist on the runner's gh.Verified:
mainbefore Added double quotes around the description #198, the first CI run failed witherror openrouter-decisions invalid frontmatter YAML ....mainwith Added double quotes around the description #198, the check passes in CI and locally.actionlintpasses.What still doesn't work
Searched existing PRs: #193 adds the third-party LintLang linter. I ran its exact command (
lintlang scan --discover . --fail-on fail, 0.8.1) on the brokenmain, and it passed all 19 SKILL.md files, includingopenrouter-decisions, so it doesn't catch this class of error. This PR doesn't supersede #193.Link to Devin session: https://openrouter.devinenterprise.com/sessions/485ff7dc41114055a8d0407a0b3f7911
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/485ff7dc41114055a8d0407a0b3f7911?variant=devin
Requested by: @mattapperson