Skip to content

fix: use block-style YAML sequences in SKILL.md frontmatter#560

Open
ademakdogan wants to merge 1 commit intogoogleworkspace:mainfrom
ademakdogan:fix/skill-frontmatter-block-sequences
Open

fix: use block-style YAML sequences in SKILL.md frontmatter#560
ademakdogan wants to merge 1 commit intogoogleworkspace:mainfrom
ademakdogan:fix/skill-frontmatter-block-sequences

Conversation

@ademakdogan
Copy link

Description

Replace flow sequences (bins: ["gws"], skills: [...]) with block-style sequences in all generated SKILL.md frontmatter templates.
Flow sequences are valid YAML but rejected by strictyaml, which the Agent Skills reference implementation (agentskills validate) uses to parse frontmatter. This caused all 93 generated skills to fail validation.
Also adds unit tests verifying that service, shared, persona, and recipe skill templates produce block-style sequences only.
Fixes #521
Dry Run Output:

N/A

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: 923a1d6

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

This PR includes changesets to release 1 package
Name Type
@googleworkspace/cli Patch

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

@google-cla
Copy link

google-cla bot commented Mar 18, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@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 refactors the YAML output for skill frontmatter to comply with stricter parsing rules, specifically those enforced by strictyaml. By switching from flow sequences to block-style sequences, the change ensures that all generated skill definitions are correctly validated, thereby improving the robustness and compatibility of the skill generation process. The update also includes new tests to prevent regressions in YAML formatting.

Highlights

  • YAML Frontmatter Formatting: Updated the generation of SKILL.md frontmatter templates to use block-style YAML sequences instead of flow sequences. This change addresses an incompatibility with strictyaml, which rejected the previous flow-style format.
  • Validation Fix: Resolved an issue where all 93 generated skills failed validation due to strictyaml's strict parsing of YAML sequences, ensuring all skills now pass validation.
  • Unit Testing: Added comprehensive unit tests to verify that service, shared, persona, and recipe skill templates consistently produce block-style YAML sequences in their frontmatter.
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

This pull request correctly replaces YAML flow sequences with block-style sequences in the generated SKILL.md frontmatter to ensure compatibility with strictyaml. The changes are applied consistently across service, shared, persona, and recipe skill templates. The addition of unit tests to verify the output format is a great improvement that will prevent regressions. I have one suggestion regarding the new test assertions to make them more robust against future changes.

Replace flow sequences (bins: ["gws"], skills: [...]) with block-style
sequences in all generated SKILL.md frontmatter templates.

Flow sequences are valid YAML but rejected by strictyaml, which the
Agent Skills reference implementation (agentskills validate) uses to
parse frontmatter. This caused all 93 generated skills to fail
validation.

Also adds unit tests verifying that service, shared, persona, and
recipe skill templates produce block-style sequences only.

Fixes googleworkspace#521
@ademakdogan ademakdogan force-pushed the fix/skill-frontmatter-block-sequences branch from b4bf22c to 923a1d6 Compare March 19, 2026 00:42
@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 correctly resolves the YAML validation issue by converting flow-style sequences to block-style sequences in the generated SKILL.md frontmatter. The changes are applied consistently across all relevant skill generation functions. The addition of a comprehensive set of unit tests is a significant improvement that ensures the generated YAML remains compliant and prevents future regressions. The code is clean, focused, and effectively addresses the problem.

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

2 participants