infinite-canvas is an open-source visual workspace for AI image creation, combining an infinite canvas with image generation, reference-image editing, video generation, chat-based assistance, prompt storage, asset management, and multi-agent workflows. It is for exploring and iterating on visual concepts through a graphical creative process, with access to OpenAI-compatible model services. The catalogue contains skills, an MCP integration, and an instruction for working with the project.
Borrowing it
Nothing to install: this file belongs to basketikun/infinite-canvas. 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/basketikun/infinite-canvas/main/AGENTS.mdgit clone --depth 1 https://github.com/basketikun/infinite-canvasWrote 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/basketikun/infinite-canvas/agents-md)<a href="https://agentmods.dev/instructions/basketikun/infinite-canvas/agents-md"><img src="https://agentmods.dev/badge/instructions/basketikun/infinite-canvas/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.1 | $0.02960 | $0.02960 |
| Opus 5 | $0.01480 | $0.01480 |
| Sonnet 5 | $0.00592 | $0.00592 |
| Haiku 4.5 | $0.00296 | $0.00296 |
Grade A, and why
infinite-canvas 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 7d 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 — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本文档用于约束本项目中的 AI / 自动化开发行为。开发时优先遵循本文件,其次遵循用户当前消息。
基本原则
- 先读现有代码,再动手修改,优先沿用项目已有结构和写法。
- 写代码保持最少行数,能简单实现就不要引入复杂抽象。
- 标准格式、协议、解析、压缩、加密、日期等通用能力优先使用成熟稳定的库,不要手写底层实现,除非用户明确要求或项目已有实现必须沿用。
- 不要为了“兼容更多场景”写大量分支,只实现当前明确需要的功能。
- 项目尚未上线,不需要兼容旧数据;本地存储结构调整时直接按新设计修改,不写旧字段兼容或数据迁移兜底,除非用户明确要求。
- 每次写完代码,不需要检查语法,不需要执行构建,用户会自己做。
- 不要改无关文件,不要顺手重构。
- 如果工作区已有用户改动,不要回滚,不要覆盖;只在必要范围内追加修改。
反复提醒沉淀
- 如果开发过程中总是遇到某个问题,或者用户反复提醒同一个注意事项,需要把该注意事项补充到本文件。
- 补充时写成明确、可执行的规则,避免只写模糊描述。
- 新规则应放到最相关的章节;找不到合适章节时放到“项目注意事项”。
前端规范
- 前端使用 Vite、React、React Router、TypeScript、Ant Design、Tailwind、Zustand。
- 编写 Ant Design 相关代码时,参考 https://ant.design/llms-full.txt 理解组件 API、示例和设计规范,并优先结合项目当前 antd 版本与既有写法。
- 外部服务请求统一放在
web/src/services/api/,由浏览器前端直连,不假设存在项目后端。 - 全局或跨页面状态优先放在
web/src/stores/。 - 已经放在全局 store 或全局 hook 中的状态/动作,组件需要时直接使用对应 store/hook,不要为了“纯组件”层层透传 props;避免一个组件传递过多参数。
- 全局组件、全局常量、全局配置等全局性质的内容不要作为 props 或参数层层传递;哪里需要就在哪里直接从对应全局入口获取。
- 多个页面重复出现的 UI 副作用动作,例如复制文本并提示、下载并提示、统一确认弹窗,优先抽成
web/src/hooks/下的全局 hook;不要放进 store,除非它确实是需要共享/订阅的状态。 - 路由页面放在
web/src/pages/,页面布局放在web/src/layouts/,路由配置放在web/src/router.tsx。 - 画布页面放在
web/src/pages/canvas/,画布组件放在web/src/components/canvas/,画布状态放在web/src/stores/canvas/,画布工具函数放在web/src/lib/canvas/。 - 页面按目录组织,例如
web/src/pages/image/index.tsx;页面里只有一个主业务组件时直接写在对应页面入口中,不要单独拆Manager组件再传一堆 props。 - 不要新增只做简单转发的组件,例如只
return <X>{children}</X>或只换个名字透传 props;直接在使用处使用真实组件或把逻辑写进当前文件。 - 页面私有 hook 放在对应页面目录下,例如
admin/assets/use-admin-assets.ts;只有多个页面真实复用的 hook 才放到外层hooks/。 - 管理后台页面私有组件放到各自页面目录的
components/下,例如admin/assets/components/、admin/prompts/components/;不要为了单页面使用放到admin/components/共享目录。 - 管理后台主题、背景、卡片阴影、表格配色等统一在
web/src/lib/app-theme.ts、AppProviders或必要的全局 CSS 作用域中配置;页面私有组件不要自己写dark ? ...主题分支。 - Ant Design 的 Dropdown、Menu、Select、Cascader、TreeSelect 等弹层背景、悬停态和选中态颜色统一通过
web/src/lib/app-theme.ts的全局 Alias Token 与组件 Token 配置;不要在业务组件内为单个弹层覆盖颜色。 - 组件优先使用函数组件和现有 hooks,不新增大型状态管理方案。
- UI 图标优先使用
lucide-react或项目已经使用的 Ant Design 图标。 - 页面文案保持中文。
- 不要在组件里堆太多无关逻辑;复杂逻辑优先抽成同目录工具函数或小组件。
- 样式优先由组件自己管理;组件私有样式优先使用 Tailwind className 或少量内联 style,不要为单个组件新增大量全局 CSS。
- 全局 CSS 只放基础变量、全局重置、跨页面通用样式和少量第三方组件必要覆盖;不要在
globals.css堆页面私有样式。 - 代码尽量短小直接,少拆不必要组件,少做多层 props 传递,避免为了抽象堆出更多代码。
- 前端业务数据需要浏览器本地持久化时,默认使用
localforage;localStorage只用于极小的简单配置,不要用来保存业务列表、生成记录、图片、base64 或大 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.
- 7d ago First seen · 99 lines · 2,960 tokens per session scan A 156fbe6cf377
infinite-canvas AGENTS.md is an instructions file published in the GitHub repository basketikun/infinite-canvas (6,139 stars, last pushed 3d ago), licensed MIT. It adds 2,960 tokens to every session, about $0.0148 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
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
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.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.