indesign-cli AGENTS.md

indesign-cli AGENTS.md is an instructions file for Codex, OpenCode from zhanglongxiao111/indesign-cli. It costs 6,206 tokens per session, scanned A, original, MIT.

A project guide for AI agents working on indesign-cli, a command-line tool that controls Adobe InDesign through an external plugin. It explains the architecture, source-of-truth rules, testing expectations, and documentation order.

In plain words
What is it for?
Use it when developing or reviewing the CLI, its tool handlers, plugin protocol, InDesign execution layer, documentation, or tool registry.
Why use it?
It helps agents understand the existing system before changing it, so they reuse current tools and mappings instead of creating duplicate implementations.

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/zhanglongxiao111/indesign-cli/agents-md
Clone the repo
git clone --depth 1 https://github.com/zhanglongxiao111/indesign-cli

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 indesign-cli AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zhanglongxiao111/indesign-cli/agents-md.svg)](https://agentmods.dev/instructions/zhanglongxiao111/indesign-cli/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/zhanglongxiao111/indesign-cli/agents-md"><img src="https://agentmods.dev/badge/instructions/zhanglongxiao111/indesign-cli/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 6,206 This file is loaded in full into every session.
When invoked 6,206 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.06206 $0.06206
Opus 5 $0.03103 $0.03103
Sonnet 5 $0.01241 $0.01241
Haiku 4.5 $0.00621 $0.00621

Measured 4d ago against content hash 782074bb2d42, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

indesign-cli 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 4d 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 · 279 lines

How it starts

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

AGENTS 主入口

0. 设计原则

  • 先理解现状,再动手。 先读代码、工具定义、测试和当前文档,避免凭旧印象改项目。
  • 收口优先。 能复用现有 coretoolsutils 时,不新增平行实现。
  • CLI 复用现有能力。 CLI 是面向 Agent 的按需入口,不重写一套 InDesign 自动化。
  • HTML 转 InDesign 在外部插件仓库实现。 本仓库只维护 indesign-cli 宿主、插件协议和 InDesign 执行底座。
  • 不要把 internal 工具当死代码。 终态代码以空 profiles 表示 internal,并投影为 CLI source: hidden_handler;先查 registry、artifact、CLI 工具目录、测试和文档后再决定是否公开或删除。
  • 文档按用途归档。 长期规范、方案、计划、排查、复盘分开放,避免一个目录堆成垃圾场。
  • 历史资料只追溯。 当前开发以代码、AGENTS.md 和当前文档为准。

0.1 架构治理原则

  • SSOT(Single Source of Truth):工具名、schema、handler 映射、CLI 展示 id、文档目录入口必须尽量只有一个权威来源;新增第二份映射前必须说明同步机制。
  • SRP(Single Responsibility Principle):模块按职责拆分;handler 只做参数处理、脚本拼装、执行和响应包装,不承载新的业务框架。
  • DRY(Don't Repeat Yourself):重复的工具映射、响应包装、脚本执行、schema 投影应收口到共享层;但不要为了消除少量重复引入难懂抽象。
  • YAGNI(You Aren't Gonna Need It):没有当前需求、测试入口或明确计划支撑的能力不提前实现。
  • KISS(Keep It Simple, Stupid):优先选择能被当前代码、测试和文档直接解释的简单结构;复杂机制必须解决真实复杂度。

1. 真相顺序

优先级 依据 用法
1 当前用户指令 本轮任务的最高优先级
2 AGENTS.md 项目级协作入口、硬规则、目录规范
3 当前代码 校正文档、工具映射和行为判断的最终依据
4 docs/README.md 与当前 docs/ 文档目录、当前说明、方案和记录
5 docs/legacy/ 只追溯历史,不作为当前规范
6 Git 历史 需要恢复旧内容时才查看

冲突处理:

冲突类型 处理方式
文档与代码不一致 以代码为准,顺手修正文档
当前文档与历史文档不一致 以当前文档为准
MCP 暴露工具与 registry / artifact 不一致 src/tools/index.jssrc/core/indesign-tool-registry.json 为准,先判断是否是 internal 工具
CLI 目标与 MCP 现状不一致 让 CLI 复用现有执行链路,避免重写业务能力
HTML 插件需求与 CLI 宿主不一致 先判断是否属于插件协议或 host action 边界;不要把 HTML 转换实现塞回本仓库

2. 强制规则

2.1 沟通规则

  • 与用户沟通使用中文,短句,直接说结论。
  • 文件名、命令、工具名、API 名保留原文,并用代码样式标出。
  • 不重复解释同一件事;已确认的项目口径直接执行。

2.2 文档治理

  • AGENTS.md 是唯一项目级总入口,不新增第二个总导航。
  • docs/README.md 是文档目录入口,新增长期文档前先查它。
  • 本项目不建立大体量项目上下文目录;当前规模直接靠 AGENTS.md、代码和专项文档维护上下文。
  • 中文文档统一使用 UTF-8
  • 根目录 docs/*.md 只保留跨主题、当前仍有用的说明文档。
  • 新增专题文档必须进入对应子目录,不在 docs/ 根目录随手堆文件。
  • 方案设计放 docs/superpowers/specs/,实施计划放 docs/superpowers/plans/
  • 已落地并需要长期遵守的结论,沉淀到 docs/技术决策/ 或更新相关当前文档。
  • 本地 Agent 任务、外部咨询、用户反馈等过程材料放 docs/AI协作/,具体分层以 docs/AI协作/README.md 为准。
  • 复杂缺陷修复记录放 docs/bugfix/
  • 当前有效 review 和复盘放 docs/review/;历史材料放 docs/legacy/

Read the full file on GitHub · 279 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. 4d ago First seen · 279 lines · 6,206 tokens per session scan A 782074bb2d42

Subscribe to this mod's changes

indesign-cli AGENTS.md is an instructions file published in the GitHub repository zhanglongxiao111/indesign-cli (42 stars, last pushed 15d ago), licensed MIT. It adds 6,206 tokens to every session, about $0.0310 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.

Related

Other instructions, from other repositories

photoshop-mcp AGENTS.md

AGENTS.md instructions for alisaitteke/photoshop-mcp, covering agents.md — photoshop-mcp, entry strategy, architecture (agent view), recommended workflow and tool selection.

alisaitteke/photoshop-mcp · 1,276 tokens

premiere-pro-mcp copilot-instructions.md

Instructions for leancoderkavy/premiere-pro-mcp, covering github copilot repository instructions, project and architecture, development workflow, implementation rules and testing and review expectations.

leancoderkavy/premiere-pro-mcp · 653 tokens

after-effects-mcp AGENTS.md

Instructions for JUNKDOGE-JOE/after-effects-mcp, covering repository development and delivery rules, 0.0 read the current architecture direction first, 0. user authorization is the scope boundary, 1. measure outcomes, not activity and 2. prioritize by dependency and user value.

JUNKDOGE-JOE/after-effects-mcp · 6,738 tokens

after-effects-mcp CLAUDE.md

Instructions for Engine-Room-Games/after-effects-mcp, covering claude development guide — after-effects-mcp, what this project is, how the pieces talk, source layout and the op pipeline (in detail).

Engine-Room-Games/after-effects-mcp · 13,075 tokens

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).

microsoft/vscode · 6,785 tokens

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.

github/spec-kit · 7,104 tokens