Agent-skills Gemini CLI install guide
This guide covers installing Addy Osmani's agent-skills in Gemini CLI, which auto-discovers SKILL.md files in .gemini/skills or .agents/skills and activates each skill on demand. It is for developers using Gemini CLI who want the same engineering skills that are available in Codex.
What it does
The recommended path is gemini skills install with the repo URL and --path skills, or a local clone path, with --scope workspace to limit it to one project. User-level skills go to ~/.gemini/skills. Gemini asks permission before it loads a matching skill's full instructions.
How to use it
Install, then check with /skills list.
Requirements and limits
Skills you want loaded all the time go in GEMINI.md as persistent project context instead, which is the guide's second option.
More in Guides and the Codex library.
Full text
Using agent-skills with Gemini CLI
Setup
Option 1: Install as Skills (Recommended)
Gemini CLI has a native skills system that auto-discovers SKILL.md files in .gemini/skills/ or .agents/skills/ directories. Each skill activates on demand when it matches your task.
Install from the repo:
gemini skills install https://github.com/addyosmani/agent-skills.git --path skillsOr install from a local clone:
git clone https://github.com/addyosmani/agent-skills.git
gemini skills install /path/to/agent-skills/skills/Install for a specific workspace only:
gemini skills install /path/to/agent-skills/skills/ --scope workspaceSkills installed at workspace scope go into .gemini/skills/ (or .agents/skills/). User-level skills go into ~/.gemini/skills/.
Once installed, verify with:
/skills listGemini CLI injects skill names and descriptions into the prompt automatically. When it recognizes a matching task, it asks permission to activate the skill before loading its full instructions.
Option 2: GEMINI.md (Persistent Context)
For skills you want always loaded as persistent project context (rather than on-demand activation), add them to your project's GEMINI.md:
# Create GEMINI.md with core skills as persistent context
cat /path/to/agent-skills/skills/incremental-implementation/SKILL.md > GEMINI.md
echo -e "\n---\n" >> GEMINI.md
cat /path/to/agent-skills/skills/code-review-and-quality/SKILL.md >> GEMINI.mdYou can also modularize by importing from separate files:
# Project Instructions
@skills/test-driven-development/SKILL.md
@skills/incremental-implementation/SKILL.mdUse /memory show to verify loaded context, and /memory reload to refresh after changes.
Skills vs GEMINI.md: Skills are on-demand expertise that activate only when relevant, keeping your context window clean. GEMINI.md provides persistent context loaded for every prompt. Use skills for phase-specific workflows and GEMINI.md for always-on project conventions.
Recommended Configuration
Always-On (GEMINI.md)
Add these as persistent context for every session:
incremental-implementation— Build in small verifiable slicescode-review-and-quality— Five-axis review
On-Demand (Skills)
Install these as skills so they activate only when relevant:
test-driven-development— Activates when implementing logic or fixing bugsspec-driven-development— Activates when starting a new project or featurefrontend-ui-engineering— Activates when building UIsecurity-and-hardening— Activates during security reviewsperformance-optimization— Activates during performance work
Advanced Configuration
MCP Integration
Many skills in this pack leverage Model Context Protocol (MCP) tools to interact with the environment. For example:
browser-testing-with-devtoolsuses thechrome-devtoolsMCP extension.performance-optimizationcan benefit from performance-related MCP tools.
To enable these, configure the relevant MCP servers under mcpServers in your Gemini CLI settings (~/.gemini/settings.json, or .gemini/settings.json in a project).
Session Hooks
Gemini CLI supports session lifecycle hooks. You can use these to automatically inject context or run validation scripts at the start of a session.
To replicate the agent-skills experience from other tools, you can configure a SessionStart hook that reminds you of the available skills or loads a meta-skill. hooks/session-start.sh in this repo is a ready-made script for that: it prints the using-agent-skills meta-skill as a standard SessionStart JSON envelope on stdout.
Explicit Context Loading
You can explicitly load any skill into your current session by referencing it with the @ symbol in your prompt:
Use the @skills/test-driven-development/SKILL.md skill to implement this fix.This is useful when you want to ensure a specific workflow is followed without waiting for auto-discovery.
Slash Commands
The repo ships 9 slash commands under .gemini/commands/: 8 lifecycle commands plus the /webperf specialist audit. Gemini CLI auto-discovers them when you run from the project root.
| Command | What it does |
|---|---|
/spec | Write a structured spec before writing code |
/constraints | Define and enforce the project's quality bar |
/planning | Break work into small, verifiable tasks |
/build | Implement the next task incrementally |
/test | Run TDD workflow — red, green, refactor |
/review | Five-axis code review |
/code-simplify | Reduce complexity without changing behavior |
/ship | Pre-launch checklist via parallel persona fan-out |
/webperf | Audit browser-facing apps for Core Web Vitals and performance issues |
Each command invokes the corresponding skill automatically — no manual skill loading required.
Note: Use/planninginstead of/plan—/planconflicts with a Gemini CLI internal command name.
Usage Tips
- Prefer skills over GEMINI.md — Skills activate on demand and keep your context window focused. Only put skills in GEMINI.md if you want them always loaded.
- Skill descriptions matter — Each SKILL.md has a
descriptionfield in its frontmatter that tells agents when to activate it. The descriptions in this repo are optimized for auto-discovery across all supported tools (Claude Code, Gemini CLI, etc.) by clearly stating both what the skill does and when it should be triggered. - Use agents for review — Copy
agents/code-reviewer.mdcontent when requesting structured code reviews. - Combine with references — Reference checklists from
references/when working on specific quality areas like testing or performance.
Source and license
Source: https://github.com/addyosmani/agent-skills/blob/main/docs/gemini-cli-setup.md
Author: addyosmani, Addy Osmani agent skills. License: MIT.
Shown here with formatting for the web. Keep the author and license notice when you reuse it.
Related entries
There are more like this in the members library
The Codex library holds 7,009 entries. Members can search all of them by meaning and read every one in full.