[Bug]: skill naming checker crashes on malformed YAML frontmatter
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.7k
- Forks
- 2.8k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 489
Description
System Info
Platform-independent CI/checker behavior.
Reproduction
scripts/check_skill_naming_convention.py::load_frontmatter_name() calls yaml.safe_load() without handling yaml.YAMLError:
data = yaml.safe_load(m.group(1)) or {}
A skill or agent file with malformed YAML frontmatter therefore aborts the checker with a PyYAML traceback instead of producing a normal validation diagnostic and exit code 1.
Expected behavior
Malformed frontmatter should be reported as a checker violation so all offending files can be listed in one run.
Actual behavior
The first malformed YAML document raises and terminates the script.
Proposed fix
Catch yaml.YAMLError in frontmatter loading, return a diagnostic to the caller, and add a regression test proving main() reports the malformed file without crashing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in scripts/check_skill_naming_convention.py at load_frontmatter_name() and trace how its result reaches main(). Reproduce the failure with a skill or agent file containing malformed YAML frontmatter, then add the regression test described in the issue. Done means main() reports the malformed file as a validation violation, continues checking other files, and exits with code 1 instead of raising a PyYAML traceback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100