feat(skills): move skill version to metadata and track CLI version#601
feat(skills): move skill version to metadata and track CLI version#601ytausch wants to merge 1 commit intogoogleworkspace:mainfrom
Conversation
…d track CLI version
🦋 Changeset detectedLatest commit: c958507 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
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. |
Summary of ChangesHello, 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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
Description
Moves the
versionfield in SKILL.md frontmatter from a top-level field tometadata.version, and changes it from a hardcoded1.0.0to dynamically track the CLI version viaenv!("CARGO_PKG_VERSION").This is a prerequisite for adding
skills-ref validateto CI, which rejectsversionas a top-level frontmatter field.Note that putting
versionunder metadata is the pattern shown in the Agentskills spec: https://agentskills.io/specificationI 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 placeversionundermetadataas a sibling ofopenclaw, using the CLI version instead of hardcoded1.0.0. Added version assertions to all frontmatter tests.scripts/version-sync.sh: Addedcargo run -- generate-skillsso 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:
AGENTS.mdguidelines (no generatedgoogle-*crates).cargo fmt --allto format the code perfectly.cargo clippy -- -D warningsand resolved all warnings.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.