Bug
OpenCode sessions crash on startup with ConfigFrontmatterError when AO materializes the using-ao skill into .opencode/skills/using-ao/SKILL.md.
Reported on Windows but not platform-specific — it breaks on every OS.
Error
ConfigFrontmatterError: ConfigFrontmatterErrorInput
data: SyntaxError: Unexpected end of JSON input
message: "Failed to parse YAML frontmatter: incomplete explicit mapping pair; a key node is missed"
path: "...\.opencode\skills\using-ao\SKILL.md"
at parse9 (src/config/markdown.ts:24:17)
Root cause
The description and trigger fields in the embedded frontmatter (backend/internal/skillassets/using-ao/SKILL.md) are unquoted YAML plain scalars that contain ": " (colon-space) sequences:
description: Catalog of the AO (Agent Orchestrator) `ao` CLI: spawning workers, ...
trigger: Using the ao CLI in an AO workspace: spawning workers, ...
In YAML, ": " terminates a plain scalar (it is the mapping-pair indicator). The parser reads CLI as the end of the value and treats spawning workers... as a new mapping key with no value → incomplete explicit mapping pair; a key node is missed.
Confirmed with PyYAML:
mapping values are not allowed here
in "<unicode string>", line 2, column 61
Fix
Quote both fields:
description: "Catalog of the AO (Agent Orchestrator) `ao` CLI: spawning workers, ..."
trigger: "Using the ao CLI in an AO workspace: spawning workers, ..."
Files changed:
backend/internal/skillassets/using-ao/SKILL.md — quote description and trigger
backend/internal/skillassets/skillassets_test.go — add TestEmbeddedSkillFrontmatterIsValidYAML regression test that parses the frontmatter with gopkg.in/yaml.v3
The existing tests only checked strings.Contains(skillBody, "name: using-ao") — string presence, not YAML validity. The new test fails on the old code and passes on the fix.
Repro
ao spawn <issue> --harness opencode on any platform
- OpenCode starts, tries to load the materialized skill
- js-yaml rejects the frontmatter →
ConfigFrontmatterError → session dies
Tested
go test ./internal/skillassets/... -v -count=1 # 3/3 PASS
go test ./internal/adapters/agent/opencode/... # all PASS
go vet ./internal/skillassets/... # OK
Bug
OpenCode sessions crash on startup with
ConfigFrontmatterErrorwhen AO materializes theusing-aoskill into.opencode/skills/using-ao/SKILL.md.Reported on Windows but not platform-specific — it breaks on every OS.
Error
Root cause
The
descriptionandtriggerfields in the embedded frontmatter (backend/internal/skillassets/using-ao/SKILL.md) are unquoted YAML plain scalars that contain": "(colon-space) sequences:In YAML,
": "terminates a plain scalar (it is the mapping-pair indicator). The parser readsCLIas the end of the value and treatsspawning workers...as a new mapping key with no value →incomplete explicit mapping pair; a key node is missed.Confirmed with PyYAML:
Fix
Quote both fields:
Files changed:
backend/internal/skillassets/using-ao/SKILL.md— quotedescriptionandtriggerbackend/internal/skillassets/skillassets_test.go— addTestEmbeddedSkillFrontmatterIsValidYAMLregression test that parses the frontmatter withgopkg.in/yaml.v3The existing tests only checked
strings.Contains(skillBody, "name: using-ao")— string presence, not YAML validity. The new test fails on the old code and passes on the fix.Repro
ao spawn <issue> --harness opencodeon any platformConfigFrontmatterError→ session diesTested