headless-gemini

Run background Gemini CLI code reviews with yolo approval mode.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/pascalandy/dotfiles --skill headless-gemini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: headless-gemini
Source: https://github.com/pascalandy/dotfiles/tree/main/dot_config/opencode/skill/headless-gemini
Command: npx skills add https://github.com/pascalandy/dotfiles --skill headless-gemini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enable background Gemini CLI code reviews and large-context processing without interactive prompts. This helps teams run code analysis without manual intervention or long wait times.

Core Features & Use Cases

  • Background execution: Run Gemini in yolo approval mode to automate reviews without user interaction.
  • Context management: Specify contexts with --include-directories to target specific codebases or folders.
  • Use Case: For multi-file projects requiring security or architectural reviews, run Gemini in the background and collect results without blocking the terminal.

Quick Start

Use a single command to kick off a background Gemini review: timeout 300 gemini -m gemini-3-pro-preview --approval-mode yolo --include-directories /path/to/code "Review this codebase for security issues"

Frequently Asked Questions about headless-gemini

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Gemini CLI code reviews in the background without interactive prompts?

Run Gemini CLI code reviews in the background by using the --approval-mode yolo flag to bypass interactive prompts, enabling non-interactive automation for multi-file projects. You can add a timeout to manage execution time.

How do I process large-context codebases that exceed token limits with Gemini?

Process large-context analyses that exceed token limits by using the --include-directories flag to scope Gemini CLI context to specific codebases or folders, allowing targeted architecture and security reviews without blocking the terminal.

Can I select specific Gemini models for automated background code analysis?

Yes, you can select specific Gemini models for automated background code analysis by using the -m flag, such as specifying gemini-3-pro-preview, to tailor large-context processing and security reviews to your project requirements.

What is the best way to automate security reviews for multi-file projects using Gemini CLI?

The best way to automate security reviews for multi-file projects is to combine the --approval-mode yolo flag for non-interactive execution with --include-directories to target the specific codebase, running the Gemini CLI in the background.

Does background Gemini CLI execution support directory-scoped context for architecture reviews?

Yes, background Gemini CLI execution supports directory-scoped context management through the --include-directories flag, enabling precise architecture reviews by targeting specific folders within large multi-file projects.

Why does Gemini CLI block my terminal during large-context processing?

Gemini CLI blocks the terminal during large-context processing when running in interactive approval modes. Applying --approval-mode yolo enables non-interactive background execution, preventing terminal blockage while collecting review results.