Skip to content

Fix YAML formatting in SKILL.md files and Jinja templates#175

Merged
nhorton merged 1 commit intomainfrom
claude/fix-skill-frontmatter-spacing-8S8Zu
Jan 28, 2026
Merged

Fix YAML formatting in SKILL.md files and Jinja templates#175
nhorton merged 1 commit intomainfrom
claude/fix-skill-frontmatter-spacing-8S8Zu

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Jan 28, 2026

Summary

This PR fixes YAML formatting issues across skill definition files and Jinja templates to ensure proper parsing and readability.

Key Changes

  • SKILL.md files: Fixed malformed YAML frontmatter by adding proper line breaks between metadata fields

    • Separated description and user-invocable fields onto distinct lines
    • Fixed add_platform.implement which had severely malformed YAML with hooks configuration on single lines
    • Applied consistent formatting across all 16 skill files in .claude/skills/
  • Jinja template: Improved whitespace control in skill-job-step.md.jinja

    • Changed {%- if to {% if for better readability where appropriate
    • Adjusted comment syntax from {#- to {# for consistency
    • Maintained proper indentation in generated YAML output for hooks configuration

Implementation Details

The changes ensure that:

  1. YAML frontmatter in all SKILL.md files is valid and parseable
  2. Generated skill files from the Jinja template will have properly formatted YAML
  3. Hooks configuration (particularly in add_platform.implement) is correctly structured with proper nesting
  4. Template output maintains consistent indentation for readability

https://claude.ai/code/session_01DmwZm5TgeeoR4sxp7GBtBE

The Jinja template for generating SKILL.md files was using {%- tags
that stripped necessary newlines in the YAML frontmatter. This caused
fields like `user-invocable` and `hooks` to be concatenated onto single
lines instead of being properly formatted.

Changes:
- Remove `-` from `{%- if not exposed %}` to preserve newline after description
- Remove `-` from `{%- endif %}` to preserve newline after user-invocable
- Remove `-` from comment start `{#-` to preserve newline before hooks section
- Remove `-` from for loops in hooks section to preserve proper YAML structure

https://claude.ai/code/session_01DmwZm5TgeeoR4sxp7GBtBE
@nhorton nhorton merged commit db129c9 into main Jan 28, 2026
4 checks passed
@nhorton nhorton deleted the claude/fix-skill-frontmatter-spacing-8S8Zu branch January 28, 2026 02:44
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.

2 participants