Borrowing it
Nothing to install: this file belongs to ZDOSS/HeroLink. 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/ZDOSS/HeroLink/main/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/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.
<a href="https://agentmods.dev/instructions/zdoss/herolink/agents-md"><img src="https://agentmods.dev/badge/instructions/zdoss/herolink/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.02455 | $0.02455 |
| Opus 5.5 | $0.00982 | $0.00982 |
| Sonnet 5.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 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.
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.
- 2mo 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 (3 stars, last pushed 1mo ago), licensed MIT. It adds 2,455 tokens to every session, about $0.0098 per session on Opus 5.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.
HeroLink AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| HeroLink AGENTS.mdZDOSS/HeroLink | Instructions file | 3 | 1mo ago | MIT | A | 2,455 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |