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.
npx agentmods add instructions/zdoss/herolink/agents-mdgit clone --depth 1 https://github.com/ZDOSS/HeroLinkWrote 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/zdoss/herolink/agents-md)<a href="https://agentmods.dev/instructions/zdoss/herolink/agents-md"><img src="https://agentmods.dev/badge/instructions/zdoss/herolink/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 | $0.02455 | $0.02455 |
| Opus 5 | $0.01228 | $0.01228 |
| Sonnet 5 | $0.00491 | $0.00491 |
| Haiku 4.5 | $0.00246 | $0.00246 |
Grade A, and why
HeroLink AGENTS.md scanned grade A with 1 finding 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 3d 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
u. NEVER replace `shell: true` with `npx.cmd` on Windows in child_process How it starts
The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Operating Rules
HARD INVARIANTS (do not violate):
- Only src/mutate/apply.ts writes to the project's data/ or js/. No other file performs writes.
- No tool writes to disk without: passing whole-changeset validation, a clean staleness check, a backup of every touched file, and an atomic temp+rename write. Apply is all-or-nothing.
- Resolve every path and assert it is inside the project root (post-realpath). Reject .. and symlink escapes.
- Never write to stdout. All logs go to stderr. No console.log in src/.
- Treat data shapes as reference baselines; the official docs and the fixture project are ground truth. If they disagree with the spec, fix the schema, not the data.
- Never execute or eval a damage formula, note value, or any project string.
- Do not author raw event-command arrays. Use the constrained command builder only.
- If a referenced id/file/path is missing, fail with a typed error. Never substitute or guess.
- Build in version order. A tool is not done until it has the tests required by §14.5.
- When genuinely unsure, stop and ask — do not invent behavior or game content.
- NEVER push directly to main. All changes go through a feature branch with a PR that gets reviewed (by Greptile or a human) before merging.
STATE MANAGEMENT (critical for MCP server correctness): 12. The MCP server holds a single Project instance across all tool calls in a session. After ANY operation that modifies files (apply, rollback), you MUST call reloadModel() to refresh both fileSnapshots and entity data. Stale in-memory state causes duplicate IDs and false staleness errors. 13. ALL disk writes must use atomic operations (writeFileAtomic.sync or equivalent). This includes journal writes, staging writes, and any other persistent state. Non-atomic writes can corrupt state on crash, breaking future operations. 14. Before implementing any feature, trace through the full lifecycle: What happens when this is called multiple times in the same session? What state persists between calls? What needs to be refreshed? Document these assumptions in code comments.
TESTING REQUIREMENTS (beyond §14.5): 15. Tests must verify multi-operation scenarios, not just single operations. For mutation tools, test: - Multiple applies in the same session (verify IDs are unique and sequential) - Apply → rollback → apply (verify no stale state errors) - Chained rollbacks (verify correct transaction unwinding) 16. Tests must assert correctness, not just success. Don't just check "no error thrown" — verify: - ID uniqueness across multiple creates - Sequential ID assignment - Correct state after rollback - File contents match expectations 17. When fixing a bug, add a test that reproduces the bug BEFORE fixing it. This ensures the bug doesn't regress and documents the failure mode for future developers.
CODE REVIEW CHECKLIST (before committing): 18. For every file write: Is it atomic? Does it handle crashes gracefully? 19. For every in-memory cache/snapshot: Is it refreshed after operations that change the underlying data? 20. For every tool: Does it work correctly when called multiple times in the same session? 21. For every test: Does it assert the right things, or just check that no error was thrown?
RPG MAKER MV SPECIFIC RULES: 22. ESM ONLY: This is an ESM project. Never use require(). Always use import statements. If you need dynamic imports, use await import(). 23. VERIFY OPCODES: When implementing event commands, verify the opcode number against the RPG Maker MV source code or official documentation. Do not guess. Common opcodes: - Show Text: 101 (setup) + 401 (lines) - Control Switches: 121 - Control Variables: 122 - Conditional Branch: 111 (NOT 400) - Comment: 108 (first line) + 408 (continuation) - Terminator: 0 24. CURSOR ADVANCEMENT: When allocating IDs (entities, map events, etc.), you MUST advance the cursor after each allocation. Pattern: nextIds.set(type, id + 1) or mapEventIds.set(mapId, [...ids, newId]). Failure to advance causes duplicate IDs. 25. CONSISTENT PATH HANDLING: Use getRelPath(file, projectDir) consistently across all files. Never use split("/").slice(-2).join("/") or similar heuristics. This breaks for nested paths. 26. COMPLETE DIFF OUTPUT: When implementing diff/preview tools, include ALL write plan types (jsonPatch, pluginConfig, pluginFile). Do not silently omit any changes. Users need to see the complete picture before applying.
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.
- 3d ago First seen · 160 lines · 2,455 tokens per session scan A 3019216cc86b
HeroLink AGENTS.md is an instructions file published in the GitHub repository ZDOSS/HeroLink (2 stars, last pushed 2mo ago), licensed MIT. It adds 2,455 tokens to every session, about $0.0123 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
GameDesignOS AGENTS.md
Instructions for DY-2026/GameDesignOS, covering gamedesignos agent 入口, 默认接法, agent 执行规则, 什么时候用整个项目 and 每个 skill 单独怎么用.
claudemon CLAUDE.md
Instructions for zamarrowski/claudemon, covering ai agent guidelines, project shape, general guidelines, general rules and guards & defensive code.
unity-code-style-guide AGENTS.md
Instructions for krogh-jacobsen/unity-code-style-guide, covering agents.md — unity 6 c, project setup — edit this block, never do these — they corrupt the project, deprecated in unity 6 and if you read nothing else.
nes-php-glfw copilot-instructions.md
Instructions for oliverearl/nes-php-glfw, covering github copilot development guidelines for nes emulator, agent document source of truth, project overview, code style & standards and documentation.
game-and-watch-retro-go-sd CLAUDE.md
Claude Code instructions for sylverb/game-and-watch-retro-go-sd, covering claude.md, what this project is, build / flash workflow, architecture and three storage tiers, one elf.
Cities2-MCP AGENTS.md
Instructions for mayor-modder/Cities2-MCP, covering agent rules, workspace safety, commit and pr safety, public-facing writing and merge and release gates.