gemini-cli-docs
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.
What this skill does
# Gemini CLI Documentation Skill ## CRITICAL: Path Doubling Prevention - MANDATORY **ABSOLUTE 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):** 1. **ALWAYS use absolute paths** (recommended) 2. **Use separate commands** (never `cd` with `&&`) 3. **Run from repository root** with relative paths **NEVER DO THIS:** - Chain `cd` with `&&`: `cd <relative-path> && python <script>` causes path doubling - Assume current directory - Use relative paths when current dir is inside skill directory ## CRITICAL: Large File Handling - MANDATORY SCRIPT USAGE ### ABSOLUTE PROHIBITION: NEVER use read_file tool on the index.yaml file The file exceeds context limits and will cause issues. You MUST use scripts. **REQUIRED: ALWAYS use manage_index.py scripts for ANY index.yaml access:** ```bash 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`. ## Available Slash Commands Use the consolidated `docs-ops` skill for common workflows: - **`/google-ecosystem:docs-ops scrape`** - Scrape Gemini CLI documentation from geminicli.com, then refresh index and validate - **`/google-ecosystem:docs-ops refresh`** - Refresh the local index and metadata without scraping from remote sources - **`/google-ecosystem:docs-ops validate`** - Validate the index and references for consistency and drift without scraping - **`/google-ecosystem:docs-ops rebuild-index`** - Force rebuild the search index - **`/google-ecosystem:docs-ops clear-cache`** - Clear the documentation search cache ## Overview This skill provides automation tooling for Gemini CLI documentation management. It manages: - **Canonical storage** (encapsulated in skill) - Single source of truth for official docs - **Subsection extraction** - Token-optimized extracts (60-90% savings) - **Drift detection** - Hash-based validation against upstream sources - **Sync workflows** - Maintenance automation - **Documentation discovery** - Keyword-based search and doc_id resolution - **Index management** - Metadata, keywords, tags, aliases for resilient references **Core value:** Prevents link rot, enables offline access, optimizes token costs, automates maintenance, and provides resilient doc_id-based references. ## When to Use This Skill This skill should be used when: - **Scraping documentation** - Fetching docs from geminicli.com llms.txt - **Finding documentation** - Searching for docs by keywords, category, or natural language - **Resolving doc references** - Converting doc_id to file paths - **Managing index metadata** - Adding keywords, tags, aliases, updating metadata - **Rebuilding index** - Regenerating index from filesystem (handles renames/moves) ## Workflow Execution Pattern **CRITICAL: This section defines HOW to execute operations in this skill.** ### Delegation Strategy #### Default approach: Delegate to Task agent 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 description - `prompt`: Full task description with execution instructions ### Execution Pattern **Scripts run in FOREGROUND by default. Do NOT background them.** When Task agents execute scripts: - **Run directly**: `python plugins/google-ecosystem/skills/gemini-cli-docs/scripts/core/scrape_docs.py --llms-txt https://geminicli.com/llms.txt` - **Streaming logs**: Scripts emit progress naturally via stdout - **Wait for completion**: Scripts exit when done with exit code - **NEVER use `run_in_background=true`**: Scripts are designed for foreground execution - **NEVER poll output**: Streaming logs appear automatically, no BashOutput polling needed - **NEVER use background jobs**: No `&`, no `nohup`, no background process management ### Anti-Pattern Detection **Red flags indicating incorrect execution:** - Using `run_in_background=true` in Bash tool - Repeated BashOutput calls in a loop - Checking process status with `ps` or `pgrep` - Manual polling of script output - Background job management (`&`, `nohup`, `jobs`) - **Using BashOutput AFTER Task agent completes** **If you recognize these patterns, STOP and correct immediately.** ### Error and Warning Reporting **CRITICAL: Report ALL errors, warnings, and issues - never suppress or ignore them.** When executing scripts via Task agents: - **Report script errors**: Exit codes, exceptions, error messages - **Report warnings**: Deprecation warnings, import issues, configuration problems - **Report unexpected output**: 404s, timeouts, validation failures - **Include context**: What was being executed when the error occurred **Red flags that indicate issues:** - Non-zero exit code - Lines containing "ERROR", "FAILED", "Exception", "Traceback" - "WARNING" or "WARN" messages - "404 Not Found", "500 Internal Server Error" ## Quick Start ### Refresh Index End-to-End (No Scraping) 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+ ```bash # 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 ``` ### Scrape All Documentation Use this when the user explicitly wants to **hit the network and scrape docs**: ```bash # 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:** ```bash # 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/" ``` ### Find Documentation ```bash # 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 | ## Configuration System The gemini-cli-docs skill uses a unified configuration system with a single source of truth. **Configuration Files:** - *
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.