Single source of truth and librarian for ALL Gemini CLI documentation. Manages local documentation storage, scraping, discovery, and resolution. Use when finding, locating, searching, or resolving Gemini CLI documentation; discovering docs by keywords, category, tags, or natural language queries; scraping from llms.txt; managing index metadata (keywords, tags, aliases); or rebuilding index from filesystem. Run scripts to scrape, find, and resolve documentation. Handles doc_id resolution, keyword search, natural language queries, category/tag filtering, alias resolution, llms.txt parsing, markdown subsection extraction for internal use, hash-based drift detection, and comprehensive index maintenance.
Limited to specific tools
Additional assets for this skill
This skill is limited to using the following tools:
canonical/docs-cloud-google-com/gemini/docs/codeassist/overview.mdcanonical/geminicli-com/docs.mdcanonical/geminicli-com/docs/architecture.mdcanonical/geminicli-com/docs/changelogs.mdcanonical/geminicli-com/docs/changelogs/latest.mdcanonical/geminicli-com/docs/changelogs/preview.mdcanonical/geminicli-com/docs/changelogs/releases.mdcanonical/geminicli-com/docs/cli.mdcanonical/geminicli-com/docs/cli/authentication.mdcanonical/geminicli-com/docs/cli/checkpointing.mdcanonical/geminicli-com/docs/cli/commands.mdcanonical/geminicli-com/docs/cli/configuration.mdcanonical/geminicli-com/docs/cli/custom-commands.mdcanonical/geminicli-com/docs/cli/enterprise.mdcanonical/geminicli-com/docs/cli/gemini-ignore.mdcanonical/geminicli-com/docs/cli/gemini-md.mdcanonical/geminicli-com/docs/cli/generation-settings.mdcanonical/geminicli-com/docs/cli/headless.mdcanonical/geminicli-com/docs/cli/keyboard-shortcuts.mdcanonical/geminicli-com/docs/cli/model-routing.mdABSOLUTE PROHIBITION: NEVER use cd with && in PowerShell when running scripts from this skill.
The Problem: If your current working directory is already inside the skill directory, using relative paths causes PowerShell to resolve paths relative to the current directory instead of the repository root, resulting in path doubling.
REQUIRED Solutions (choose one):
cd with &&)NEVER DO THIS:
cd with &&: cd <relative-path> && python <script> causes path doublingThe file exceeds context limits and will cause issues. You MUST use scripts.
REQUIRED: ALWAYS use manage_index.py scripts for ANY index.yaml access:
python scripts/management/manage_index.py count
python scripts/management/manage_index.py list
python scripts/management/manage_index.py get <doc_id>
python scripts/management/manage_index.py verify
All scripts automatically handle large files via index_manager.py.
This skill provides three slash commands for common workflows:
/google-ecosystem:scrape-docs - Scrape Gemini CLI documentation from geminicli.com, then refresh index and validate/google-ecosystem:refresh-docs - Refresh the local index and metadata without scraping from remote sources/google-ecosystem:validate-docs - Validate the index and references for consistency and drift without scrapingThis skill provides automation tooling for Gemini CLI documentation management. It manages:
Core value: Prevents link rot, enables offline access, optimizes token costs, automates maintenance, and provides resilient doc_id-based references.
This skill should be used when:
CRITICAL: This section defines HOW to execute operations in this skill.
For ALL scraping, validation, and index operations, delegate execution to a general-purpose Task agent.
How to invoke:
Use the Task tool with:
subagent_type: "general-purpose"description: Short 3-5 word descriptionprompt: Full task description with execution instructionsScripts run in FOREGROUND by default. Do NOT background them.
When Task agents execute scripts:
python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/core/scrape_docs.py --llms-txt https://geminicli.com/llms.txtrun_in_background=true: Scripts are designed for foreground execution&, no nohup, no background process managementRed flags indicating incorrect execution:
run_in_background=true in Bash toolps or pgrep&, nohup, jobs)If you recognize these patterns, STOP and correct immediately.
CRITICAL: Report ALL errors, warnings, and issues - never suppress or ignore them.
When executing scripts via Task agents:
Red flags that indicate issues:
Use this when you want to rebuild and validate the local index/metadata without scraping:
Use Python 3.13 for validation - spaCy/Pydantic have compatibility issues with Python 3.14+
# Use Python 3.13 for full compatibility with spaCy
py -3.13 plugins/google-ecosystem/skills/gemini-cli-docs/scripts/management/manage_index.py refresh
Use this when the user explicitly wants to hit the network and scrape docs:
# Scrape from llms.txt
python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/core/scrape_docs.py \
--llms-txt https://geminicli.com/llms.txt
# Refresh index after scraping (use Python 3.13)
py -3.13 plugins/google-ecosystem/skills/gemini-cli-docs/scripts/management/manage_index.py refresh
With options:
# Skip existing files (incremental update)
python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/core/scrape_docs.py \
--llms-txt https://geminicli.com/llms.txt \
--skip-existing
# Filter to specific section
python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/core/scrape_docs.py \
--llms-txt https://geminicli.com/llms.txt \
--filter "/docs/"
# Resolve doc_id to file path
python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/core/find_docs.py resolve <doc_id>
# Search by keywords (default: 25 results)
python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/core/find_docs.py search checkpointing session
# Search with custom limit
python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/core/find_docs.py --limit 10 search tools
# Natural language search
python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/core/find_docs.py query "how to use checkpointing"
# List by category
python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/core/find_docs.py category docs
# List by tag
python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/core/find_docs.py tag cli
Search Options:
| Option | Default | Description |
|---|---|---|
--limit N | 25 | Maximum number of results to return |
--no-limit | - | Return all matching results (no limit) |
--min-score N | - | Only return results with relevance score >= N |
--fast | - | Index-only search (skip content grep) |
--json | - | Output results as JSON |
--verbose | - | Show relevance scores |
The gemini-cli-docs skill uses a unified configuration system with a single source of truth.
Configuration Files:
config/defaults.yaml - Central configuration file with all default valuesconfig/config_registry.py - Canonical configuration system with environment variable supportconfig/filtering.yaml - Content filtering rulesconfig/tag_detection.yaml - Tag detection patternsreferences/sources.json - Documentation sources configurationEnvironment Variable Overrides:
All configuration values can be overridden using environment variables: GEMINI_DOCS_<SECTION>_<KEY>
Full details: references/configuration.md
Required: pyyaml, requests, beautifulsoup4, markdownify, filelock
Optional (recommended): spacy with en_core_web_sm model (for keyword extraction)
Check dependencies:
python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/setup/check_dependencies.py
Python Version: Python 3.13 recommended (required for spaCy operations)
Full details: references/dependencies.md
Fetch documentation from geminicli.com using llms.txt format. Features: llms.txt parsing, HTML to Markdown conversion, automatic metadata tracking, URL-based folder organization.
Guide: references/capabilities/scraping-guide.md
Extract specific markdown sections for token-optimized responses. Features: ATX-style heading structure parsing, section boundaries detection, provenance frontmatter, token economics (60-90% savings typical).
Guide: references/capabilities/extraction-guide.md
Detect documentation drift via 404 checking and hash comparison. Features: 404 URL detection, missing file detection, content hash comparison, orphaned file detection, cleanup automation.
Guide: references/capabilities/change-detection-guide.md
Discover and resolve documentation references using doc_id, keywords, or natural language queries. Features: doc_id resolution, keyword-based search, natural language query processing, category and tag filtering.
Guide: references/capabilities/discovery-guide.md
Maintain index metadata, keywords, tags, and rebuild index from filesystem.
Guide: references/capabilities/index-management-guide.md
Common maintenance and operational workflows:
Detailed Workflows: references/workflows.md
Quick validation:
py -3.13 plugins/google-ecosystem/skills/gemini-cli-docs/scripts/validation/quick_validate.py
Search audit:
py -3.13 plugins/google-ecosystem/skills/gemini-cli-docs/scripts/validation/run_search_audit.py
py -3.13 plugins/google-ecosystem/skills/gemini-cli-docs/scripts/validation/analyze_search_audit.py
Tag configuration audit:
py -3.13 plugins/google-ecosystem/skills/gemini-cli-docs/scripts/validation/audit_tag_config.py
MUST use PowerShell (recommended) or prefix Git Bash commands with MSYS_NO_PATHCONV=1
Git Bash on Windows converts Unix paths to Windows paths, breaking filter patterns.
Example:
MSYS_NO_PATHCONV=1 python scripts/core/scrape_docs.py \
--llms-txt https://geminicli.com/llms.txt \
--filter "/docs/"
See: references/troubleshooting.md#git-bash-path-conversion
Problem: spaCy installation fails with Python 3.14+.
Solution: Use Python 3.13:
py -3.13 -m pip install spacy
py -3.13 -m spacy download en_core_web_sm
Status: FIXED - Scripts auto-detect Windows and configure UTF-8 encoding.
Status: EXPECTED - Some llms.txt entries may reference docs that don't exist yet. Scripts handle gracefully and continue.
Full troubleshooting: references/troubleshooting.md
The gemini-cli-docs skill provides a clean public API for external tools:
from gemini_docs_api import (
find_document,
resolve_doc_id,
get_docs_by_tag,
get_docs_by_category,
search_by_keywords,
get_document_section,
detect_drift,
cleanup_drift,
refresh_index
)
# Natural language search
docs = find_document("model routing configuration")
# Resolve doc_id to metadata
doc = resolve_doc_id("geminicli-com-docs-checkpointing")
# Get docs by tag
cli_docs = get_docs_by_tag("cli")
# Extract specific section
section = get_document_section("geminicli-com-docs-commands", "Built-in Commands")
# Detect drift
drift = detect_drift(check_404s=True, check_hashes=True)
# Cleanup drift (dry run first)
result = cleanup_drift(clean_404s=True, dry_run=True)
# Refresh index with drift detection
result = refresh_index(check_drift=True, cleanup_drift=False)
For plugin-specific maintenance workflows:
See: references/plugin-maintenance.md
Quick reference:
manage_index.py verify and test search before pushingWhen developing this plugin locally, you may want changes to go to your dev repo instead of the installed plugin location.
PowerShell:
$env:GEMINI_DOCS_DEV_ROOT = "D:\repos\gh\melodic\claude-code-plugins"
Bash/Zsh:
export GEMINI_DOCS_DEV_ROOT="/path/to/claude-code-plugins"
When you run any major script (scrape, refresh, rebuild), a mode banner will display:
Dev mode:
[DEV MODE] Using local plugin: D:\repos\gh\melodic\claude-code-plugins
Prod mode:
[PROD MODE] Using installed skill directory
PowerShell:
Remove-Item Env:GEMINI_DOCS_DEV_ROOT
Bash/Zsh:
unset GEMINI_DOCS_DEV_ROOT
| Category | Topics |
|---|---|
| Get Started | installation, authentication, configuration, quickstart |
| CLI | commands, settings, themes, checkpointing, telemetry, trusted folders |
| Core | architecture, tools API, policy engine, memport |
| Tools | file system, shell, web fetch, web search, memory tool, MCP servers |
| Extensions | creating, managing, releasing extensions |
| IDE | VS Code, JetBrains, IDE companion |
Key features documented:
gemini-cli-docs/
SKILL.md # This file (public)
gemini_docs_api.py # Public API
canonical/ # Documentation storage (private)
geminicli-com/ # Scraped from geminicli.com
index.yaml # Metadata index
index.json # JSON mirror
scripts/ # Implementation (private)
core/ # Scraping, discovery
management/ # Index management
maintenance/ # Cleanup, drift detection
validation/ # Validation scripts
utils/ # Shared utilities
setup/ # Setup scripts
config/ # Configuration
defaults.yaml # Default settings
filtering.yaml # Content filtering
tag_detection.yaml # Tag patterns
references/ # Technical documentation (public)
technical-details.md
workflows.md
troubleshooting.md
plugin-maintenance.md
configuration.md
dependencies.md
capabilities/
scraping-guide.md
extraction-guide.md
change-detection-guide.md
discovery-guide.md
index-management-guide.md
.cache/ # Cache storage (inverted index)
logs/ # Log files
Documentation is scraped from: https://geminicli.com/llms.txt
Query: "Search for checkpointing documentation" Expected Behavior:
Query: "How do I configure model routing in Gemini CLI?" Expected Behavior:
Query: "Resolve geminicli-com-docs-checkpointing" Expected Behavior:
Query: "Check for stale documentation" Expected Behavior:
Query: "Get the 'Built-in Commands' section from the commands doc" Expected Behavior:
Date: 2025-12-05 Model: claude-opus-4-5-20251101
Status: Production-ready with full feature parity to docs-management skill.