Delegate tasks to Gemini CLI as an agent. An agent skill from michaleiatrak-star/Lex-Machina.

GPL-3.0Auto-check passedAI & LLM Engineering

Install Gemini Agent

skills CLI
$ npx skills add michaleiatrak-star/Lex-Machina --skill gemini-agent -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install michaleiatrak-star/Lex-Machina gemini-agent --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/michaleiatrak-star/Lex-Machina.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tools/claude-dev-config/skills/gemini-agent .claude/skills/gemini-agent && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gemini-agent
GitHub stars
267
Token cost
~626 tokens
SKILL.md length
191 words
Files
3 (incl. scripts)
Skills in repo
35
Repo updated
First seen
Licence
GPL-3.0

At a glance

Delegate tasks to Gemini CLI as an agent. An agent skill from michaleiatrak-star/Lex-Machina.

  • The user wants to offload token-heavy work to Gemini
  • SKILL.md covers Basic usage, With a system prompt file, With a context file and Options, plus 2 more sections
  • Runs Python scripts from its folder; calls python and gemini
  • Get a second opinion from a different model

What it does

Gemini Agent is an agent skill from michaleiatrak-star/Lex-Machina. Delegate tasks to Gemini CLI as an agent. Use when the user wants to offload token-heavy work to Gemini, get a second opinion from a different model, or run Gemini with a custom system prompt. Triggers include "use Gemini to review X", "ask Gemini to Y", "run Gemini on Z", "delegate to Gemini", "have Gemini check X".

Its SKILL.md is about 630 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `README.md` and `scripts/gemini_interface.py`).

It sits in AI & LLM Engineering, covering Prompt engineering. It works with Google Gemini. The repository describes itself as: Analityka polskiego prawa, przygotowanie pism procesowych, weryfikacja przepisów prawa polskiego i orzecznictwa z oficjalnych źródeł z zakazem cytowania z pamięci, przygotowanie… The licence is GPL-3.0.

When your agent uses it

  • The user wants to offload token-heavy work to Gemini
  • Get a second opinion from a different model
  • Run Gemini with a custom system prompt
  • Include use Gemini to review X

Example prompts

  • “use Gemini to review X”
  • “ask Gemini to Y”
  • “run Gemini on Z”
  • “/gemini-agent”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 8be00e7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • gemini

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gemini Agent loads about 626 tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 191 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~626

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from michaleiatrak-star/Lex-Machina at commit 8be00e7, republished under its GPL-3.0 licence (© michaleiatrak-star). 191 words, ~626 tokens.

Download SKILL.mdSave it as .claude/skills/gemini-agent/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
gemini-agent
description
Delegate tasks to Gemini CLI as an agent. Use when the user wants to offload token-heavy work to Gemini, get a second opinion from a different model, or run Gemini with a custom system prompt. Triggers include "use Gemini to review X", "ask Gemini to Y", "run Gemini on Z", "delegate to Gemini", "have Gemini check X".

Gemini Agent

Delegates tasks to Gemini CLI in headless mode using gemini_interface.py from this skill's scripts/ folder.

Prerequisite: Gemini CLI must be installed and on PATH (gemini --version should work).

Basic usage

bash
python ~/.claude/skills/gemini-agent/scripts/gemini_interface.py \
  --prompt "<task prompt>" \
  --cwd "$(pwd)"

With a system prompt file

Pass any markdown file as a persona/role for Gemini. YAML frontmatter is stripped automatically.

bash
python ~/.claude/skills/gemini-agent/scripts/gemini_interface.py \
  --prompt "<task prompt>" \
  --system-md /path/to/persona.md \
  --cwd "$(pwd)"

With a context file

If you need Gemini to read a large existing file, attach it via the --context-file argument (which uses Gemini's @file syntax under the hood):

bash
python ~/.claude/skills/gemini-agent/scripts/gemini_interface.py \
  --prompt "Review this file for security vulnerabilities." \
  --context-file src/auth/login.py \
  --cwd "$(pwd)"

Note: For short context or summaries (a few sentences), do not create a temp file. Just include the context directly inside your --prompt string!

Options

FlagDefaultDescription
--promptrequiredTask prompt
--system-mdnoneMarkdown file prepended as system instructions
--context-filenoneFile attached via @path in the prompt
--cwdcurrent dirWorking directory for Gemini CLI
--modelgemini-3.1-pro-previewGemini model ID
--verboseoffStream all output; default is final response only

Running in background (parallel with other work)

bash
# Launch as a background task so Claude can continue working in parallel
Bash("python ~/.claude/skills/gemini-agent/scripts/gemini_interface.py --prompt '...' --cwd $(pwd)", run_in_background=true)

Constructing good prompts

Gemini has no conversation context. Include everything it needs:

  • Which files or components to examine
  • What specifically to look for
  • What format to return (e.g., "list issues with file:line references")

© michaleiatrak-star, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in tools/claude-dev-config/skills/gemini-agent of michaleiatrak-star/Lex-Machina.

  • SKILL.md
  • README.md
  • scripts/gemini_interface.py

Open the folder on GitHubat commit 8be00e7

Compare with similar skills

Gemini Agent next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gemini Agent compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gemini Agent this skillmichaleiatrak-star/Lex-Machina267—~626Automated safety check: PassGPL-3.0
System Prompt Writing Guidecashew-labs/libretto904—~570Automated safety check: PassMIT
Image Ad Clonekrusemediallc/arcads-claude-code1.6k—~2.4kAutomated safety check: NotesMIT
AI Image Prompts SkillLeoYeAI/openclaw-master-skills2.2k—~4.3kAutomated safety check: PassMIT
Codebase Managementgiancarloerra/SocratiCode3.3k1 repos~1.8kAutomated safety check: PassAGPL-3.0
Prompt Improverseverity1/claude-code-prompt-improver1.9k1 repos~1.7kAutomated safety check: PassMIT

Similar skills

  • System Prompt Writing Guide

    cashew-labs/libretto

    Lays out a minimal, iteration-first approach to writing system prompts for LLM agents, with model-specific notes for Claude, GPT, Gemini, and Codex.

    904 GitHub stars~570 tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Image Ad Clone

    krusemediallc/arcads-claude-code

    A skill your agent uses when the user wants to reverse-engineer an existing image ad into a reusable prompt template.

    1.6k GitHub stars~2.4k tokensUpdated 18 days ago
    Media & CreativeAuto-check: notes
  • AI Image Prompts Skill

    LeoYeAI/openclaw-master-skills

    Recommend curated prompts from a 10,000+ real-world image generation prompt library.

    2.2k GitHub stars~4.3k tokensUpdated 2 mo ago
    Media & CreativeAuto-check passed
  • Codebase Management

    giancarloerra/SocratiCode

    Set up, index, and manage SocratiCode codebase indexing. An agent skill from giancarloerra/SocratiCode.

    3.3k GitHub starsUsed in 1 repo~1.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Prompt Improver

    severity1/claude-code-prompt-improver

    This skill enriches vague prompts with targeted research and clarification before execution.

    1.9k GitHub starsUsed in 1 repo~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Prompt Engineering Patterns

    ynulihao/AgentSkillOS

    Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production.

    618 GitHub starsUsed in 14 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed

More from michaleiatrak-star/Lex-Machina

All 35 skills in this repo
  • Git Worktree Prune

    michaleiatrak-star/Lex-Machina

    Safely prune stale git worktrees and local branches left over from past sessions, deleting only those with no unique work so no commit is ever lost.

    267 GitHub stars~712 tokensUpdated today
    Auto-check passed
  • Analizator Umow V1

    michaleiatrak-star/Lex-Machina

    Analiza, redakcja, negocjacje i generowanie umów oraz dokumentów korporacyjnych, HR i RODO: ryzyka klauzul, B2B/B2C, praca, najem, IT/SaaS, IP, founders, finansowanie i PZP.

    267 GitHub stars~9.1k tokensUpdated today
    Auto-check passed
  • Audyt Systemu V4

    michaleiatrak-star/Lex-Machina

    Audyt jakości, spójności i bezpieczeństwa systemu prawnych skilli: zależności, wersje, mapy Dz.U., treść merytoryczna, propagacja zmian, deduplikacja i bramki jakości.

    267 GitHub stars~18k tokensUpdated today
    Auto-check passed
  • Dr 02 Prawo Cywilne Rodzinne Gospodarcze

    michaleiatrak-star/Lex-Machina

    Prawo cywilne, rodzinne i gospodarcze: KC, KPC, spadki, rodzina, spółki, upadłość, restrukturyzacja, windykacja i odpowiedzialność kontraktowa/deliktowa.

    267 GitHub stars~10k tokensUpdated today
    Auto-check passed
  • Dr 01 Ustroj Konstytucyjny I Zrodla Prawa

    michaleiatrak-star/Lex-Machina

    Prawo konstytucyjne i ustrojowe: Konstytucja, organy państwa, TK, źródła prawa, legislacja i skarga konstytucyjna; analiza z aktualną weryfikacją źródeł.

    267 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Prawo administracyjne i sądowoadministracyjne: KPA, PPSA, decyzje, bezczynność, WSA/NSA, egzekucja administracyjna, cudzoziemcy i postępowania urzędowe.

    267 GitHub stars~4.6k tokensUpdated today
    Auto-check passed

Works with

Questions about Gemini Agent

What does Gemini Agent do?

Delegate tasks to Gemini CLI as an agent. An agent skill from michaleiatrak-star/Lex-Machina. Gemini Agent is an agent skill from michaleiatrak-star/Lex-Machina. Delegate tasks to Gemini CLI as an agent.

When should I use Gemini Agent?

Gemini Agent fits situations like: the user wants to offload token-heavy work to Gemini; get a second opinion from a different model; run Gemini with a custom system prompt; include use Gemini to review X.

How do I install Gemini Agent in Claude Code?

Run `npx skills add michaleiatrak-star/Lex-Machina --skill gemini-agent -a claude-code`. Or copy the skill folder (tools/claude-dev-config/skills/gemini-agent in michaleiatrak-star/Lex-Machina) into .claude/skills/gemini-agent in your project. Claude Code loads it when a task matches its description.

How do I install Gemini Agent in Codex?

Run `npx skills add michaleiatrak-star/Lex-Machina --skill gemini-agent -a codex`. Or copy the skill folder (tools/claude-dev-config/skills/gemini-agent in michaleiatrak-star/Lex-Machina) into .agents/skills/gemini-agent in your project. Codex loads it when a task matches its description.

Can I use Gemini Agent in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add michaleiatrak-star/Lex-Machina --skill gemini-agent -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gemini-agent, .gemini/skills/gemini-agent, .github/skills/gemini-agent and .opencode/skills/gemini-agent in your project.

What does Gemini Agent need to run?

Going by SKILL.md and its folder, Gemini Agent needs Python for the scripts in its folder and the command-line tools its instructions call (python and gemini). Our summary lists: Python 3.

Does Gemini Agent access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gemini Agent safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Gemini Agent use?

Gemini Agent is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gemini Agent use?

About 626 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gemini Agent?

Skills that share tags, products or a category with Gemini Agent: System Prompt Writing Guide (cashew-labs/libretto, 904 stars), Image Ad Clone (krusemediallc/arcads-claude-code, 1.6k stars), AI Image Prompts Skill (LeoYeAI/openclaw-master-skills, 2.2k stars) and Codebase Management (giancarloerra/SocratiCode, 3.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gemini Agent?

michaleiatrak-star (a GitHub user) maintains it in michaleiatrak-star/Lex-Machina, which has 267 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 10, 2026.

Source: michaleiatrak-star/Lex-Machina on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.