GPT Image Playground is a web application for generating and editing images through the OpenAI gpt-image-2 API and compatible image providers. Users can create images from text, edit them with reference images and masks, and manage their history and settings locally. The catalogue includes an instruction for working with the application.
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/cooksleep/gpt_image_playground/agents-mdgit clone --depth 1 https://github.com/CookSleep/gpt_image_playgroundWrote 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/cooksleep/gpt_image_playground/agents-md)<a href="https://agentmods.dev/instructions/cooksleep/gpt_image_playground/agents-md"><img src="https://agentmods.dev/badge/instructions/cooksleep/gpt_image_playground/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.02131 | $0.02131 |
| Opus 5 | $0.01066 | $0.01066 |
| Sonnet 5 | $0.00426 | $0.00426 |
| Haiku 4.5 | $0.00213 | $0.00213 |
Grade A, and why
gpt_image_playground 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 5d 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 — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Instructions for gpt-image-playground
本文件定义 AI 编码助手在此仓库中应遵循的工作方式。
项目概况
- React 19 + Vite + TypeScript 前端应用,使用 Zustand 状态管理、Tailwind CSS 样式。
- 源码在
src/,构建产物由 Vite 生成,不要手动编辑dist/。 - 包管理器为 npm(有
package-lock.json),不要使用 yarn 或 pnpm。
常用命令
| 操作 | 命令 |
|---|---|
| 安装依赖 | npm install |
| 开发服务器 | npm run dev |
| 构建 | npm run build |
| 运行测试 | npm test |
| 监听测试 | npm run test:watch |
- 测试使用 Vitest,已有多个
*.test.ts文件。 - 不要新增 lint/formatter 配置文件,除非明确要求。
代码风格(强制)
简单优先
写出能工作的最简代码。少抽象、少包装。有疑问就内联。
- 不要为单次使用的 1-5 行逻辑创建独立函数,直接内联。
- 函数只有在多处调用且逻辑非平凡时才值得提取。
- 不要引入项目中不存在的设计模式或架构层。
完整实现
- 不要留
// TODO: implement later、// ...或 stub 函数。 - 如果不确定某个细节,给出完整的最佳猜测实现。错误但完整的代码优于正确但残缺的骨架。
跟随现有风格
这是最高优先级规则。修改文件时,遵循该文件及周围代码的已有风格。
格式
- 2 空格缩进。
- 单引号(
'hello')。 - 无分号。
- 箭头函数始终加括号:
(x) => x。 - 行宽不做硬性限制,但尽量保持可读。
TypeScript
- 使用 ESM import,
const优先,永远不用var。 - Target
ES2020(见tsconfig.json)。 - 优先早返回,避免深层嵌套和
else链。 - 尽量避免
any;需要时保持局部化。 - 利用类型推断,不写多余的类型注解。
- 共享类型放
src/types.ts,局部类型放文件顶部。
命名
- PascalCase:组件、类型、接口。
- camelCase:函数、变量、参数。
- UPPER_SNAKE_CASE:模块级常量。
- 文件名小写驼峰:
apiProfiles.ts、maskPreprocess.ts。 - 局部变量优先短名:
ctx、el、msg、idx、opts、err。多词名仅在单词不够清晰时使用。
解构
避免无必要的解构。优先点号访问以保留上下文。
// 好
profile.baseUrl
opts.settings
// 避免
const { baseUrl } = profile
const { settings } = opts
例外:React 组件 props、hooks 返回值、函数参数解构是可以的。
控制流
// 好:早返回
function getPreset(name: string) {
if (!name) return defaultPreset
return presets.find((p) => p.name === name)
}
// 避免:多余的 else
function getPreset(name: string) {
if (!name) return defaultPreset
else return presets.find((p) => p.name === name)
}
变量
优先 const,用三元或早返回代替 let 重赋值。
// 好
const params = hasInputImages
? { ...baseParams, image: inputImages }
: baseParams
// 避免
let params
if (hasInputImages) params = { ...baseParams, image: inputImages }
else params = baseParams
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.
- 5d ago First seen · 189 lines · 2,131 tokens per session scan A b98d4035fcd6
gpt_image_playground AGENTS.md is an instructions file published in the GitHub repository CookSleep/gpt_image_playground (3,611 stars, last pushed today), licensed MIT. It adds 2,131 tokens to every session, about $0.0107 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.
gpt-image-1-mcp CLAUDE.md
Claude Code instructions for naporin0624/gpt-image-1-mcp, covering claude.md, project overview, development commands, install dependencies and development.
magicui AGENTS.md
AGENTS.md instructions for magicuidesign/magicui, covering project context, key principles, before writing code, rules and accessibility (a11y).
openagent CLAUDE.md
Claude Code instructions for the-open-agent/openagent, covering claude.md, commands, architecture, backend (go / beego) and frontend (react).
ui-components AGENTS.md
AGENTS.md instructions for starc007/ui-components, covering beui v2 — agent guide, commands, layout, component catalog and components (motion category — primitives).
ima2-gen AGENTS.md
AGENTS.md instructions for lidge-jun/ima2-gen, covering ima2-gen — ai context, what this project does, tech stack, project structure and agent skills (packaged).