Skip to content

Conversation

@NTaylorMullen
Copy link
Collaborator

@NTaylorMullen NTaylorMullen commented Dec 30, 2025

Summary

This PR implements the foundational infrastructure for Agent Skills in
Gemini CLI. It introduces the core discovery engine, the SkillManager service,
and the initial configuration gates required to support specialized expertise
based on the Agent Skills open standard.

Details

  • SkillManager Service: A new centralized service in
    @google/gemini-cli-core that handles the discovery, parsing, and lifecycle
    management of skills.
  • Tiered Discovery: Implements scanning for SKILL.md files in
    ~/.gemini/skills (User) and .gemini/skills (Project).
  • Resolution & Precedence: Establishes logic where project-tier skills
    override user-tier skills of the same name.
  • Feature Gate: Introduces the experimental.skills setting (default
    false) and the skills.disabled array for granular control. Renamed
    internal flag to skillsSupport for clarity.
  • Metadata Parsing: Supports the standard SKILL.md format using YAML
    frontmatter for skill name and description.
  • Linting & Quality: Uses debugLogger.debug for discovery tracing to
    ensure a clean UI unless explicit debug mode is enabled.

Related Issues

Part of #15327, Fixes #15686

How to Validate

  1. E2E Manual Verification:
    • Enable the experimental feature in your settings.json (accessible via
      /settings or by editing ~/.gemini/settings.json):
      {
        "experimental": {
          "skills": true
        }
      }
    • Create a dummy skill directory at .gemini/skills/text-expert/SKILL.md:
      ---
      name: test-expert
      description: A test skill for infrastructure validation.
      ---
      
      # Instructions
      
      You are a text expert.
    • Build the project locally: npm run build
    • Start the CLI with debug logging enabled: npm run start -- --debug (or
      use the VSCode "CLI (Interactive)" launch task with DEBUG=true).
    • Expectation: Upon startup, check the debug output (press F12 in
      interactive mode to open the debug drawer). You should see logs confirming
      the SkillManager activity:
      • Discovering skills in: /path/to/project/.gemini/skills
      • Found 1 potential skill files in ...
      • Discovered skill: test-expert at ...
image

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt

@NTaylorMullen NTaylorMullen requested review from a team as code owners December 30, 2025 00:13
@gemini-code-assist
Copy link
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 establishes the foundational infrastructure for Agent Skills in the Gemini CLI. It introduces a new SkillManager service responsible for discovering, parsing, and managing skills from both user and project directories, with a clear precedence hierarchy. The changes also include new configuration settings to enable the experimental feature and control individual skills, providing a robust and extensible framework for integrating specialized agent capabilities.

Highlights

  • Core Skill Infrastructure: Introduction of the SkillManager service, a foundational component for discovering, parsing, and managing the lifecycle of Agent Skills within the Gemini CLI.
  • Tiered Skill Discovery: Implementation of a discovery engine that scans for SKILL.md files in both user-level (~/.gemini/skills) and project-level (.gemini/skills) directories, with project-defined skills taking precedence over user-defined ones.
  • Configuration and Control: New configuration settings have been added: experimental.skills to enable or disable the entire Agent Skills feature, and skills.disabled to provide granular control over individual skills.
  • Metadata Parsing: Support for parsing SKILL.md files, extracting skill name and description from YAML frontmatter, adhering to the Agent Skills open standard.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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
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 the foundational infrastructure for Agent Skills, including a new "SkillManager" service for discovering and managing skills from "SKILL.md" files, supporting tiered discovery from user and project directories with necessary configuration gates. However, the implementation introduces a critical insecure deserialization vulnerability by using the unsafe "yaml.load()" function on user-controllable "SKILL.md" files, which could allow arbitrary code execution. Additionally, a refactoring of the "SkillManager" is suggested to improve maintainability and correctness by removing redundant logic.

@github-actions
Copy link

github-actions bot commented Dec 30, 2025

Size Change: +112 kB (+0.51%)

Total Size: 22.2 MB

Filename Size Change
./bundle/gemini.js 22.2 MB +112 kB (+0.51%)
ℹ️ 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

Copy link
Collaborator

@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.

Love it! Have a few questions, lmk what you think!

- Refactor SkillManager to handle tiered discovery internally for explicit precedence
- Cache full skill content (including body) during discovery to avoid redundant parsing
- Hide experimental skill settings from the dialog
- Use debugLogger.log instead of .error for discovery issues to keep CLI footer clean
- Centralize and unify frontmatter parsing logic

Part of #15327
Copy link
Collaborator

@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!

- Simplify skillsCommand structure and subcommand routing
- Add autocomplete for skill names in enable/disable subcommands
- Gate /skills command on experimental.skills setting
- Add snapshot tests for SkillsList component
- Refactor subcommand actions into helper functions
- Rename getSkillContent to getSkill and use it in skillsCommand

Part of #15698
Copy link
Collaborator

@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.

Looks great!

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 Core Skill Infrastructure & Tiered Discovery

2 participants