feat(cli): enable skill activation via slash commands#21758
feat(cli): enable skill activation via slash commands#21758NTaylorMullen merged 4 commits intomainfrom
Conversation
- Register agent skills as dynamic slash commands using SkillCommandLoader - Allow client-initiated tool calls to skip user confirmation if policy is ASK_USER - Support follow-up prompt in skill slash commands via postSubmitPrompt - Add tests for SkillCommandLoader and policy bypass
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 enhances the CLI's interactivity by integrating agent skills directly into the slash command system. Users can now activate skills with a simple command and optionally provide an immediate follow-up prompt, creating a more fluid conversational experience. The changes also refine the policy engine to intelligently handle client-initiated tool calls, reducing friction by skipping redundant confirmation steps for actions explicitly requested by the user through slash commands. Highlights
Changelog
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
|
|
Size Change: +1.86 kB (+0.01%) Total Size: 26.2 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to activate agent skills using slash commands, which is a great usability improvement. The implementation correctly adds a new SkillCommandLoader and propagates a postSubmitPrompt for follow-up queries. The logic to implicitly confirm user-initiated tool calls by bypassing the ASK_USER policy step is also implemented correctly. My main feedback is a high-severity issue regarding the handling of skill names that contain spaces, which would make them impossible to invoke as slash commands. I've suggested a fix to sanitize skill names to ensure they are valid command identifiers, consistent with other parts of the codebase.
…21758) Co-authored-by: matt korwel <[email protected]>
…21758) Co-authored-by: matt korwel <[email protected]>
…21758) Co-authored-by: matt korwel <[email protected]>
…21758) Co-authored-by: matt korwel <[email protected]>
…21758) Co-authored-by: matt korwel <[email protected]>
Summary
This PR enables the ability to invoke agent skills directly via slash commands (e.g.,
/google-foo). It also supports optional follow-up prompts, where/<skill-name> hello worldwill activate the skill and then immediately submit "hello world" as a prompt to the model.Details
ASK_USER.ToolActionReturnandSlashCommandProcessorResultto support an optional prompt to be submitted after a tool call completes.postSubmitPromptand trigger the model accordingly.Related Issues
None.
How to Validate
.gemini/skills/my-test-skill/SKILL.md./my-test-skillappears in the slash command suggestions./my-test-skilland observe it activates without a confirmation dialogue./my-test-skill please help me with Xand observe it activates the skill and then submits the prompt.Pre-Merge Checklist