gemini-cli-integration
Use the gemini-cli-integration skill PROACTIVELY when analyzing large codebases, multiple files, or directories. Leverages Google Gemini's massive context window with @ syntax for file inclusion to handle comprehensive codebase analysis, implementation verification, and architectural understanding.
What this skill does
# Gemini CLI Plugin for Large Codebase Analysis Use the Gemini CLI with its massive context window when analyzing large codebases or multiple files that might exceed context limits. ## Core Usage Execute `gemini -p` with the `@` syntax to include files and directories. Paths are relative to the current working directory. ### File Inclusion Patterns **Single file analysis:** ```bash gemini -p "@src/main.py Explain this file's purpose and structure" ``` **Multiple files:** ```bash gemini -p "@package.json @src/index.js Analyze the dependencies used in the code" ``` **Entire directory:** ```bash gemini -p "@src/ Summarize the architecture of this codebase" ``` **Multiple directories:** ```bash gemini -p "@src/ @tests/ Analyze test coverage for the source code" ``` **Current directory recursively:** ```bash gemini -p "@./ Give me an overview of this entire project" ``` **Alternative to @ syntax:** ```bash gemini --all_files -p "Analyze the project structure and dependencies" ``` ## Implementation Verification Workflows ### Feature Implementation Analysis Verify specific features are implemented across the codebase: ```bash # Check for feature implementation gemini -p "@src/ @lib/ Has dark mode been implemented in this codebase? Show me the relevant files and functions" # Authentication verification gemini -p "@src/ @middleware/ Is JWT authentication implemented? List all auth-related endpoints and middleware" # Pattern detection gemini -p "@src/ Are there any React hooks that handle WebSocket connections? List them with file paths" ``` ### Security and Quality Assurance Verify security measures and coding standards: ```bash # Error handling verification gemini -p "@src/ @api/ Is proper error handling implemented for all API endpoints? Show examples of try-catch blocks" # Security measures gemini -p "@src/ @api/ Are SQL injection protections implemented? Show how user inputs are sanitized" # Rate limiting gemini -p "@backend/ @middleware/ Is rate limiting implemented for the API? Show the implementation details" ``` ### Infrastructure and Testing Check infrastructure components and test coverage: ```bash # Caching strategy verification gemini -p "@src/ @lib/ @services/ Is Redis caching implemented? List all cache-related functions and their usage" # Test coverage analysis gemini -p "@src/payment/ @tests/ Is the payment processing module fully tested? List all test cases" ``` ## Advanced CLI Options For advanced usage scenarios, leverage additional CLI options: ### Safety and Approval Modes ```bash # Auto-approve edit tools only (safer than full YOLO) gemini --approval-mode auto_edit -p "@src/ Refactor this code for better performance" # Full auto-approval (use with caution) gemini --approval-mode yolo -p "@src/ @tests/ Update all tests to use new syntax" # Specify allowed tools for selective automation gemini --allowed-tools edit,read -p "@src/ Review and fix syntax issues" ``` ### Session Management ```bash # Resume previous analysis sessions gemini --resume latest -p "@src/ Continue the security analysis we started" # List available sessions gemini --list-sessions # Delete old sessions gemini --delete-session 3 ``` ### Model and Output Configuration ```bash # Specify Pro model for difficult analysis gemini --model gemini-2.5-pro -p "@src/ Analyze this code architecture" # JSON output for programmatic processing gemini --output-format json -p "@src/ List all API endpoints" > endpoints.json # Include additional directories beyond current workspace gemini --include-directories ../shared-lib -p "@src/ Analyze dependencies" ``` ### Extensions and MCP Integration ```bash # Use specific extensions for enhanced analysis gemini --extensions security-testing -p "@src/ Perform security analysis" # List available extensions gemini --list-extensions # Use specific MCP servers for specialized tools gemini --allowed-mcp-server-names code-analyzer -p "@src/ Deep code analysis" ``` ## When to Use This Skill Use `gemini` with appropriate options when: - **Context limitations**: Analyzing entire codebases or large directories that exceed standard context windows - **Multi-file comparison**: Comparing multiple large files simultaneously - **Architecture understanding**: Need to understand project-wide patterns or architectural decisions - **File size considerations**: Working with files totaling more than 100KB - **Implementation verification**: Verifying if specific features, patterns, or security measures are implemented - **Pattern analysis**: Checking for the presence of certain coding patterns across the entire codebase - **Automated workflows**: Using approval modes for batch operations or refactoring tasks - **Session continuity**: Resuming complex analyses across multiple sessions - **Specialized analysis**: Leveraging extensions or MCP servers for domain-specific insights ## Best Practices - **Specific queries**: Be specific about what you're looking for to get accurate results - **Path management**: Remember that paths in @ syntax are relative to your current working directory - **Content inclusion**: The CLI includes file contents directly in the context - **Safety considerations**: Use appropriate approval modes - avoid --yolo for destructive operations - **Context awareness**: Gemini's context window can handle entire codebases that would overflow Claude's context - **Session utilization**: Use session management for complex, multi-step analyses - **Extension leverage**: Utilize appropriate extensions for domain-specific analysis ## Reference Documentation For complete CLI option reference, see `references/gemini-cli-help` which contains: - All available commands and options - Detailed parameter descriptions - Extension management commands - MCP server configuration options ## Query Optimization For best results, structure queries with: 1. **Clear scope**: Specify exactly what files/directories to analyze 2. **Specific objectives**: Clearly state what you're looking for 3. **Expected format**: Request specific output formats when helpful 4. **Context scope**: Include relevant files while excluding unnecessary ones to maintain focus 5. **Tool selection**: Use --allowed-tools to restrict to specific operations when appropriate 6. **Output formatting**: Leverage --output-format json for programmatic processing of results
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.