Borrowing it
Nothing to install: this file belongs to lidge-jun/ima2-gen. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/lidge-jun/ima2-gen/main/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/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.
<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="Reviewed on agentmods" width="80" 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.1 | $0.01773 | $0.01773 |
| Opus 5.5 | $0.00709 | $0.00709 |
| Sonnet 5.5 | $0.00355 | $0.00355 |
| Haiku 4.5 | $0.00177 | $0.00177 |
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 1mo 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 — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ima2-gen — AI Context
| Contract | Value |
|---|---|
| Node engine | >=22 |
| npm toolchain | [email protected] |
| Release Node | 24.17.0 |
| CLI entry | bin/ima2.js |
| OpenAI SDK | ^7.4.0 |
| Express | ^5.1.0 |
Runtime installation metadata is generated from package.json and .node-version; source TypeScript users must build before running emitted JavaScript.
What This Project Does
Local image generation studio — 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 ES Module; package engine is shown in the generated table above
- Server: Express 5
- API Client: OpenAI SDK range is rendered in the runtime-install contract above
- OAuth: openai-oauth (ChatGPT 세션 프록시)
- Grok: xAI OAuth (device code) 또는 API key, api.x.ai 직접 호출
- 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
└── 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.
- 1mo ago Changed · +20 lines · +361 tokens per session dfd8d2ea3825
- 1mo ago Changed · +8 tokens per session 61f0fc75dc99
- 1mo ago Changed · +36 tokens per session 98317bc567a7
- 2mo ago Changed · +13 lines · +133 tokens per session b1c1759b14f8
- 2mo 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 (782 stars, last pushed 1mo ago), licensed MIT. It adds 1,773 tokens to every session, about $0.0071 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.
ima2-gen AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ima2-gen AGENTS.mdlidge-jun/ima2-gen | Instructions file | 782 | 1mo ago | MIT | A | 1,773 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |