skill-creator: Invalid YAML in frontmatter

Resolved 💬 2 comments Opened Dec 30, 2025 by darlingm Closed Dec 30, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.77.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.2-codex

What platform is your computer?

Linux 6.17.9-arch1-1 x86_64 unknown

What issue are you seeing?

Skill skill-creator produced a SKILL.md with a collon followed by a space within the description itself, which caused it to be parsed as invalid YAML. Codex then skips loading the skill with an "invalid YAML" error.

What steps can reproduce the bug?

  1. Do not have PyYAML installed.
  2. Use skill-creator to create a new skill.
  3. Get unlucky that the AI model writes a description that includes YAML syntax, or perhaps explicitly tell it to use a description such as "something: something else", and get unlucky that the AI model doesn't realize it needs to quote the description.
  4. Restart Codex, and observe the skill loading error.

What is the expected behavior?

The skill-creator SKILL.md should try preventing invalid YAML frontmatter.

Additional information

At the time, I didn't have PyYAML installed. I see quick_validate.py would have said this was invalid, and perhaps that would have made Codex fix the error. Even so, some users won't have PyYAML installed and additional instruction could prevent this issue. Additionally, saving a validation failure on a system with PyYAML and generating it correct the first time is preferable.

View original on GitHub ↗

2 Comments

etraut-openai contributor · 8 months ago

What you're describing sounds like model behavior, not something in the codex harness. We'll share the feedback with the team responsible for training our codex models. If you see other model behavior that you'd like to report, please use the /feedback command. That will provide us with additional details including logs and conversation text.

In this situation, you can ask codex to fix the YAML file, and it should be able to repair it.

oluckyman · 6 months ago

Hi there.

There is still a separate environment/bootstrap issue with the built-in skill-creator scripts:

Repro on a clean machine (Python installed, no PyYAML):

  1. Run scripts/init_skill.py ... (or scripts/quick_validate.py ...)
  2. It fails with ModuleNotFoundError: No module named 'yaml'

So the flow currently assumes PyYAML is already installed, but there is no clear dependency bootstrap for users.

Could you please either:

  • make these scripts self-contained (no external yaml dependency), or
  • provide explicit dependency setup (requirements.txt + documented install command), and ideally auto-bootstrap in Codex environment.

Right now, when PyYAML is missing, Codex starts improvising hacks around these scripts; it’s very slow, and results are inconsistent (sometimes it works, sometimes it doesn’t).