feat(cli): add builtin /skills sync command#21581
Conversation
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 introduces a significant enhancement to the CLI by adding a built-in /skills sync command. This command streamlines the process of integrating skills from external AI tools like Claude Code and OpenCode, eliminating the need for manual scripts or TOML configurations. The implementation focuses on performance, reliability, and user experience, ensuring that skill synchronization is fast, intelligent, and provides clear feedback on its operations. Highlights
Changelog
Activity
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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
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. |
There was a problem hiding this comment.
Code Review
This pull request introduces a new /skills sync command to synchronize skills from external tools. The implementation is well-structured, using parallel operations for performance and including logic for conflict detection and cleanup. The associated UI command and tests are also comprehensive.
jackwotherspoon
left a comment
There was a problem hiding this comment.
I am not sure I agree that this should be something we add into Gemini CLI natively.
Agent Skills are standardized and we support reading from .agents/skills which most providers support as well.
For providers like CC who do not support .agents you can still create a symbolic link outside of Gemini CLI.
What is the value to adding the command into Gemini CLI, better discoverability?
Not sure the maintenance burden of this code justifies it.
But happy to discuss and hear more on the use-case or something I may be missing here 😁
|
Thank you for the thoughtful feedback, @jackwotherspoon! I really appreciate your perspective on keeping the core lean and adhering to the The primary motivation for this PR comes from handling skill collections at scale. While manual symbolic linking or the existing
I agree that maintenance burden is always a concern. To mitigate this, I've included a comprehensive test suite covering these edge cases. My goal was to provide a "one-click" experience for users moving between tools, making Gemini CLI the most seamless hub for their entire skill library. I'm very open to your suggestions on how we might refine this logic to be even lighter or more aligned with the project's long-term vision! 😁 |
|
@zhangxaochen I am not sure I follow the above.
You can create a single symbolic link from Which I think is probably the best to recommend for the time being. I don't think we want to be maintaining this and would rather hope that CC adds support for I could see in the future us wanting to add a |
|
Hi there! Thank you for your interest in contributing to Gemini CLI. To ensure we maintain high code quality and focus on our prioritized roadmap, we have updated our contribution policy (see Discussion #17383). We only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'. All other community pull requests are subject to closure after 14 days if they do not align with our current focus areas. For this reason, we strongly recommend that contributors only submit pull requests against issues explicitly labeled as 'help-wanted'. This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding and for being part of our community! |
Summary
Adds a native
/skills syncslash command to automatically synchronize skills from external AI tools (Claude Code, OpenCode). This replaces the need for external shell scripts or TOML-based prompt commands, providing a faster, more reliable, and conflict-aware implementation.Details
syncSkillsinskillUtils.tsusingPromise.allfor parallel I/O, capable of handling hundreds of skill links in milliseconds.SKILL.md) across multiple tiers (Extension, User Alias, User Standard) to prevent name collisions even when directory names differ (e.g.,pymc/directory vspymc-bayesian-modelingskill name)./skills syncsubcommand toskillsCommand.tswith detailed feedback on synced, cleaned, and skipped skills.Related Issues
Related to #21562
How to Validate
Manual Verification
npm run start/skills syncSync complete. Synced 1 skill (sync-test-demo).ls -l ~/.gemini/skills/sync-test-demo(should point to~/.claude/skills/sync-test-demo)rm -rf ~/.claude/skills/sync-test-demothen run/skills syncagain. It should reportCleaned up 1 stale link.Automated Tests
Run the new comprehensive tests:
npx vitest run packages/cli/src/utils/skillUtils.test.ts packages/cli/src/ui/commands/skillsCommand.test.tsPre-Merge Checklist