gemini-proxy

gemini-proxy is a skill for Claude Code from freestyler-arb/imagine-gemini-for-claude-codex. It costs 120 tokens per session (1,457 once invoked), scanned A, original, MIT.

A prompt-polishing mode that sends the next set of substantial requests to Gemini, which rewrites them into clearer, more detailed instructions before the agent responds. Gemini improves the wording but does not replace the conversation or perform the task itself.

In plain words
What is it for?
It helps refine prompts during an agent session, including requests to enable or disable Gemini-based rewriting.
Why use it?
It helps turn brief or ambiguous requests into instructions with more useful context. The mode can be grounded in project rules, safety limits, and standing expectations.

Skill for Claude Code

Written for Claude Code: UserPromptSubmit hook event. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Part of the imagine plugin — 4 skills shipped together

Good fit It helps refine prompts during an agent session, including requests to enable or disable Gemini-based rewriting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/freestyler-arb/imagine-gemini-for-claude-codex/gemini-proxy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add freestyler-arb/imagine-gemini-for-claude-codex --skill gemini-proxy
Clone the repo
git clone --depth 1 https://github.com/freestyler-arb/imagine-gemini-for-claude-codex

Made for: Claude Code.

Or install imagine, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gemini-proxy

README.md
[![agentmods](https://agentmods.dev/badge/skills/freestyler-arb/imagine-gemini-for-claude-codex/gemini-proxy/github.svg)](https://agentmods.dev/skills/freestyler-arb/imagine-gemini-for-claude-codex/gemini-proxy)
Your own site
<a href="https://agentmods.dev/skills/freestyler-arb/imagine-gemini-for-claude-codex/gemini-proxy"><img src="https://agentmods.dev/badge/skills/freestyler-arb/imagine-gemini-for-claude-codex/gemini-proxy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gemini-proxy

Your own site · 80×15
<a href="https://agentmods.dev/skills/freestyler-arb/imagine-gemini-for-claude-codex/gemini-proxy"><img src="https://agentmods.dev/badge/skills/freestyler-arb/imagine-gemini-for-claude-codex/gemini-proxy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,457 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00120 $0.01457
Opus 5 $0.00060 $0.00728
Sonnet 5 $0.00024 $0.00291
Haiku 4.5 $0.00012 $0.00146

Measured 11d ago against content hash 3e98195179dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

gemini-proxy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (hook/gemini_proxy_hook.py, proxy_route.py, proxy_state.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/gemini-proxy/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gemini-proxy

Overview

A prompt-polishing protocol. While active, each of your next N substantive prompts is first sent to Gemini — a senior prompt engineer — which rewrites the operator's message into a sharper, more detailed first-person version (still the operator's own message, not a standalone brief). The assistant then answers that improved message with the full chat context, project rules, and memory — Gemini only sharpens the wording, it does not replace the conversation. Trivial / config / meta prompts are skipped. Self-disables after N. Control layer only: it calls nothing but the counter and the gemini wrapper.

Ground it first (the step that makes this good, not generic)

A rewrite with no project context is mediocre. Copy the shipped template into the project and fill it with the project's canon, safety invariants/guardrails, and standing expectations (the habits you want on every task — keep a tracker, finish work to the plan, use the right skills, get an independent review on risky/money changes, goal-drift check). Then Gemini rewrites WITH your project in mind.

cp <skill>/prompt-rules.template.txt ./.gemini-proxy-rules.txt   # then edit: CANON / STANDING EXPECTATIONS / GUARDRAILS

Resolution order: $GEMINI_PROXY_RULES → ./.gemini-proxy-rules.txt → ./.claude/gemini-proxy-rules.txt → prompt-rules.template.txt. The richer this file, the sharper and safer every rewrite — it's the highest-leverage thing you do here.

When to route vs skip (the smart filter)

Decide BEFORE calling Gemini. Bias to ROUTE for real work; SKIP only clear noise. Skipped prompts never spend the counter, so N = N routed prompts.

ROUTE — counts as 1 of N SKIP — no Gemini, no counter
build / fix / refactor / audit / design / research greeting, thanks, yes/no, "status", "continue"
vague or large asks ("do all of this", "make it nice") config / setup / preferences about how we work or this protocol
anything that benefits from a sharper brief pure meta / diagnostic ("did you use Gemini?", "what did you mean?")

Read the full file on GitHub · 92 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 92 lines · 120 tokens per session scan A 3e98195179dd

Subscribe to this mod's changes

gemini-proxy is a skill published in the GitHub repository freestyler-arb/imagine-gemini-for-claude-codex (4 stars, last pushed 2mo ago), licensed MIT. It adds 120 tokens to every session and 1,457 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.