Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changeset/fix-issue-521-yaml-skills.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---\n"@googleworkspace/cli": patch\n---\n\nfix(skills): use block sequences for YAML frontmatter to improve compatibility with validation tools
15 changes: 10 additions & 5 deletions src/generate_skills.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ metadata:
openclaw:
category: "productivity"
requires:
bins: ["gws"]
bins:
- "gws"
cliHelp: "gws {alias} --help"
---

Expand Down Expand Up @@ -526,7 +527,8 @@ metadata:
openclaw:
category: "{category}"
requires:
bins: ["gws"]
bins:
- "gws"
cliHelp: "gws {alias} {cmd_name} --help"
---

Expand Down Expand Up @@ -673,7 +675,8 @@ metadata:
openclaw:
category: "productivity"
requires:
bins: ["gws"]
bins:
- "gws"
---

# gws — Shared Reference
Expand Down Expand Up @@ -773,7 +776,8 @@ metadata:
openclaw:
category: "persona"
requires:
bins: ["gws"]
bins:
- "gws"
Comment on lines +779 to +780
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}

skills: [{skills}]
---

Expand Down Expand Up @@ -844,7 +848,8 @@ metadata:
category: "recipe"
domain: "{category}"
requires:
bins: ["gws"]
bins:
- "gws"
Comment on lines +851 to +852
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}

skills: [{skills}]
---

Expand Down
Loading