Skip to content

Agent Skills: Implement /skills reload#15865

Merged
NTaylorMullen merged 6 commits into
mainfrom
ntm/skills.9
Jan 5, 2026
Merged

Agent Skills: Implement /skills reload#15865
NTaylorMullen merged 6 commits into
mainfrom
ntm/skills.9

Conversation

@NTaylorMullen
Copy link
Copy Markdown
Collaborator

Summary

This PR implements the /skills reload subcommand, allowing users to refresh discovered agent skills without restarting the CLI session.

Details

  • Core Service Update: Added reloadSkills() to the Config class in Core. This method re-runs skill discovery (Extensions + Local) and re-registers the ActivateSkillTool with the updated skill list.
  • Dynamic Refresh: Added an onReload callback to Config to allow it to fetch fresh settings (like disabledSkills) from the CLI's LoadedSettings during a reload.
  • UI Reactivity: Introduced a SettingsChanged event in coreEvents and a settingsNonce in AppContainer to force a React re-render when settings are updated via slash commands. This ensures /skills list and other UI elements reflect the latest state immediately after a reload.
  • Slash Command: Implemented /skills reload in packages/cli/src/ui/commands/skillsCommand.ts. It provides visual feedback via a pending item while reloading.
  • UX Improvement: Updated the success messages for /skills enable and /skills disable to explicitly suggest using /skills reload for changes to take effect, replacing the previous "Restart required" notice.
  • Testing: Added unit tests in skillsCommand.test.ts to verify success and error paths for the reload action.

Related Issues

Fixes #15726

How to Validate

  1. Launch Gemini CLI in interactive mode.
  2. Disable a skill: /skills disable <name>.
    • Expectation: Message suggests using /skills reload.
  3. Reload skills: /skills reload.
    • Expectation: Success message appears, and the skill is now effectively disabled for the agent (verified by subsequent /skills list or agent interaction).
  4. Modify a skill file (e.g., in a local .gemini/skills dir) and run /skills reload.
    • Expectation: The agent's next turn should reflect the updated skill instructions.

Pre-Merge Checklist

  • Added/updated tests
  • Validated on MacOS

@NTaylorMullen NTaylorMullen requested a review from a team as a code owner January 3, 2026 23:44
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @NTaylorMullen, 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 user experience of the Gemini CLI by introducing a /skills reload command. This command allows for the dynamic refreshing of agent skills and associated settings without requiring a full application restart. The changes span core configuration, UI reactivity, and command-line interface updates, ensuring that skill management is more fluid and responsive.

Highlights

  • New /skills reload Command: Introduced the /skills reload subcommand, enabling users to refresh discovered agent skills dynamically without needing to restart the CLI session.
  • Core Service Update for Skill Reloading: The Config class in the core service now includes a reloadSkills() method, which re-runs skill discovery (extensions and local) and re-registers the ActivateSkillTool with the updated skill list.
  • Dynamic Settings Refresh: An onReload callback has been added to the Config class, allowing it to fetch fresh settings, such as disabledSkills, from the CLI's LoadedSettings during a reload operation.
  • UI Reactivity: A SettingsChanged event in coreEvents and a settingsNonce in AppContainer were implemented to force a React re-render when settings are updated via slash commands, ensuring UI elements like /skills list reflect the latest state immediately.
  • Improved User Experience: Success messages for /skills enable and /skills disable have been updated to explicitly suggest using /skills reload for changes to take effect, replacing the previous 'Restart required' notice.
  • Comprehensive Testing: Unit tests were added in skillsCommand.test.ts to verify the success and error paths for the new reload action, ensuring its reliability.
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.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, 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
Copy Markdown
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 introduces a /skills reload command, which is a great enhancement for developer experience. The implementation correctly handles backend logic in the core package and ensures UI reactivity in the CLI package through a nonce-based state update. The changes to user messages are also a good UX improvement.

I've identified two potential logic errors in the reloadSkills method in packages/core/src/config/config.ts that could lead to stale state for disabled skills and the ActivateSkillTool schema. My review includes suggestions to address these issues to make the feature more robust.

Comment thread packages/core/src/config/config.ts Outdated
Comment thread packages/core/src/config/config.ts
Copy link
Copy Markdown
Contributor

@abhipatel12 abhipatel12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments! Lmk what you think!

Comment thread packages/core/src/config/config.ts
Comment thread packages/cli/src/ui/commands/skillsCommand.ts
Comment thread packages/cli/src/ui/commands/skillsCommand.ts Outdated
Base automatically changed from ntm/skills.8 to main January 5, 2026 04:54
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 5, 2026

Size Change: +3.22 kB (+0.01%)

Total Size: 22.2 MB

Filename Size Change
./bundle/gemini.js 22.2 MB +3.22 kB (+0.01%)
ℹ️ View Unchanged
Filename Size
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB

compressed-size-action

@NTaylorMullen NTaylorMullen force-pushed the ntm/skills.9 branch 3 times, most recently from 4258fa7 to cb9cc00 Compare January 5, 2026 06:05
Copy link
Copy Markdown
Contributor

@abhipatel12 abhipatel12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@NTaylorMullen NTaylorMullen added this pull request to the merge queue Jan 5, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jan 5, 2026
- Add 'reloadSkills' method to 'Config' core service to re-discover skills
- Implement '/skills reload' subcommand in CLI UI
- Update '/skills enable/disable' messages to suggest '/skills reload' instead of restart
- Add comprehensive unit tests for reload subcommand

Fixes #15726
- Add 'unregisterTool' method to ToolRegistry
- Update Config.reloadSkills to register/unregister ActivateSkillTool based on skill availability
- Fix logic to correctly clear disabledSkills when settings are refreshed
- Enhance /skills reload feedback to show added/removed skill counts
- Implement flicker prevention for reload message (100ms delay)
- Add comprehensive unit tests for new reload logic in Config and skillsCommand
…d skills

- Compare skill name sets before and after reload to identify specific changes
- Report both additions and removals in the success message (e.g., "1 new skill discovered and 1 skill removed")
- Add unit test for the mixed added/removed scenario
@NTaylorMullen NTaylorMullen added this pull request to the merge queue Jan 5, 2026
Merged via the queue into main with commit 2cb33b2 Jan 5, 2026
18 of 20 checks passed
@NTaylorMullen NTaylorMullen deleted the ntm/skills.9 branch January 5, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent Skills: Implement Skill Reloading (/skills reload command)

2 participants