Skip to content

fix: repair OpenClaw skill YAML parsing#834

Open
Damin-Lee wants to merge 1 commit intogarrytan:mainfrom
Damin-Lee:fix/openclaw-skill-yaml
Open

fix: repair OpenClaw skill YAML parsing#834
Damin-Lee wants to merge 1 commit intogarrytan:mainfrom
Damin-Lee:fix/openclaw-skill-yaml

Conversation

@Damin-Lee
Copy link
Copy Markdown

Summary

Fix three native OpenClaw SKILL.md files whose YAML frontmatter descriptions were invalid plain scalars, and add a regression test so the same parsing break does not come back. Also sync package.json with the current VERSION file so the existing version-consistency test passes again.


Type of Change

  • Feature - New functionality
  • Bug Fix - Bug fix
  • Refactor - Code improvement without behavior change
  • Documentation - Docs, comments, README updates
  • Style - CSS/UI changes or code formatting
  • Performance - Performance improvements
  • Test - Test additions or modifications
  • Chore - Build, config, dependency updates

Related Issues

  • Closes #N/A
  • Related to #N/A

Root Cause / Context

  • Root cause: three hand-authored OpenClaw skills used plain description: scalars containing : , which is invalid YAML and caused Codex/OpenClaw skill loading to skip them.
  • Why this approach: converting only the affected descriptions to block scalars is the smallest behavior-preserving fix. The added regression test guards the exact failure mode without forcing unrelated skills into block syntax.

What Changed?

Added

  • A regression test in test/gen-skill-docs.test.ts that rejects native OpenClaw descriptions which would be invalid plain-scalar YAML.

Changed

  • Converted frontmatter descriptions in:
    • openclaw/skills/gstack-openclaw-investigate/SKILL.md
    • openclaw/skills/gstack-openclaw-office-hours/SKILL.md
    • openclaw/skills/gstack-openclaw-ceo-review/SKILL.md
  • Synced package.json version to VERSION.

Removed

  • None

Fixed

  • The native OpenClaw skill-loading failure that reported skipped skills due to invalid YAML.
  • The existing package.json vs VERSION mismatch test failure.

Verification

  • bun run check
  • bun test
  • bun run build
  • Manual verification completed
  • Not applicable items were explicitly marked in this PR body

Verification notes:

  • bun run check: N/A, no check script exists in this package.
  • bun test: passed for bun test test/gen-skill-docs.test.ts test/skill-validation.test.ts.
  • bun run build: N/A for this PR.
  • Manual verification:
    • ruby -e 'require "yaml"; ...' successfully parsed all native OpenClaw skills.
    • bun run skill:check passed, including OpenClaw skill inventory/freshness.
    • Full bun test still reports pre-existing golden baseline drift in test/host-config.test.ts for ship skill fixtures, unrelated to this diff.

How to Test

  1. Open any of the three modified OpenClaw skill files and confirm the frontmatter uses description: |.
  2. Run ruby -e 'require "yaml"; Dir["openclaw/skills/*/SKILL.md"].each { |f| YAML.load_file(f); puts f }'.
  3. Run bun run skill:check and bun test test/gen-skill-docs.test.ts test/skill-validation.test.ts.

Screenshots

  • N/A

PC (4K — 3840×2160)

N/A

Mobile (375px)

N/A


Documentation Updates

  • README.md updated (for config/feature changes)
  • Inline code comments added for complex logic
  • API documentation updated (if applicable)
  • N/A - No documentation updates needed

Breaking Changes

  • No breaking changes
  • Breaking changes (explain below):

N/A


Review Focus Areas

  • Confirm the regression test catches only invalid plain-scalar YAML and does not overconstrain other native OpenClaw skills.
  • Confirm syncing package.json to VERSION is the intended source-of-truth direction.

Dependencies

  • No new dependencies
  • New dependencies added:
    • Package:
    • Reason:

Deployment Notes

  • No special deployment steps
  • Environment variable updates required
  • Database migration required
  • Manual testing required in staging/production
  • Other:

Additional Context

If a section does not apply, write N/A instead of deleting it.

This repo currently has unrelated full-suite failures in golden ship-skill fixture tests. They were present outside the scope of the OpenClaw YAML fix, so this PR keeps scope tight and fixes the broken skill-loading path plus its direct regression coverage.


Reviewer Checklist

  • Follows project conventions
  • Changes are appropriately tested
  • Documentation is sufficient
  • No unnecessary complexity
  • PR size is appropriate (< 500 lines recommended)
  • Commit messages are clear and descriptive

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.

1 participant