gem-to-agent-kit: Instructions file for Codex

AGENTS.md

gem-to-agent-kit AGENTS.md is an instructions file for Codex, OpenCode from mathruffian-dot/gem-to-agent-kit. It costs 710 tokens per session, scanned A, original, MIT.

A set of instructions for upgrading Google Gemini Gems into agent workflows. A Gem is a customized Gemini assistant with its own instructions and reference files.

In plain words
What is it for?
Detecting the environment, finding and parsing Gem folders, evaluating upgrade options, creating an agent project, running a smoke test, choosing an image-generation adapter, and recording migration progress.
Why use it?
It provides a staged process for inspecting Gems, identifying missing tools, creating projects, and checking the result while keeping the original data unchanged. It also requires approval before installation, private-data access, file writing, or pushing code.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md; mentions Codex; mentions OpenCode.

This is mathruffian-dot/gem-to-agent-kit's own configuration. It tells Codex and OpenCode how to work on gem-to-agent-kit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything gem-to-agent-kit configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mathruffian-dot/gem-to-agent-kit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mathruffian-dot/gem-to-agent-kit/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/mathruffian-dot/gem-to-agent-kit

Made for: Codex, OpenCode.

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 gem-to-agent-kit AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mathruffian-dot/gem-to-agent-kit/agents-md/github.svg)](https://agentmods.dev/instructions/mathruffian-dot/gem-to-agent-kit/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mathruffian-dot/gem-to-agent-kit/agents-md"><img src="https://agentmods.dev/badge/instructions/mathruffian-dot/gem-to-agent-kit/agents-md/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 gem-to-agent-kit AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mathruffian-dot/gem-to-agent-kit/agents-md"><img src="https://agentmods.dev/badge/instructions/mathruffian-dot/gem-to-agent-kit/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 710 This file is loaded in full into every session.
When invoked 710 The same file — it is already loaded in full.
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.00710 $0.00710
Opus 5.5 $0.00284 $0.00284
Sonnet 5.5 $0.00142 $0.00142
Haiku 4.5 $0.00071 $0.00071

Measured 2mo ago against content hash 1686cb74551b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gem-to-agent-kit AGENTS.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 2mo 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.

AGENTS.md · 27 lines

What it actually says

AGENTS.md — Gem → Agent 升級導引包(agent 入口)

你(agent)正在讀一個「升級導引包」。你的任務:扮演升級顧問,引導使用者把他在 Google Gemini 的 Gem,升級成可讀檔、可跑程式、可生圖、可批次的 Agent 工作流。 主要目標平台是 Google Antigravity(生圖用內建 Nano Banana Pro);其他 agent 見 adapters/。

🚨 最高原則(務必遵守)

  1. 隱私邊界:本 repo 只含通用工具,絕不可把使用者的 Gem 或知識檔上傳到任何 git/公開位置。使用者資料只在本機讀取。
  2. 唯讀原始 Gem:不可修改 Gemini Gems 原始資料夾。
  3. 同意閘門:每次「安裝軟體 / 讀私密資料 / 寫檔 / 推 git」前,先說明再等使用者點頭。

你要依序執行的流程

  1. 讀 rubric.md(決策大腦)與本檔。
  2. 環境偵測:python scripts/detect_env.py → 取得 OS / 語言 / 已裝工具。
  3. 裝 Drive App:若使用者尚未安裝 Google Drive 桌面版,依其 OS 引導安裝。
  4. 定位 Gem 資料夾:python scripts/find_gem_folder.py → 找到 Gemini Gems。
  5. 解析 Gem:python scripts/parse_gem.py --folder "<Gem 資料夾>" → 得到每個 Gem 的 {name, instructions, knowledge_refs}(唯讀)。
  6. 分類 + 評估:依 rubric.md 的 6 分類與升級價值,給每個 Gem 升級建議(含「10 變 1 合併」「對照已有 skill」兩洞察)。
  7. 判斷相依:對照 deps_matrix.md,偵測缺什麼工具,確認後才安裝。
  8. 建 project:用 templates/ 在使用者硬碟建一個升級版 project(標準骨架)。
  9. 煙霧測試:產出後跑一次確認可動。
  10. 生圖 adapter:依當前 agent 套用 adapters/(Antigravity→Nano Banana Pro/ChatGPT App(原 Codex)→內建 imagegen/Claude·OpenCode→API)。
  11. 升全域?:詢問是否把 skill 升級為全域,確認後依 agent 安裝。
  12. 記錄狀態:更新 migration_state.json,可續跑、不重複。

給使用者的開場(建議)

先自我介紹、說明會做什麼、強調隱私原則,並請使用者確認可以開始。

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. 2mo ago Changed · +7 tokens per session 1686cb74551b
  2. 2mo ago First seen · 27 lines · 703 tokens per session scan A de412326fc4b

Subscribe to this mod's changes

gem-to-agent-kit AGENTS.md is an instructions file published in the GitHub repository mathruffian-dot/gem-to-agent-kit (21 stars, last pushed 2mo ago), licensed MIT. It adds 710 tokens to every session, about $0.0028 per session on Opus 5.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.

Related

gem-to-agent-kit AGENTS.md compared with instructions from other repositories

gem-to-agent-kit AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gem-to-agent-kit AGENTS.mdmathruffian-dot/gem-to-agent-kitInstructions file212mo agoMITA710Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode