Skip to content

Fix YAML frontmatter, consolidate transformers, add harness reference#69

Merged
pbakaus merged 4 commits intomainfrom
chore/fix-yaml-frontmatter
Mar 24, 2026
Merged

Fix YAML frontmatter, consolidate transformers, add harness reference#69
pbakaus merged 4 commits intomainfrom
chore/fix-yaml-frontmatter

Conversation

@pbakaus
Copy link
Copy Markdown
Owner

@pbakaus pbakaus commented Mar 24, 2026

Summary

  • Fix Invalid YAML in adapt skill front matter breaks GitHub preview and Codex loading #67: Invalid YAML in skill frontmatter -- argument-hint values starting with [ were parsed as YAML flow sequences. Replace structured args arrays with pre-formatted argument-hint strings and quote values starting with [ or { in generateYamlFrontmatter().
  • Consolidate build transformers: Replace 8 nearly-identical transformer files (~400 lines) with a single config-driven createTransformer() factory. Adding a new provider now requires only a config object in providers.js. Net -6,400 lines.
  • Add HARNESSES.md: Source of truth for each harness's skills capabilities, verified against official docs. Covers frontmatter support, directory structures, and placeholder/substitution features.
  • Update provider configs: Corrected frontmatter field allowlists based on official documentation (added fields for Cursor, Copilot, Pi; removed incorrect Codex/Gemini body transforms).

Test plan

  • bun test -- 178 tests pass
  • bun run build -- completes successfully, all 8 providers output correctly
  • diff -r dist-before/ dist/ -- verified output is identical after factory refactor
  • Spot-check generated skills in .claude/, .codex/, .agents/ for valid YAML frontmatter

🤖 Generated with Claude Code

pbakaus and others added 2 commits March 24, 2026 09:48
Fixes #67: argument-hint values starting with [ were parsed as YAML flow
sequences. Replace structured args arrays in source files with pre-formatted
argument-hint strings, and quote values starting with [ or { in
generateYamlFrontmatter().

Also consolidates 8 nearly-identical transformer files into a single
config-driven createTransformer() factory. Adding a new provider now
requires only a config object in providers.js instead of a full file.

- Replace args source frontmatter with argument-hint strings
- Add YAML quoting for values starting with [ or {
- Add quote stripping to parseFrontmatter() for round-trip support
- Create factory.js + providers.js, delete 8 individual transformers
- Replace 16 explicit build.js calls with a loop over PROVIDERS
- Consolidate 8 test files into 2 (factory + providers)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Research each harness's official documentation to verify and correct
provider frontmatter configs. Remove Codex/Gemini body transforms that
targeted their commands systems, not skills.

- Add compatibility + metadata to Cursor and Agents (Copilot)
- Add allowed-tools to Pi
- Remove Codex $ARGNAME and Gemini {{args}} body transforms
- Add HARNESSES.md as source of truth for harness capabilities

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 24, 2026

pbakaus and others added 2 commits March 24, 2026 15:19
Resolve conflict from codex.js (deleted in our branch, modified on main
for command_prefix). The command_prefix feature from main is preserved
in factory.js via PROVIDER_PLACEHOLDERS lookup.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Skill cross-references like "Use the frontend-design skill" and
"run teach-impeccable" now use {{command_prefix}} so each provider
gets the correct invocation syntax (/ for most, $ for Codex).

Prose references to skill content ("guidelines in the frontend-design
skill") are left unchanged since they're not invocation instructions.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@pbakaus pbakaus merged commit 8f5d0b3 into main Mar 24, 2026
2 checks passed
@pbakaus pbakaus deleted the chore/fix-yaml-frontmatter branch March 24, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid YAML in adapt skill front matter breaks GitHub preview and Codex loading

1 participant