Skip to content

feat(skills): move skill version to metadata and track CLI version#601

Open
ytausch wants to merge 1 commit intogoogleworkspace:mainfrom
ytausch:move-version-to-metadata
Open

feat(skills): move skill version to metadata and track CLI version#601
ytausch wants to merge 1 commit intogoogleworkspace:mainfrom
ytausch:move-version-to-metadata

Conversation

@ytausch
Copy link

@ytausch ytausch commented Mar 24, 2026

Description

Moves the version field in SKILL.md frontmatter from a top-level field to metadata.version, and changes it from a hardcoded 1.0.0 to dynamically track the CLI version via env!("CARGO_PKG_VERSION").

This is a prerequisite for adding skills-ref validate to CI, which rejects version as a top-level frontmatter field.

Note that putting version under metadata is the pattern shown in the Agentskills spec: https://agentskills.io/specification

I think it makes sense to use a proper version number in the skills file, as their change should be reflected in the version.

Changes

  • src/generate_skills.rs: Updated all 5 frontmatter templates (service, helper, shared, persona, recipe) to place version under metadata as a sibling of openclaw, using the CLI version instead of hardcoded 1.0.0. Added version assertions to all frontmatter tests.
  • scripts/version-sync.sh: Added cargo run -- generate-skills so skills are regenerated with the new version during releases.
  • skills/: Regenerated all 93 SKILL.md files.

Dry Run Output:

// Not applicable — no new CLI command or API call added.

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.

AI Note

I used Claude Code (Opus 4.6) to help me prepare this PR, but I reviewed it manually.

@changeset-bot
Copy link

changeset-bot bot commented Mar 24, 2026

🦋 Changeset detected

Latest commit: c958507

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 24, 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.

@ytausch ytausch marked this pull request as ready for review March 24, 2026 09:27
@ytausch ytausch changed the title feat: move skill version to metadata and track CLI version feat(skills): move skill version to metadata and track CLI version Mar 24, 2026
@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 significantly improves the consistency and maintainability of skill definitions by centralizing version management. By moving the skill version into metadata and linking it directly to the CLI's version, it streamlines the release process and prepares the project for more robust validation in continuous integration workflows. This change ensures that all skill files accurately reflect their associated CLI version, enhancing clarity and reducing potential discrepancies.

Highlights

  • Skill Versioning Refactor: The version field in SKILL.md frontmatter has been moved from a top-level field to metadata.version to align with the Agentskills specification and enable future CI validation.
  • Dynamic CLI Version Tracking: The skill versions are now dynamically tracked using the CLI's current version (env!("CARGO_PKG_VERSION")) instead of a hardcoded 1.0.0.
  • Automated Skill Regeneration: The scripts/version-sync.sh script was updated to automatically regenerate all SKILL.md files during releases, ensuring their versions are always in sync with the CLI.
  • Test Enhancements: Version assertions were added to frontmatter tests in src/generate_skills.rs to verify that generated skill files correctly reflect the CLI version.
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 moves the version field into the metadata section for all generated SKILL.md files and updates it to track the CLI's package version. The changes are well-implemented across the skill generation logic and the version-sync script. However, all of the new tests added to verify this change are currently incorrect as they don't account for the YAML indentation of the new version field, which will cause them to fail. I've left specific comments with suggestions to fix these assertions.

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.

2 participants