docs/cli/creating-skills.md
This guide provides an overview of how to create your own Agent Skills to extend the capabilities of Gemini CLI.
skill-creator skillThe recommended way to create a new skill is to use the built-in skill-creator
skill. To use it, ask Gemini CLI to create a new skill for you.
Example prompt:
"create a new skill called 'code-reviewer'"
Gemini CLI will then use the skill-creator to generate the skill:
my-new-skill/).SKILL.md file with the necessary YAML frontmatter (name and
description).scripts/, references/, and
assets/.If you prefer to create skills manually:
my-new-skill/).SKILL.md file inside the new directory.To add additional resources that support the skill, refer to the skill structure.
A skill is a directory containing a SKILL.md file at its root.
While a SKILL.md file is the only required component, we recommend the
following structure for organizing your skill's resources:
my-skill/
├── SKILL.md (Required) Instructions and metadata
├── scripts/ (Optional) Executable scripts
├── references/ (Optional) Static documentation
└── assets/ (Optional) Templates and other resources
SKILL.md fileThe SKILL.md file is the core of your skill. This file uses YAML frontmatter
for metadata and Markdown for instructions. For example:
---
name: code-reviewer
description:
Use this skill to review code. It supports both local changes and remote Pull
Requests.
---
# Code Reviewer
This skill guides the agent in conducting thorough code reviews.
## Workflow
### 1. Determine Review Target
- **Remote PR**: If the user gives a PR number or URL, target that remote PR.
- **Local Changes**: If changes are local... ...
name: A unique identifier for the skill. This should match the directory
name.description: A description of what the skill does and when Gemini should
use it.