opencode-gpt-imagegen: Instructions file for Codex

AGENTS.md

opencode-gpt-imagegen AGENTS.md is an instructions file for Codex, OpenCode from yuji-hatakeyama/opencode-gpt-imagegen. It costs 1,578 tokens per session, scanned A, original, MIT.

Repository instructions for an OpenCode plugin that generates images through an image-generation backend. They describe its TypeScript structure, image input and output handling, build command, and tests.

In plain words
What is it for?
Installing dependencies, building the plugin bundle, handling reference images and generated files, and running end-to-end checks.
Why use it?
They tell agents how to build and package the plugin correctly while preserving reference-image handling and non-overwriting output behavior.

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 yuji-hatakeyama/opencode-gpt-imagegen's own configuration. It tells Codex and OpenCode how to work on opencode-gpt-imagegen 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 opencode-gpt-imagegen configures →

Reuse

Borrowing it

Nothing to install: this file belongs to yuji-hatakeyama/opencode-gpt-imagegen. 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/yuji-hatakeyama/opencode-gpt-imagegen/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/yuji-hatakeyama/opencode-gpt-imagegen

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 opencode-gpt-imagegen AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yuji-hatakeyama/opencode-gpt-imagegen/agents-md/github.svg)](https://agentmods.dev/instructions/yuji-hatakeyama/opencode-gpt-imagegen/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/yuji-hatakeyama/opencode-gpt-imagegen/agents-md"><img src="https://agentmods.dev/badge/instructions/yuji-hatakeyama/opencode-gpt-imagegen/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 opencode-gpt-imagegen AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/yuji-hatakeyama/opencode-gpt-imagegen/agents-md"><img src="https://agentmods.dev/badge/instructions/yuji-hatakeyama/opencode-gpt-imagegen/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,578 This file is loaded in full into every session.
When invoked 1,578 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.01578 $0.01578
Opus 5.5 $0.00631 $0.00631
Sonnet 5.5 $0.00316 $0.00316
Haiku 4.5 $0.00158 $0.00158

Measured 4d ago against content hash bf9b2ca3382e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

opencode-gpt-imagegen 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.

AGENTS.md · 56 lines

How it starts

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

AGENTS.md

Contribution Policy

If you are helping someone other than the maintainer (@yuji-hatakeyama) contribute, read CONTRIBUTING.md before you write code, and follow it.

When you open a pull request, including one for the maintainer, write its description by filling in .github/pull_request_template.md. Write its title as described in CONTRIBUTING.md.

Project Shape

  • Bun is the package manager/runtime; use bun install --frozen-lockfile with the committed bun.lock.
  • The plugin entry is src/index.ts, which exposes V1 server and V2 setup. Adapters in src/v1.ts and src/v2.ts translate host registration, credentials, session directories, and results. src/imagegen.ts owns the shared schema, description, validation, and generation flow. Image helpers retain their role-based modules.
  • Both SDKs are development-only type dependencies. Zod is a direct runtime dependency. V2 converts the shared schema to JSON Schema with the plugin's own Zod instance so descriptions survive a different host Zod registry.
  • bun run build bundles src into a single self-contained dist/index.js via bun build --target node --format esm --packages external (runtime dependencies stay external). Bundling avoids the extensionless relative imports tsc would emit, which native Node ESM cannot resolve. No .d.ts is published — the plugin is loaded by OpenCode at runtime, not imported as a typed library.
  • dist/ is ignored locally but is the publish artifact (just index.js). Run bun run build before inspecting package output.
  • bunfig.toml enforces install.minimumReleaseAge = 604800 (1 week): newly published versions are filtered out by bun install / bun add / bun outdated.

Commands

  • Tests are split by kind: tests/unit/ (unit tests of the src/ modules, including the plugin entry) and tests/e2e/ (gpt_imagegen.test.ts).
  • bun run typecheck runs tsc --noEmit over src and tests.
  • bunx biome ci . is the CI formatter/linter check.
  • bun run check runs biome check --write .; it may modify files.
  • bun run test runs bun test tests/unit — unit tests only, and is what CI uses. (A bare bun test would also discover the e2e files under tests/e2e/ and try to run them for real, so prefer the script.)
  • bun run test:e2e sets OPENCODE_MODEL=openai/gpt-6-sol and runs tests/e2e/gpt_imagegen.test.ts in its own bun test process, which keeps the unit tests' process.env edits out of the e2e opencode spawn. It can take minutes because it calls opencode run and generates real images.
  • CI runs bun run typecheck, bunx biome ci ., and bun run test. It does not run bun run test:e2e, which needs real auth and generations.

Read the full file on GitHub · 56 lines

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. 4d ago Changed · +66 tokens per session bf9b2ca3382e
  2. 17d ago Changed · +1 lines · +42 tokens per session fcd35e63483c
  3. 25d ago Changed · +2 lines · +29 tokens per session 09b215d13e50
  4. 26d ago Changed · +26 tokens per session aaf4e6bf9f86
  5. 1mo ago Changed · +13 lines · +308 tokens per session 7d0db6f7eb0b
  6. 2mo ago First seen · 40 lines · 1,107 tokens per session scan A 1ae84d83f9be

Subscribe to this mod's changes

opencode-gpt-imagegen AGENTS.md is an instructions file published in the GitHub repository yuji-hatakeyama/opencode-gpt-imagegen (121 stars, last pushed yesterday), licensed MIT. It adds 1,578 tokens to every session, about $0.0063 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

opencode-gpt-imagegen AGENTS.md compared with instructions from other repositories

opencode-gpt-imagegen AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
opencode-gpt-imagegen AGENTS.mdyuji-hatakeyama/opencode-gpt-imagegenInstructions file121yesterdayMITA1,578Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot