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.
Borrowing it
Nothing to install: this file belongs to CookSleep/gpt_image_playground. 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/CookSleep/gpt_image_playground/main/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/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/cooksleep/gpt_image_playground/agents-md"><img src="https://agentmods.dev/badge/instructions/cooksleep/gpt_image_playground/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.03307 | $0.03307 |
| Opus 5.5 | $0.01323 | $0.01323 |
| Sonnet 5.5 | $0.00661 | $0.00661 |
| Haiku 4.5 | $0.00331 | $0.00331 |
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 2d 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 — 204 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 |
生成第三方许可清单(需要先安装 cargo-about:cargo install cargo-about --version 0.9.2 --locked --features cli) |
npm run notices |
- 测试使用 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.
- 2d ago Changed · +2 tokens per session 628c02c42196
- 11d ago Changed · +1 lines · +34 tokens per session 1fc79e267ef1
- 14d ago Changed · +8 lines · +466 tokens per session 4023c9e5a83f
- 26d ago Changed · +5 lines · +584 tokens per session a4e6cf0dcdbc
- 1mo ago Changed · +1 lines · +90 tokens per session 40bda823b1d8
- 2mo 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 (4,035 stars, last pushed yesterday), licensed MIT. It adds 3,307 tokens to every session, about $0.0132 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.
gpt_image_playground AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| gpt_image_playground AGENTS.mdCookSleep/gpt_image_playground | Instructions file | 4.0k | yesterday | MIT | A | 3,307 | 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 | today | 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 |