aseprite-mcp: Instructions file for Codex

AGENTS.md

aseprite-mcp AGENTS.md is an instructions file for Codex, OpenCode from letsagents/aseprite-mcp. It costs 3,031 tokens per session, scanned A, original, MIT.

Repository instructions for maintaining aseprite-mcp, a TypeScript server that lets AI clients control Aseprite, a pixel-art editor, through 76 tools. The instructions describe its commands, architecture, data flow, and coding rules.

In plain words
What is it for?
Use them when installing, building, testing, type-checking, debugging, or extending aseprite-mcp and its Lua-script and Aseprite command-line integration.
Why use it?
They give coding agents the project-specific context needed to change the code without breaking its build, tests, tool flow, or Aseprite integration.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is letsagents/aseprite-mcp's own configuration. It tells Codex and OpenCode how to work on aseprite-mcp 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 aseprite-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to letsagents/aseprite-mcp. 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/letsagents/aseprite-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/letsagents/aseprite-mcp

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 aseprite-mcp AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/letsagents/aseprite-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/letsagents/aseprite-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,031 This file is loaded in full into every session.
When invoked 3,031 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.03031 $0.03031
Opus 5.5 $0.01212 $0.01212
Sonnet 5.5 $0.00606 $0.00606
Haiku 4.5 $0.00303 $0.00303

Measured 2mo ago against content hash 55f831a990f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

aseprite-mcp 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 2mo 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 · 138 lines

How it starts

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

AGENTS.md — 跨工具项目指令(给 AI 助手)

本项目是 aseprite-mcp:一个用 TypeScript 编写的 Aseprite MCP(Model Context Protocol)server。它把 Aseprite 以 76 个工具的形式暴露给 LLM 客户端,通过生成 Lua 脚本 + headless 调用 Aseprite -b --script 来驱动 Aseprite。你(AI 助手)在这个项目里改代码时,遵守本文件。

本文件是跨工具指令(Codex / Cursor / Copilot / Gemini 等共用同一份);Claude Code 经 CLAUDE.md 的 @AGENTS.md import 读到全文。本文件给后续 AI(或人)在本仓库内开发、维护、扩展时作指引:架构约定 + 红线 + 速查,不是教程。


常用命令

npm install            # 安装依赖
npm run build          # tsc -p tsconfig.build.json → dist/(不含测试)
npm run dev            # tsx src/index.ts 直接运行(无需先 build)
npm start              # node dist/index.js 运行编译产物
npm test               # node:test 跑全部 *.test.ts
npm run typecheck      # tsc --noEmit 全量类型检查

若自动探测(--aseprite-path > env ASEPRITE_PATH > PATH 搜索 > Windows 默认位置,见 src/aseprite/path.ts)找不到 Aseprite,需显式指定:

ASEPRITE_PATH="/path/to/your/Aseprite.exe" npm start

架构与数据流

一次工具调用的完整链路:

MCP 客户端请求
  → SDK 高阶 API(McpServer,zod 校验参数)
  → tools/<域>.ts 的 handler
  → lua/emit/<域>.ts 生成 Lua 字符串(纯函数,不碰 IO)
  → Ctx.run(lua)
  → aseprite/cli.ts 的 AsepriteRunner:写临时 .lua → spawn Aseprite -b --script → 收 stdout
  → classify(按 stdout 末尾 __SCRIPT_OK__/__SCRIPT_ERROR__ 标记清洗成 RunOutcome)
  → handler 把 RunOutcome 包成 ToolOutcome { isError, text }
  → SDK 回 MCP 响应

分层(依赖严格单向,自底向上):

层 文件 职责
核心 error.ts runner.ts context.ts 错误类型、LuaRunner 接口、Ctx(runner + verbose)
桥接 aseprite/path.ts aseprite/cli.ts Aseprite 定位、spawn + xpcall wrapper + classify
Lua 工具 lua/color.ts lua/escape.ts hex 解析、Lua 字符串转义
Lua 生成 lua/emit/*.ts(+ shared.ts) 每个工具一段 Lua 代码生成(纯字符串拼接)
工具注册 tools/*.ts(+ shared.ts index.ts) zod schema + handler + register
接线 server.ts index.ts 装配 McpServer(工具 + resource + prompt)、CLI、stdio

关键约定(改代码前必读)

工具的三段式结构

tools/ 下每个域文件对每个工具导出三样(命名 <toolName> 用 snake_case 工具名转 camelCase,如 draw_circle → drawCircle):

Read the full file on GitHub · 138 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. 2mo ago First seen · 138 lines · 3,031 tokens per session scan A 55f831a990f3

Subscribe to this mod's changes

aseprite-mcp AGENTS.md is an instructions file published in the GitHub repository letsagents/aseprite-mcp (0 stars, last pushed 3mo ago), licensed MIT. It adds 3,031 tokens to every session, about $0.0121 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-31.

Related

aseprite-mcp AGENTS.md compared with instructions from other repositories

aseprite-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
aseprite-mcp AGENTS.mdletsagents/aseprite-mcpInstructions file03mo agoMITA3,031Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot