magpie GEMINI.md

An instruction file for Apache Magpie, a Gemini CLI extension. Gemini CLI is a command-line tool for using Gemini, and this file explains how Magpie should detect extension updates and prompt for reconciliation.

In plain words
What is it for?
Use it in projects that adopt Apache Magpie. After an update, it tells the user to run the guided /magpie-setup upgrade command and records the extension version.
Why use it?
It gives the extension a consistent update-checking process even though Gemini CLI has no built-in plugin update hook. It also prevents unattended changes to a project.

Instructions file for Gemini CLI

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.

agentmods
npx agentmods add instructions/apache/magpie/gemini-md
Clone the repo
git clone --depth 1 https://github.com/apache/magpie

Made for: Gemini CLI.

Per session 376 This file is loaded in full into every session.
When invoked 376 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00376 $0.00376
Opus 5 $0.00188 $0.00188
Sonnet 5 $0.00075 $0.00075
Haiku 4.5 $0.00038 $0.00038

Measured 2d ago against content hash 23c819a072bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

magpie GEMINI.md 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 2d ago.

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.

GEMINI.md · 39 lines

What it actually says

Table of Contents generated with DocToc

Apache Magpie — Gemini CLI extension context

This context ships with the Apache Magpie Gemini CLI extension. Gemini has no plugin update/lifecycle hook (unlike Claude Code), so this file is how the extension prompts you to reconcile after an update.

Upgrade prompt

The Magpie extension declares its version in gemini-extension.json. At the start of a session, compare that version against the value you last recorded in magpie-plugin-version under the extension's state directory (create the file if it does not exist):

  • If the version has changed since you last recorded it — the marketplace updated the extension — tell the user, once and non-intrusively:

    Apache Magpie was updated to <version>. If this repo adopts Magpie, run /magpie-setup upgrade to reconcile the snapshot, agentic overrides, and drift.

    Then record the new version.

  • If the version is unchanged, say nothing.

Never run the upgrade yourself: /magpie-setup upgrade is a guided, user-confirmed action, and Magpie never mutates an adopter repo unattended.

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. 2d ago First seen · 39 lines · 376 tokens per session scan A 23c819a072bb

Subscribe to this mod's changes

magpie GEMINI.md is an instructions file published in the GitHub repository apache/magpie (84 stars, last pushed 2d ago), licensed Apache-2.0. It adds 376 tokens to every session, about $0.0019 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-30.