Skip to content

feat(sdk): implement support for custom skills#19031

Merged
mbleigh merged 4 commits intomainfrom
sdk-04-custom-skills
Feb 14, 2026
Merged

feat(sdk): implement support for custom skills#19031
mbleigh merged 4 commits intomainfrom
sdk-04-custom-skills

Conversation

@mbleigh
Copy link
Contributor

@mbleigh mbleigh commented Feb 13, 2026

Summary

This PR implements support for custom skills in the SDK, allowing developers to load and register skills from the filesystem using skillDir and skillRoot helpers.

Details

  • Added skillDir and skillRoot helpers in packages/sdk/src/skills.ts for referencing filesystem skills.
  • Implemented skill loading and registration logic in GeminiCliAgent (packages/sdk/src/agent.ts).
  • Added addSkills method to SkillManager in packages/core to support programmatic skill addition.
  • Updated SDK_DESIGN.md to reflect the implementation status of Custom Skills.
  • Added integration tests in packages/sdk/src/skills.integration.test.ts to verify skill activation from both single directory and root directory sources.

Related Issues

How to Validate

Run the SDK integration tests:

npm test -w packages/sdk -- skills.integration.test.ts

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
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

- added skillDir and skillRoot helpers for referencing filesystem skills
- implemented skill loading and registration in GeminiCliAgent
- added addSkills to SkillManager in core to support programmatic skill addition
- updated SDK integration tests to verify skill activation
- marked custom skills as implemented in SDK_DESIGN.md
@mbleigh mbleigh requested a review from a team as a code owner February 13, 2026 21:20
@gemini-cli
Copy link
Contributor

gemini-cli bot commented Feb 13, 2026

Hi @mbleigh, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this.

We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines.

Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed.

Thank you for your understanding and for being a part of our community!

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @mbleigh, 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 SDK by introducing a robust mechanism for custom skills. It allows developers to easily extend the agent's capabilities by defining and loading skills directly from the filesystem, using either individual skill directories or root directories containing multiple skills. This change empowers users to tailor the agent's behavior and integrate custom functionalities seamlessly, making the SDK more flexible and adaptable to diverse use cases.

Highlights

  • Custom Skills Support: Implemented support for custom skills in the SDK, allowing developers to load and register skills from the filesystem.
  • Filesystem Skill Helpers: Introduced skillDir and skillRoot helpers in packages/sdk/src/skills.ts for referencing filesystem-based skills.
  • Agent Integration: Enhanced GeminiCliAgent to include logic for loading and registering these custom skills during initialization.
  • Skill Manager API: Added a public addSkills method to SkillManager in packages/core to support programmatic skill addition.
  • Documentation Update: Updated SDK_DESIGN.md to reflect the implementation status and usage of Custom Skills.
  • Integration Tests: Included integration tests to verify skill activation from both single directory and root directory sources.
Changelog
  • packages/core/src/index.ts
    • Exported activate-skill.js to make the ActivateSkillTool available.
  • packages/core/src/skills/skillManager.ts
    • Added a public addSkills method to programmatically add new skill definitions to the manager.
  • packages/sdk/SDK_DESIGN.md
    • Updated the status of "Custom Skills" from "Not Implemented" to "Implemented".
    • Provided new examples for skillDir and skillRoot usage.
    • Adjusted the feature numbering, moving "Custom Hooks Support" to Feature 3.
  • packages/sdk/src/agent.ts
    • Imported necessary types (SkillDefinition, SkillReference) and functions (loadSkillsFromDir, ActivateSkillTool) for skill management.
    • Added a skills option to GeminiCliAgentOptions to accept an array of SkillReference.
    • Stored skill references in a new private skillRefs property.
    • Enabled skillsSupport and adminSkillsEnabled in the agent's configuration.
    • Implemented logic within the initialize method to load skills from the provided skillRefs and add them to the SkillManager.
    • Ensured the ActivateSkillTool is re-registered if skills are loaded, to update its schema with newly available skills.
  • packages/sdk/src/index.ts
    • Exported skills.js to expose skillDir and skillRoot helpers.
  • packages/sdk/src/skills.integration.test.ts
    • Added new integration tests to verify the loading and activation of skills using skillDir and skillRoot.
    • Included tests for both single skill directory and skill root directory scenarios.
  • packages/sdk/src/skills.ts
    • Defined the SkillReference type for specifying skill locations.
    • Created skillDir and skillRoot helper functions for constructing SkillReference objects.
  • packages/sdk/test-data/skill-dir-success.json
    • Added golden test data for successful skill activation from a single directory.
  • packages/sdk/test-data/skill-root-success.json
    • Added golden test data for successful skill activation from a root directory.
  • packages/sdk/test-data/skills/pirate-skill/SKILL.md
    • Added a sample Markdown file defining a "pirate-skill" for testing purposes.
Activity
  • The author has updated relevant documentation and added/updated tests.
  • The changes have been validated on MacOS using npm run.
  • Instructions for validating the changes by running SDK integration tests have been provided.
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.

@github-actions
Copy link

github-actions bot commented Feb 13, 2026

Size Change: +225 B (0%)

Total Size: 24.4 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 24.4 MB +225 B (0%)
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B

compressed-size-action

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 implements support for custom skills in the SDK, introducing skillDir and skillRoot helpers for loading skills from the filesystem and integrating them into the GeminiCliAgent. Consider improving skill loading performance by parallelizing file system operations to optimize SDK initialization time.

@gemini-cli gemini-cli bot added the priority/p1 Important and should be addressed in the near term. label Feb 13, 2026
@mbleigh mbleigh enabled auto-merge February 14, 2026 01:38
@mbleigh mbleigh added this pull request to the merge queue Feb 14, 2026
Merged via the queue into main with commit a129dbc Feb 14, 2026
27 checks passed
@mbleigh mbleigh deleted the sdk-04-custom-skills branch February 14, 2026 02:16
kuishou68 pushed a commit to iOfficeAI/aioncli that referenced this pull request Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p1 Important and should be addressed in the near term.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants