Installation Guide

Gemini CLI Tutorial: Installation, Setup & MCP Integration Guide

Complete Gemini CLI tutorial with step-by-step installation, GEMINI.md configuration, and MCP server integration for AI-powered terminal workflows.

Updated 2026-01-264 min read
Full guide

Follow the sections in order, then adapt commands to your current environment.

Gemini CLI supports Agent Skills with a three-tier discovery system and native integration with Google's AI models.

Installation Paths

User Skills

Terminal
~/.gemini/skills/
  • Personal skills available in any directory
  • Managed at the user level

Workspace Skills

Terminal
.gemini/skills/
  • Highest precedence
  • Shared with team members via version control
  • Project-specific expertise

Extension Skills

Terminal
[extension-path]/skills/
  • Bundled with Gemini CLI extensions
  • Referenced as extension:skill-name

Installation Methods

Method 1: Manual Installation (Recommended)

For User Skills:

bash
# Create the user skills directory
mkdir -p ~/.gemini/skills/my-skill

# Create the SKILL.md file
cat > ~/.gemini/skills/my-skill/SKILL.md << 'EOF'
---
name: my-skill
description: A brief description for Gemini to understand when to use this skill
---

# My Skill

Detailed instructions for Gemini when using this skill.

## When to Use
- Use this skill when...
- This skill is helpful for...

## Instructions
- Step-by-step guidance for Gemini
- Domain-specific conventions
- Best practices and patterns
EOF

For Workspace Skills:

bash
# Create the workspace skills directory
mkdir -p .gemini/skills/my-skill

# Create the SKILL.md file
cat > .gemini/skills/my-skill/SKILL.md << 'EOF'
---
name: project-skill
description: Specialized instructions for this repository
---
# Workspace Specific Skill
Detailed instructions for this specific workspace...
EOF

Method 2: Extension Manager

bash
# Install a Gemini extension that contains skills
gemini extension install user/repo

# List available skills from extensions
gemini skills list

Method 3: Using Universal Installer

bash
# Install OpenSkills for universal access
npx openskills install anthropics/skills
npx openskills sync --target ~/.gemini/skills

Skill Discovery & Precedence

Gemini CLI searches for skills in the following order:

  1. .gemini/skills/ (Current Workspace)
  2. ~/.gemini/skills/ (User Home)
  3. Installed extensions (extension:skill)

Performance Optimization

Gemini uses Progressive Loading:

  • Only the name and description are loaded initially to save tokens
  • The full content of SKILL.md is only loaded when Gemini determines the skill is relevant to your request

Using Skills in Gemini CLI

Activation

Gemini automatically activates skills when your request matches the skill's description.

Explicit Invocation

You can emphasize a skill by mentioning it at the start of your prompt:

bash
gemini "Using my-skill, help me optimize this function..."

List Available Skills

bash
gemini /skills
We value your privacy

We use cookies to analyze site usage and improve your experience.

Learn more about our cookies

Essential cookies are always active