Skip to content

fix(workos-widgets): make SKILL.md frontmatter valid YAML - #61

Merged
nicknisi merged 2 commits into
mainfrom
riker/245-fix-https-github-com-workos-skills-issue
Oct 28, 2026
Merged

nicknisi merged 2 commits into
mainfrom
riker/245-fix-https-github-com-workos-skills-issue

Conversation

@nicknisi

Copy link
Copy Markdown
Member

Why

Fix #58: the frontmatter of plugins/workos/skills/workos-widgets/SKILL.md has been invalid YAML since #50 (v0.8.1). Its description is a plain unquoted scalar that now contains ": " ("…member-management UI requests: recommend the published React components…"), which strict parsers (js-yaml 4, yaml 2, PyYAML/apm) reject. Rewrite the description as a folded block scalar (description: >- with the text indented below it) or a properly quoted string, keeping its wording exactly the same. Then make every SKILL.md in the repo parse as strict YAML: check them all and fix any others the same way. Add a vitest test (run by pnpm test, so CI catches it next time) that finds every tracked SKILL.md, pulls out its frontmatter between the leading --- lines, parses it with the repo's yaml dependency, and fails on any parse error or a missing name/description. Commit with a Conventional Commits message that references "Fixes #58".

Decided

  • Blocker on the final check: pnpm format:check fails at the base commit 0fb1cfb itself, before any of my changes, on plugins/workos/.codex-plugin/plugin.json. That file is outside this task. The release-please bot's release 0.8.1 commit (b9cb597) re-serialised that file and expanded two short arr… → Go with (B), in its own commit, for example chore: let oxfmt skip the release-bot-written codex plugin.json. Add "plugins/workos/.codex-plugin/plugin.json" to ignorePatterns in .oxfmtrc.json, and don't reformat the file itself. Don't touch any other file, and keep the existing ignore entries… (Riker's call)
  • Job 245 takes away nothing (the codex plugin.json is no longer format-checked, but it is written by release-please anyway). Publish it as asked? → A: Publish it as asked (the author's answer)

Proven

  • git merge-base --is-ancestor 0fb1cfb HEAD && git diff --quiet 0fb1cfb HEAD -- package.json pnpm-lock.yaml CHANGELOG.md release-please-config.json && test -n "$(git ls-files 'scripts/tests/*.spec.ts' | xargs grep -l -F 'SKILL.md')" && (pnpm install --offline --frozen-lockfile >/dev/null 2>&1 || pnpm install --prefer-offline --frozen-lockfile >/dev/null 2>&1) && node --input-type=module -e "import {parse} from 'yaml'; import {readFileSync} from 'fs'; import {execSync} from 'child_process'; const files=execSync('git ls-files \"*SKILL.md\"').toString().trim().split('\n').filter(Boolean); if(files.length<2) throw new Error('too few SKILL.md'); for (const f of files){const m=readFileSync(f,'utf8').match(/^---\r?\n([\s\S]*?)\r?\n---/); if(!m) throw new Error('no frontmatter '+f); const d=parse(m[1],{strict:true,uniqueKeys:true}); if(!d||typeof d.name!=='string'||!d.name||typeof d.description!=='string'||!d.description) throw new Error('no name/description '+f); const old=execSync('git show 0fb1cfb:'+f).toString().match(/^---\r?\n([\s\S]*?)\r?\n---/)[1].split('\n').find(l=>l.startsWith('description: ')); if(old&&!/^description: [>|'\"]/.test(old)&&old.slice(13).trim()!==d.description) throw new Error('description text changed '+f)}" && pnpm test && pnpm lint && pnpm format:check passed on 4f9cb44 (run 1).
  • New tests not run on base: no test runner I recognise in the check.
  • Review of e25141b..f4a31ea: approved.

Opened as a draft by Riker (job 245).

…alid YAML

The workos-widgets description was a plain scalar containing ": ", which
strict YAML parsers (js-yaml 4, yaml 2, PyYAML/apm) reject. Rewrite it as
a folded block scalar with the parsed text unchanged, and add a spec that
strictly parses every tracked SKILL.md frontmatter and requires a
non-empty name and description.

Fixes #58
release-please rewrites plugins/workos/.codex-plugin/plugin.json on every
release (0.8.1, 0.8.2) and expands its short arrays, which leaves
format:check red. Ignore it like CHANGELOG.md and pnpm-lock.yaml.
@nicknisi
nicknisi marked this pull request as ready for review October 28, 2026 14:35
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The changes stay within skill metadata checks and formatter scope.

The YAML fix appears safe to merge, with a non-blocking gap in automated test coverage.

Findings

  1. P2 CI skips the new test ▶
Fix with agent prompt
### Issue 1
scripts/tests/skill-frontmatter.spec.ts:26-31
The new test runs through `pnpm test`, but no GitHub workflow runs that command. The pull-request workflow only checks the PR title, and the release workflow builds and publishes without running tests. Another invalid description can therefore merge and ship without this check catching it. Add a pull-request job that installs dependencies and runs `pnpm test`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Fixes the Widgets skill’s YAML description without changing its wording.

  • The WorkOS Widgets skill description parses as strict YAML.
  • The formatter skips the release-written Codex plugin file.

Acknowledgment: Riker requested the formatter exclusion because release automation rewrites the manifest. The supplied description attributes approval to the author, nicknisi.

Reviews (1) · Last reviewed commit: "chore: let oxfmt skip the release-bot-wr..." · Reviewed by Greptile

Comment on lines +26 to +31
describe('SKILL.md frontmatter', () => {
it('finds tracked SKILL.md files', () => {
expect(skillFiles.length, 'git ls-files found no SKILL.md files').toBeGreaterThan(0);
});

it.each(skillFiles)('%s parses as strict YAML with a name and description', (path) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 CI skips the new test

The new test runs through pnpm test, but no GitHub workflow runs that command. The pull-request workflow only checks the PR title, and the release workflow builds and publishes without running tests. Another invalid description can therefore merge and ship without this check catching it. Add a pull-request job that installs dependencies and runs pnpm test.

Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/tests/skill-frontmatter.spec.ts
Line: 26-31

Comment:
**CI skips the new test**

The new test runs through `pnpm test`, but no GitHub workflow runs that command. The pull-request workflow only checks the PR title, and the release workflow builds and publishes without running tests. Another invalid description can therefore merge and ship without this check catching it. Add a pull-request job that installs dependencies and runs `pnpm test`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch: no workflow runs pnpm test today. Adding PR CI is being raised as a separate follow-up and isn't part of this fix. For now the spec catches the problem whenever pnpm test is run.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. The test still provides the intended check whenever pnpm test runs, and adding PR CI can be handled separately. I’ll withdraw this as a blocker for the current fix.

@nicknisi
nicknisi merged commit 17bd384 into main Oct 28, 2026
4 checks passed
@nicknisi
nicknisi deleted the riker/245-fix-https-github-com-workos-skills-issue branch October 28, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

workos-widgets SKILL.md frontmatter is invalid YAML in v0.8.1 (breaks strict parsers)

1 participant