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.
npx agentmods add instructions/lidge-jun/ima2-gen/agents-mdgit clone --depth 1 https://github.com/lidge-jun/ima2-genWrote 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.
[](https://agentmods.dev/instructions/lidge-jun/ima2-gen/agents-md)<a href="https://agentmods.dev/instructions/lidge-jun/ima2-gen/agents-md"><img src="https://agentmods.dev/badge/instructions/lidge-jun/ima2-gen/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01235 | $0.01235 |
| Opus 5 | $0.00617 | $0.00617 |
| Sonnet 5 | $0.00247 | $0.00247 |
| Haiku 4.5 | $0.00123 | $0.00123 |
Grade A, and why
ima2-gen 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ima2-gen — AI Context
What This Project Does
Local image generation studio (v2.x) — CLI + 웹 UI
- GPT OAuth, API Key, Grok, Gemini API, Antigravity CLI 다중 provider 지원
- 텍스트→이미지, 이미지→이미지(편집), 비디오 생성
- SSE 멀티플렉싱: 단일
GET /api/eventsSSE 채널 + async POST (202) 아키텍처 - 병렬 생성 (최대 12건, 브라우저 연결 포화 없음)
Tech Stack
- Runtime: Node.js >=20 (ES Module)
- Server: Express 5
- API Client: OpenAI SDK v5
- OAuth: openai-oauth (ChatGPT 세션 프록시)
- Grok: bundled progrok (xAI Images API)
- Gemini: Google Generative Language API / Vertex AI
- Frontend: React + Vite (
ui/src, built toui/dist) - SSE: lib/eventBus.ts (ring buffer pub/sub) + routes/events.ts
Project Structure
ima2-gen/
├── bin/ # CLI entry + subcommands
├── server.ts # Express bootstrap / static UI serving
├── config.ts # Runtime config
├── routes/ # API route modules (*.ts source)
│ ├── events.ts # GET /api/events SSE multiplexing
│ ├── multimode.ts # Multimode batch (async POST + dual-emit)
│ ├── nodes.ts # Node mode (async POST + dual-emit)
│ ├── video.ts # Video generation (async POST + dual-emit)
│ └── ... # generate, edit, sessions, history, etc.
├── lib/ # Server helpers (*.ts source)
│ ├── eventBus.ts # Global pub/sub ring buffer (2000 events)
│ ├── ssePublish.ts # Cancel-done race guard
│ ├── inflight.ts # Job lifecycle tracking
│ └── ... # OAuth, storage, sessions, etc.
├── ui/src/ # React/Vite app source
│ ├── lib/eventChannel.ts # Singleton EventSource for /api/events
│ ├── lib/sseStreamError.ts # SSE error parser
│ └── store/store*Impl.ts # Modular Zustand slices
├── ui/dist/ # Built frontend served by server.js
├── site/ # Astro marketing/docs site (GitHub Pages)
├── integrations/comfyui/ # ComfyUI bridge/custom node
├── structure/ # Current architecture reference docs (00-07)
├── devlog/ # _plan (active), _fin (archived)
├── tests/ # node:test contracts/regressions (1094 cases)
└── package.json
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.
- 4d ago First seen · 101 lines · 1,235 tokens per session scan A 672c0f5a08c9
ima2-gen AGENTS.md is an instructions file published in the GitHub repository lidge-jun/ima2-gen (722 stars, last pushed 4d ago), licensed MIT. It adds 1,235 tokens to every session, about $0.0062 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.
Other instructions, from other repositories
image-gen-mcp AGENTS.md
Instructions for simonChoi034/image-gen-mcp, covering repository guidelines, project structure & module organization, build, test, and development commands, coding style & naming conventions and no inline imports.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
CLIProxyAPI AGENTS.md
AGENTS.md instructions for router-for-me/CLIProxyAPI, covering agents.md, repository, commands, config and architecture.
gpt_image_playground AGENTS.md
AGENTS.md instructions for CookSleep/gpt_image_playground, covering agent instructions for gpt-image-playground, 项目概况, 常用命令, 代码风格(强制) and 简单优先.
neo-chat AGENTS.md
AGENTS.md instructions for u14app/neo-chat, covering repository guidelines, project structure & module organization, build, test, and development commands, coding style & naming conventions and testing guidelines.
proxypal AGENTS.md
Instructions for heyhuynhgiabuu/proxypal, covering proxypal, stack, structure, commands and code style.