Initial commit
This commit is contained in:
11
.claude-plugin/plugin.json
Normal file
11
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "gemini-cli-integration",
|
||||||
|
"description": "Integration with Google Gemini CLI for large codebase analysis using massive context windows",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"author": {
|
||||||
|
"name": "Will Hampson"
|
||||||
|
},
|
||||||
|
"skills": [
|
||||||
|
"./skills"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# gemini-cli-integration
|
||||||
|
|
||||||
|
Integration with Google Gemini CLI for large codebase analysis using massive context windows
|
||||||
49
plugin.lock.json
Normal file
49
plugin.lock.json
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:Whamp/whamp-claude-tools:gemini-cli-plugin",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "c733eb8d6c0e1675dfcfba402992f72f6735318b",
|
||||||
|
"treeHash": "9a74a5ec8319d0f0c2eee6f3373b0acfbb25463eea0820b296cbc90acf5d4f98",
|
||||||
|
"generatedAt": "2025-11-28T10:12:57.881462Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "gemini-cli-integration",
|
||||||
|
"description": "Integration with Google Gemini CLI for large codebase analysis using massive context windows",
|
||||||
|
"version": "0.1.0"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "5350d6cfb2fa1aee8e5c674885843fd65870c1a7a4b1c8de5bbf843d30219410"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "36e182ca24783fe2a2aeba65dc5f11526c1023976792e79de116e102d3835eea"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/gemini-cli-integration/SKILL.md",
|
||||||
|
"sha256": "9ff3f6c36f46844ec33438a01018b94677504afc50d47bf9b2f9988bf8c52183"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/gemini-cli-integration/references/gemini-cli-help",
|
||||||
|
"sha256": "e2ba4cefaf86f7efe38b746443a7bd66e3044ce8e6803d23d0a988b1ce338283"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "9a74a5ec8319d0f0c2eee6f3373b0acfbb25463eea0820b296cbc90acf5d4f98"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
179
skills/gemini-cli-integration/SKILL.md
Normal file
179
skills/gemini-cli-integration/SKILL.md
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
---
|
||||||
|
name: gemini-cli-integration
|
||||||
|
description: 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.
|
||||||
|
---
|
||||||
|
|
||||||
|
# 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
|
||||||
40
skills/gemini-cli-integration/references/gemini-cli-help
Normal file
40
skills/gemini-cli-integration/references/gemini-cli-help
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
```bash
|
||||||
|
❯ gemini --help
|
||||||
|
Usage: gemini [options] [command]
|
||||||
|
|
||||||
|
Gemini CLI - Launch an interactive CLI, use -p/--prompt for non-interactive mode
|
||||||
|
|
||||||
|
Commands:
|
||||||
|
gemini [query..] Launch Gemini CLI [default]
|
||||||
|
gemini mcp Manage MCP servers
|
||||||
|
gemini extensions <command> Manage Gemini CLI extensions. [aliases: extension]
|
||||||
|
|
||||||
|
Positionals:
|
||||||
|
query Positional prompt. Defaults to one-shot; use -i/--prompt-interactive for interactive.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-d, --debug Run in debug mode? [boolean] [default: false]
|
||||||
|
-m, --model Model [string]
|
||||||
|
-p, --prompt Prompt. Appended to input on stdin (if any).
|
||||||
|
[deprecated: Use the positional prompt instead. This flag will be removed in a future version.] [string]
|
||||||
|
-i, --prompt-interactive Execute the provided prompt and continue in interactive mode [string]
|
||||||
|
-s, --sandbox Run in sandbox? [boolean]
|
||||||
|
-y, --yolo Automatically accept all actions (aka YOLO mode, see https://www.youtube.com/watch?v=xvFZjo5PgG0 for more
|
||||||
|
details)? [boolean] [default: false]
|
||||||
|
--approval-mode Set the approval mode: default (prompt for approval), auto_edit (auto-approve edit tools), yolo
|
||||||
|
(auto-approve all tools) [string] [choices: "default", "auto_edit", "yolo"]
|
||||||
|
--experimental-acp Starts the agent in ACP mode [boolean]
|
||||||
|
--allowed-mcp-server-names Allowed MCP server names [array]
|
||||||
|
--allowed-tools Tools that are allowed to run without confirmation [array]
|
||||||
|
-e, --extensions A list of extensions to use. If not provided, all extensions are used. [array]
|
||||||
|
-l, --list-extensions List all available extensions and exit. [boolean]
|
||||||
|
-r, --resume Resume a previous session. Use "latest" for most recent or index number (e.g. --resume 5) [string]
|
||||||
|
--list-sessions List available sessions for the current project and exit. [boolean]
|
||||||
|
--delete-session Delete a session by index number (use --list-sessions to see available sessions). [string]
|
||||||
|
--include-directories Additional directories to include in the workspace (comma-separated or multiple --include-directories)
|
||||||
|
[array]
|
||||||
|
--screen-reader Enable screen reader mode for accessibility. [boolean]
|
||||||
|
-o, --output-format The format of the CLI output. [string] [choices: "text", "json", "stream-json"]
|
||||||
|
-v, --version Show version number [boolean]
|
||||||
|
-h, --help Show help [boolean]
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user