Agent Skills
Agent Skills allow you to extend Gemini CLI with specialized expertise, procedural workflows, and task-specific resources. Based on the Agent Skills open standard, a âskillâ is a self-contained directory that packages instructions and assets into a discoverable capability.
Overview
Section titled âOverviewâUnlike general context files (GEMINI.md), which provide
persistent workspace-wide background, Skills represent on-demand expertise.
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
Section titled â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
Section titled âSkill Discovery TiersâGemini CLI discovers skills from three primary locations:
- Workspace Skills: Located in
.gemini/skills/or the.agents/skills/alias. Workspace skills are typically committed to version control and shared with the team. - User Skills: Located in
~/.gemini/skills/or the~/.agents/skills/alias. These are personal skills available across all your workspaces. - Extension Skills: Skills bundled within installed extensions.
Precedence: If multiple skills share the same name, higher-precedence locations override lower ones: Workspace > User > Extension.
Within the same tier (user or workspace), the .agents/skills/ alias takes
precedence over the .gemini/skills/ directory. This generic alias provides an
intuitive path for managing agent-specific expertise that remains compatible
across different AI agent tools.
Managing Skills
Section titled âManaging SkillsâIn an Interactive Session
Section titled â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 link <path>: Links agent skills from a local directory via symlink./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
--scope workspace to manage workspace-specific settings.
From the Terminal
Section titled âFrom the TerminalâThe gemini skills command provides management utilities:
# List all discovered skillsgemini skills list
# Link agent skills from a local directory via symlink# Discovers skills (SKILL.md or */SKILL.md) and creates symlinks in ~/.gemini/skills# (or ~/.agents/skills)gemini skills link /path/to/my-skills-repo
# Link to the workspace scope (.gemini/skills or .agents/skills)gemini skills link /path/to/my-skills-repo --scope workspace
# Install a skill from a Git repository, local directory, or zipped skill file (.skill)# Uses the user scope by default (~/.gemini/skills or ~/.agents/skills)gemini skills install https://github.com/user/repo.gitgemini skills install /path/to/local/skillgemini skills install /path/to/local/my-expertise.skill
# Install a specific skill from a monorepo or subdirectory using --pathgemini skills install https://github.com/my-org/my-skills.git --path skills/frontend-design
# Install to the workspace scope (.gemini/skills or .agents/skills)gemini skills install /path/to/skill --scope workspace
# Uninstall a skill by namegemini skills uninstall my-expertise --scope workspace
# Enable a skill (globally)gemini skills enable my-expertise
# Disable a skill. Can use --scope to specify workspace or user (defaults to workspace)gemini skills disable my-expertise --scope workspaceHow it Works
Section titled âHow it Worksâ- 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.
- Activation: When Gemini identifies a task matching a skillâs
description, it calls the
activate_skilltool. - 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.
- Injection: Upon your approval:
- The
SKILL.mdbody 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.
- The
- Execution: The model proceeds with the specialized expertise active. It is instructed to prioritize the skillâs procedural guidance within reason.
Skill activation
Section titled âSkill activationâOnce a skill is activated (typically by Gemini identifying a task that matches the skillâs description and your approval), its specialized instructions and resources are loaded into the agentâs context. A skill remains active and its guidance is prioritized for the duration of the session.
Creating your own skills
Section titled âCreating your own skillsâTo create your own skills, see the Create Agent Skills guide.