home / skills / hiroro-work / claude-plugins / ask-gemini

ask-gemini skill

/skills/ask-gemini

This skill delegates coding tasks to the Gemini CLI for rapid code generation, debugging, and review.

npx playbooks add skill hiroro-work/claude-plugins --skill ask-gemini

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.3 KB
---
name: ask-gemini
description: Asks Gemini CLI for coding assistance. Use for getting a second opinion, code generation, debugging, or delegating coding tasks.
allowed-tools: Bash(gemini:*)
---

# Ask Gemini

Executes the local `gemini` CLI to get coding assistance.

**Note:** This skill requires the `gemini` CLI to be installed and available in your system's PATH.

## Quick start

Run a single query using positional prompt:

```bash
gemini "Your question or task here"
```

## Common options

| Option | Description |
|--------|-------------|
| `-m MODEL` | Specify model |
| `-y, --yolo` | Auto-approve all tool executions |

> For all available options, run `gemini --help`

## Examples

**Ask a coding question:**

```bash
gemini "How do I implement a binary search in Python?"
```

**Use a specific model:**

```bash
gemini -m gemini-2.5-pro "Review this code for potential issues"
```

**Let Gemini make changes automatically:**

```bash
gemini -y "Refactor this function to use async/await"
```

## Notes

- Positional prompts run Gemini non-interactively and output result to stdout
- Gemini CLI uses the `GEMINI_API_KEY` environment variable for authentication
- Use `-y/--yolo` for automatic execution without confirmation prompts
- The command inherits the current working directory

Overview

This skill runs the local Gemini CLI to get coding assistance directly from Gemini models. It is designed for quick second opinions, code generation, debugging help, and delegating programming tasks to the CLI. The skill expects the gemini binary to be installed and available on the PATH and uses GEMINI_API_KEY for authentication.

How this skill works

The skill executes the gemini command with a positional prompt or options you provide, inheriting the current working directory so Gemini can inspect your project files. You can specify model and behavior flags (for example -m to choose a model or -y/--yolo to auto-approve tool actions). Outputs are produced on stdout for non-interactive calls and the command respects standard CLI authentication and environment variables.

When to use it

  • When you want a quick second opinion on code design or implementation
  • For generating boilerplate, functions, or unit tests from a prompt
  • When debugging a bug and you want suggested fixes or root-cause analysis
  • To delegate refactoring tasks or automated edits using --yolo for confirmation-free runs
  • During local development when you prefer an on-machine CLI workflow

Best practices

  • Install gemini and set GEMINI_API_KEY in your environment before using the skill
  • Run gemini with explicit prompts and, when needed, specify -m to pick an appropriate model
  • Use -y/--yolo only for trusted, repeatable changes; otherwise review suggested edits interactively
  • Invoke the CLI from your project root so Gemini can access repository files if needed
  • Pipe or capture stdout if you want to save Gemini responses or further automate processing

Example use cases

  • Ask: "How do I implement a binary search in Python?" to get example code and complexity analysis
  • Run code review: gemini -m gemini-2.5-pro "Review this code for potential issues"
  • Refactor automatically: gemini -y "Refactor this function to use async/await" to apply edits without prompts
  • Generate tests: "Create unit tests for the following module" and paste the module contents
  • Debugging help: "I have a failing test, here is the stack trace—what could be wrong?"

FAQ

Do I need an internet connection?

The gemini CLI may require network access depending on how the installed client communicates with Gemini; follow your gemini installation guidance.

How do I authenticate?

Set the GEMINI_API_KEY environment variable as required by your gemini CLI installation.