2026-01-06 16:59:56 -08:00
|
|
|
# Agent Skills
|
|
|
|
|
|
|
|
|
|
Agent Skills allow you to extend Gemini CLI with specialized expertise,
|
|
|
|
|
procedural workflows, and task-specific resources. Based on the
|
|
|
|
|
[Agent Skills](https://agentskills.io) open standard, a "skill" is a
|
|
|
|
|
self-contained directory that packages instructions and assets into a
|
|
|
|
|
discoverable capability.
|
|
|
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
|
|
|
|
|
Unlike general context files ([`GEMINI.md`](./gemini-md.md)), which provide
|
2026-01-14 13:05:26 -08:00
|
|
|
persistent workspace-wide background, Skills represent **on-demand expertise**.
|
2026-01-06 16:59:56 -08:00
|
|
|
This allows Gemini to maintain a vast library of specialized capabilities—such
|
|
|
|
|
as security auditing, cloud deployments, or codebase migrations—without
|
|
|
|
|
cluttering the model's immediate context window.
|
|
|
|
|
|
|
|
|
|
Gemini autonomously decides when to employ a skill based on your request and the
|
|
|
|
|
skill's description. When a relevant skill is identified, the model "pulls in"
|
|
|
|
|
the full instructions and resources required to complete the task using the
|
|
|
|
|
`activate_skill` tool.
|
|
|
|
|
|
|
|
|
|
## Key Benefits
|
|
|
|
|
|
|
|
|
|
- **Shared Expertise:** Package complex workflows (like a specific team's PR
|
|
|
|
|
review process) into a folder that anyone can use.
|
|
|
|
|
- **Repeatable Workflows:** Ensure complex multi-step tasks are performed
|
|
|
|
|
consistently by providing a procedural framework.
|
|
|
|
|
- **Resource Bundling:** Include scripts, templates, or example data alongside
|
|
|
|
|
instructions so the agent has everything it needs.
|
|
|
|
|
- **Progressive Disclosure:** Only skill metadata (name and description) is
|
|
|
|
|
loaded initially. Detailed instructions and resources are only disclosed when
|
|
|
|
|
the model explicitly activates the skill, saving context tokens.
|
|
|
|
|
|
|
|
|
|
## Skill Discovery Tiers
|
|
|
|
|
|
|
|
|
|
Gemini CLI discovers skills from three primary locations:
|
|
|
|
|
|
2026-01-14 13:05:26 -08:00
|
|
|
1. **Workspace Skills** (`.gemini/skills/`): Workspace-specific skills that are
|
2026-01-06 16:59:56 -08:00
|
|
|
typically committed to version control and shared with the team.
|
|
|
|
|
2. **User Skills** (`~/.gemini/skills/`): Personal skills available across all
|
2026-01-14 13:05:26 -08:00
|
|
|
your workspaces.
|
2026-01-06 16:59:56 -08:00
|
|
|
3. **Extension Skills**: Skills bundled within installed
|
|
|
|
|
[extensions](../extensions/index.md).
|
|
|
|
|
|
|
|
|
|
**Precedence:** If multiple skills share the same name, higher-precedence
|
2026-01-14 13:05:26 -08:00
|
|
|
locations override lower ones: **Workspace > User > Extension**.
|
2026-01-06 16:59:56 -08:00
|
|
|
|
|
|
|
|
## Managing Skills
|
|
|
|
|
|
|
|
|
|
### In an Interactive Session
|
|
|
|
|
|
|
|
|
|
Use the `/skills` slash command to view and manage available expertise:
|
|
|
|
|
|
|
|
|
|
- `/skills list` (default): Shows all discovered skills and their status.
|
|
|
|
|
- `/skills disable <name>`: Prevents a specific skill from being used.
|
|
|
|
|
- `/skills enable <name>`: Re-enables a disabled skill.
|
|
|
|
|
- `/skills reload`: Refreshes the list of discovered skills from all tiers.
|
|
|
|
|
|
|
|
|
|
_Note: `/skills disable` and `/skills enable` default to the `user` scope. Use
|
2026-01-14 13:05:26 -08:00
|
|
|
`--scope workspace` to manage workspace-specific settings._
|
2026-01-06 16:59:56 -08:00
|
|
|
|
|
|
|
|
### From the Terminal
|
|
|
|
|
|
|
|
|
|
The `gemini skills` command provides management utilities:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# List all discovered skills
|
|
|
|
|
gemini skills list
|
|
|
|
|
|
2026-01-12 15:24:41 -08:00
|
|
|
# Install a skill from a Git repository, local directory, or zipped skill file (.skill)
|
|
|
|
|
# Uses the user scope by default (~/.gemini/skills)
|
|
|
|
|
gemini skills install https://github.com/user/repo.git
|
|
|
|
|
gemini skills install /path/to/local/skill
|
|
|
|
|
gemini skills install /path/to/local/my-expertise.skill
|
|
|
|
|
|
|
|
|
|
# Install a specific skill from a monorepo or subdirectory using --path
|
|
|
|
|
gemini skills install https://github.com/my-org/my-skills.git --path skills/frontend-design
|
|
|
|
|
|
|
|
|
|
# Install to the workspace scope (.gemini/skills)
|
|
|
|
|
gemini skills install /path/to/skill --scope workspace
|
|
|
|
|
|
|
|
|
|
# Uninstall a skill by name
|
|
|
|
|
gemini skills uninstall my-expertise --scope workspace
|
|
|
|
|
|
|
|
|
|
# Enable a skill (globally)
|
2026-01-06 16:59:56 -08:00
|
|
|
gemini skills enable my-expertise
|
2026-01-12 15:24:41 -08:00
|
|
|
|
2026-01-14 13:05:26 -08:00
|
|
|
# Disable a skill. Can use --scope to specify workspace or user (defaults to workspace)
|
|
|
|
|
gemini skills disable my-expertise --scope workspace
|
2026-01-06 16:59:56 -08:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## How it Works (Security & Privacy)
|
|
|
|
|
|
|
|
|
|
1. **Discovery**: At the start of a session, Gemini CLI scans the discovery
|
|
|
|
|
tiers and injects the name and description of all enabled skills into the
|
|
|
|
|
system prompt.
|
|
|
|
|
2. **Activation**: When Gemini identifies a task matching a skill's
|
|
|
|
|
description, it calls the `activate_skill` tool.
|
|
|
|
|
3. **Consent**: You will see a confirmation prompt in the UI detailing the
|
|
|
|
|
skill's name, purpose, and the directory path it will gain access to.
|
|
|
|
|
4. **Injection**: Upon your approval:
|
|
|
|
|
- The `SKILL.md` body and folder structure is added to the conversation
|
|
|
|
|
history.
|
|
|
|
|
- The skill's directory is added to the agent's allowed file paths, granting
|
|
|
|
|
it permission to read any bundled assets.
|
|
|
|
|
5. **Execution**: The model proceeds with the specialized expertise active. It
|
|
|
|
|
is instructed to prioritize the skill's procedural guidance within reason.
|
2026-01-29 15:52:06 -08:00
|
|
|
|
|
|
|
|
## Creating your own skills
|
|
|
|
|
|
2026-01-30 13:27:25 -05:00
|
|
|
To create your own skills, see the [Create Agent Skills](./creating-skills.md)
|
|
|
|
|
guide.
|