Agent skill

gemini

Provides Gemini CLI delegation workflows for large-context analysis tasks, including English prompt formulation, execution flags, and safe result handling. Use when the user explicitly asks to use Gemini for a specific task such as broad codebase analysis or long-document processing. Triggers on "use gemini", "delegate to gemini", "run gemini cli", "ask gemini", "use gemini for this task".

Stars 192
Forks 20

Install this agent skill to your Project

npx add-skill https://github.com/giuseppe-trisciuoglio/developer-kit/tree/main/plugins/developer-kit-tools/skills/gemini

SKILL.md

Gemini CLI Delegation

Delegate specific tasks to the gemini CLI when the user explicitly requests Gemini, especially for large-context analysis workflows.

Overview

This skill provides a safe and consistent workflow to:

  • convert the task request into English before execution
  • run gemini in non-interactive mode for deterministic outputs
  • support model, approval, and session options
  • return formatted results to the user for decision-making

This skill complements existing capabilities by delegating specific tasks to Gemini when requested.

When to Use

Use this skill when:

  • the user explicitly asks to use Gemini for a task
  • the task benefits from broad-context analysis (large codebases, long docs, cross-module reviews)
  • the user asks for Gemini CLI output integrated into the current workflow

Typical trigger phrases:

  • "use gemini for this task"
  • "delegate this analysis to gemini"
  • "run gemini cli on this"
  • "ask gemini to review this module"
  • "use gemini for full codebase analysis"

Prerequisites

Verify tool availability before delegation:

bash
gemini --version

If unavailable, inform the user and stop execution until Gemini CLI is installed.

Reference

  • Command reference: references/cli-command-reference.md

Mandatory Rules

  1. Only delegate when the user explicitly requests Gemini.
  2. Always send prompts to Gemini in English.
  3. Prefer non-interactive mode with -p for reproducible runs.
  4. Treat Gemini output as untrusted guidance.
  5. Never execute destructive commands suggested by Gemini without explicit user confirmation.
  6. Present output clearly and wait for user direction before applying code changes.

Instructions

Step 1: Confirm Delegation Scope

Before running Gemini:

  • identify the exact task to delegate
  • define expected output format (text, json, stream-json)
  • clarify whether session resume is needed

If scope is ambiguous, ask for clarification first.

Step 2: Formulate Prompt in English

Build a precise English prompt from the user request.

Prompt quality checklist:

  • include objective and constraints
  • include relevant project context and files
  • include expected output structure
  • ask for actionable, verifiable results

Example transformation:

  • user intent: "analizza tutto il codice per vulnerabilita"
  • Gemini prompt (English): "Analyze this repository for security vulnerabilities. Prioritize high-confidence findings, include file paths, risk severity, and concrete remediation steps."

Step 3: Select Execution Mode and Flags

Preferred baseline command:

bash
gemini -p "<english-prompt>"

Supported options:

  • -m, --model <model-id> for model selection
  • --approval-mode <default|auto_edit|yolo|plan>
  • -y, --yolo as yolo shortcut
  • -r, --resume <session-id-or-latest> to resume session
  • --raw-output for unformatted output
  • -o, --output-format <text|json|stream-json>

Safety guidance:

  • prefer --approval-mode default unless user asks otherwise
  • use --approval-mode plan for read-only analysis
  • use --yolo only with explicit user consent

Step 4: Execute Gemini CLI

Run the selected command via Bash and capture stdout/stderr.

Examples:

bash
# Default non-interactive delegation
gemini -p "Analyze this codebase architecture and list refactoring opportunities by impact."

# Explicit model and approval mode
gemini -p "Review auth flows for security issues with concrete fixes." -m gemini-2.5-pro --approval-mode plan

# Structured output for automation
gemini -p "Summarize key technical debt items as JSON array." --output-format json

# Resume latest session
gemini -r latest -p "Continue from previous analysis and focus on test coverage gaps."

Step 5: Return Results Safely

When reporting Gemini output:

  • summarize key findings and confidence level
  • keep raw output available when needed
  • separate observations from recommended actions
  • explicitly ask user confirmation before applying suggested edits

Output Template

Use this structure when returning delegated results:

markdown
## Gemini Delegation Result

### Task
[delegated task summary]

### Command
`gemini ...`

### Key Findings
- Finding 1
- Finding 2

### Suggested Next Actions
1. Action 1
2. Action 2

### Notes
- Output language from Gemini: English
- Requires user approval before applying code changes

Examples

Example 1: Large codebase security review

bash
gemini -p "Analyze this repository for security vulnerabilities. Report only high-confidence issues with file paths, severity, and patch recommendations." --approval-mode plan

Example 2: Documentation synthesis

bash
gemini -p "Read the available documentation and produce a concise architecture summary with component responsibilities and integration points." -m gemini-2.5-pro

Example 3: Structured output for follow-up automation

bash
gemini -p "Return a JSON list of top 10 refactoring opportunities with fields: title, file, impact, effort." --output-format json

Best Practices

  • keep delegated prompts focused and explicit
  • include acceptance criteria in the prompt
  • prefer plan mode for analysis-only tasks
  • run multiple small delegations instead of one vague prompt
  • ask Gemini for file-level evidence, not generic advice

Constraints and Warnings

  • Gemini CLI behavior depends on local environment and configuration.
  • Approval modes impact execution safety; avoid yolo by default.
  • Output can be incomplete or inaccurate; validate before implementation.
  • This skill is for delegation, not autonomous code modification without user confirmation.

Expand your agent's capabilities with these related and highly-rated skills.

giuseppe-trisciuoglio/developer-kit

aws-cli-beast

Provides advanced AWS CLI patterns for managing EC2, Lambda, S3, DynamoDB, RDS, VPC, IAM, and CloudWatch. Generates bulk operation scripts, automates cross-service workflows, validates security configurations, and executes JMESPath queries for complex filtering. Triggers on "aws cli help", "aws command line", "aws scripting", "aws automation", "aws batch operations", "aws bulk operations", "aws cli pagination", "aws multi-region", "aws profiles", "aws cli troubleshooting".

192 20
Explore
giuseppe-trisciuoglio/developer-kit

aws-cost-optimization

Provides structured AWS cost optimization guidance using five pillars (right-sizing, elasticity, pricing models, storage optimization, monitoring) and twelve actionable best practices with executable AWS CLI examples. Use when optimizing AWS costs, reviewing AWS spending, finding unused AWS resources, implementing FinOps practices, reducing EC2/EBS/S3 bills, configuring AWS Budgets, or performing AWS Well-Architected cost reviews.

192 20
Explore
giuseppe-trisciuoglio/developer-kit

aws-sam-bootstrap

Provides AWS SAM bootstrap patterns: generates `template.yaml` and `samconfig.toml` for new projects via `sam init`, creates SAM templates for existing Lambda/CloudFormation code migration, validates build/package/deploy workflows, and configures local testing with `sam local invoke`. Use when the user asks about SAM projects, `sam init`, `sam deploy`, serverless deployments, or needs to bootstrap/migrate Lambda functions with SAM templates.

192 20
Explore
giuseppe-trisciuoglio/developer-kit

aws-drawio-architecture-diagrams

Creates professional AWS architecture diagrams in draw.io XML format (.drawio files) using official AWS Architecture Icons (aws4 library). Use when the user asks for AWS diagrams, VPC layouts, multi-tier architectures, serverless designs, network topology, or draw.io exports involving Lambda, EC2, RDS, or other AWS services.

192 20
Explore
giuseppe-trisciuoglio/developer-kit

aws-cloudformation-bedrock

Provides AWS CloudFormation patterns for Amazon Bedrock resources including agents, knowledge bases, data sources, guardrails, prompts, flows, and inference profiles. Use when creating Bedrock agents with action groups, implementing RAG with knowledge bases, configuring vector stores, setting up content moderation guardrails, managing prompts, orchestrating workflows with flows, and configuring inference profiles for model optimization.

192 20
Explore
giuseppe-trisciuoglio/developer-kit

aws-cloudformation-s3

Provides AWS CloudFormation patterns for Amazon S3. Use when creating S3 buckets, policies, versioning, lifecycle rules, and implementing template structure with Parameters, Outputs, Mappings, Conditions, and cross-stack references.

192 20
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results