aseprite-mcp 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

Install

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.

agentmods
npx agentmods add instructions/letsagents/aseprite-mcp/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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.03031 $0.03031
Opus 5 $0.01515 $0.01515
Sonnet 5 $0.00606 $0.00606
Haiku 4.5 $0.00303 $0.00303

Measured 2d ago against content hash 55f831a990f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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_circledrawCircle):

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. 2d 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 22d ago), licensed MIT. It adds 3,031 tokens to every session, about $0.0152 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-31.

Related

Other instructions, from other repositories

pixellab-pip GEMINI.md

Instructions for Shilo/pixellab-pip: Use PixelLab Pip when the user asks about PixelLab asset generation, editing, animation, MCP setup, REST v2 integration, website/editor workflows, Aseprite, Pixelorama, legacy v1, bearer-token auth, endpoint choice, SDK coverage, or PixelLab docs.

Shilo/pixellab-pip · 155 tokens

pixellab-pip AGENTS.md

Instructions for Shilo/pixellab-pip: PixelLab Pip is an unofficial, agent-agnostic PixelLab workflow router shipped as a portable Agent Skill. It teaches coding agents to choose between documented PixelLab MCP tools, REST v2 endpoints, website/editor fallback, Aseprite, Pixelorama, and local asset assembly. The…

Shilo/pixellab-pip · 779 tokens

ase-deliver AGENTS.md

AGENTS.md instructions for ylty1516/ase-deliver, covering asedeliver — contract for any ai, what this tool is, do this, in order, templates and hard visual rules.

ylty1516/ase-deliver · 980 tokens

pixel-plugin CLAUDE.md

Instructions for willibrandon/pixel-plugin, covering claude.md, project overview, architecture, directory structure and plugin component specifications.

willibrandon/pixel-plugin · 2,199 tokens

ase-deliver CLAUDE.md

Claude Code instructions for ylty1516/ase-deliver: Follow AGENTS.md. Compile sprites with python -m asedeliver. The deliverable is always out/ .aseprite.

ylty1516/ase-deliver · 35 tokens

pixel-mcp CLAUDE.md

Instructions for willibrandon/pixel-mcp, covering claude.md, project overview, build commands, build the server binary and or: go build -o bin/pixel-mcp ./cmd/pixel-mcp.

willibrandon/pixel-mcp · 2,726 tokens