Skip to content

fix(skills): use block sequences for YAML frontmatter#541

Closed
dumko2001 wants to merge 3 commits intogoogleworkspace:mainfrom
dumko2001:fix/issue-521-yaml-skills-v2
Closed

fix(skills): use block sequences for YAML frontmatter#541
dumko2001 wants to merge 3 commits intogoogleworkspace:mainfrom
dumko2001:fix/issue-521-yaml-skills-v2

Conversation

@dumko2001
Copy link
Contributor

@dumko2001 dumko2001 commented Mar 18, 2026

Description

Standardize SKILL.md frontmatter by using YAML block sequences instead of flow sequences for the bins and skills fields. This ensures compatibility with agentskills and other LLM agent validation tools that use strict YAML 1.1 parsers.

Fixes #521

Checklist:

  • My code follows the AGENTS.md guidelines (no generated google-* crates).
  • I have run cargo fmt --all to format the code perfectly.
  • I have run cargo clippy -- -D warnings and resolved all warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have provided a Changeset file (e.g. via pnpx changeset) to document my changes.

@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2026

🦋 Changeset detected

Latest commit: 712be4b

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request standardizes the YAML frontmatter format within SKILL.md files. By transitioning from flow sequences to block sequences for list definitions, it resolves parsing issues with tools like agentskills and other LLM agent validation utilities that adhere to stricter YAML 1.1 specifications, thereby enhancing the robustness and interoperability of skill definitions.

Highlights

  • YAML Frontmatter Standardization: Standardized the SKILL.md frontmatter to use YAML block sequences instead of flow sequences for the bins and skills fields.
  • Improved Compatibility: Ensured compatibility with agentskills and other LLM agent validation tools that rely on strict YAML 1.1 parsers.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request successfully standardizes the bins field in the YAML frontmatter to use block sequences instead of flow sequences. This change aligns with the objective of improving compatibility with strict YAML 1.1 parsers, as described in the pull request. The modifications are consistent across all instances in src/generate_skills.rs.

@googleworkspace-bot
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to standardize YAML frontmatter to use block sequences instead of flow sequences. The changes correctly update the bins field to a block sequence in several skill generation functions. However, the skills field in render_persona_skill and render_recipe_skill is still being generated as a flow sequence, which is inconsistent with the stated goal. I've left comments on the related changes with suggestions on how to fully implement the intended standardization for the skills field as well.

Comment on lines +779 to +780
bins:
- "gws"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While you've correctly converted bins to a block sequence, the skills field on the following line (781) is still being generated as a flow sequence. This is inconsistent with the PR's goal of using block sequences for compatibility.

To fix this, you'll need to adjust how required_skills is generated (lines 761-766) and update the format string.

  1. Update the required_skills generation:

    let required_skills = persona
        .services
        .iter()
        .map(|s| format!("\n        - \"gws-{s}\""))
        .collect::<String>();
  2. Update the skills line in the template string:

    -      skills: [{skills}]
    +      skills:{skills}

Comment on lines +851 to +852
bins:
- "gws"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Similar to the issue in render_persona_skill, while bins is now a block sequence, the skills field on the next line (853) is still a flow sequence. To be consistent with the PR's goal, this should also be converted to a block sequence.

To fix this, you'll need to adjust how required_skills is generated (lines 832-837) and update the format string.

  1. Update the required_skills generation:

    let required_skills = recipe
        .services
        .iter()
        .map(|s| format!("\n        - \"gws-{s}\""))
        .collect::<String>();
  2. Update the skills line in the template string:

    -      skills: [{skills}]
    +      skills:{skills}

@googleworkspace-bot
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request successfully updates the bins field in the YAML frontmatter of SKILL.md files to use block sequences, which aligns with the goal of improving compatibility with strict YAML 1.1 parsers. However, the pull request description also states that the skills field should be standardized to use block sequences, but this change has not been applied. The skills field still uses flow sequences, which might lead to continued compatibility issues for that specific field. This omission means the pull request does not fully achieve its stated objective.

@jpoehnelt jpoehnelt closed this Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SKILL.md frontmatter uses flow sequences which fail agentskills validate

3 participants