hera-agent-unity AGENTS.md

A repository instruction file for AI agents working in Unity, a tool for building games and interactive applications. It explains project setup, required rules, the hera-agent-unity command-line tool, and how to choose tools.

In plain words
What is it for?
Use it to guide AI agents through Unity project bootstrapping, command selection, and everyday development tasks.
Why use it?
It gives agents the instructions they need from the start, reducing discovery work and helping different coding tools follow the same project guidance.

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/notnull92/hera-agent-unity/agents-md
Clone the repo
git clone --depth 1 https://github.com/NotNull92/hera-agent-unity

Made for: Codex, OpenCode.

Per session 12,675 This file is loaded in full into every session.
When invoked 12,675 The same file — it is already loaded in full.
Security scan C 2 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.12675 $0.12675
Opus 5 $0.06338 $0.06338
Sonnet 5 $0.02535 $0.02535
Haiku 4.5 $0.01268 $0.01268

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

Security

Grade C, and why

hera-agent-unity AGENTS.md scanned grade C with 2 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- `doctor` says binary missing → tell the user to install it (`curl … | sh` or the README link), do not proceed.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `doctor` says binary missing → tell the user to install it (`curl … | sh` or the README link), do not proceed.
AGENTS.md · 809 lines

How it starts

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

hera-agent-unity — Guide for AI Agents

You are an AI coding agent operating in a Unity project that has hera-agent-unity available as a CLI. This document tells you how to use it efficiently. It is meant to be loaded into your project's rules file so every session has it without spending tokens to discover it.

Where to put this content. AGENTS.md at the project root is the canonical cross-tool agent rules file, standardized by the Agentic AI Foundation (AAIF) under the Linux Foundation (Dec 2025) and adopted by 60,000+ open-source repositories. OpenAI Codex, Claude Code, Cursor, GitHub Copilot, Gemini CLI, and 30+ tools read this file by default.

For multi-tool projects, the cleanest pattern is AGENTS.md as the single source of truth plus a one-line stub in tool-specific paths. Tool-specific files only matter when a tool requires a different format (Cursor's .mdc YAML frontmatter is the main case).

Recommended layout — multi-tool projects:

  1. Drop the full guide (or its lean subset) into AGENTS.md at the project root.
  2. For tools that need their own format, drop a short stub that defers to AGENTS.md:
    • CLAUDE.md> See AGENTS.md. (Claude Code reads AGENTS.md natively since late 2025)
    • .cursor/rules/hera-agent-unity.mdc → frontmatter + the same body (Cursor also supports plain AGENTS.md as a fallback)
    • .github/copilot-instructions.md → repository-wide pointer to AGENTS.md (Copilot uses nearest-file precedence; .github/skills/ is for Agent Skills)
    • GEMINI.md + .agents/agents.md + .agents/skills/hera-agent-unity/SKILL.md → AntiGravity project entry + workspace handoff + on-demand skill
    • .continuerules → identical body

Per-tool target paths (2026-current):

Tool Canonical path Notes
OpenAI Codex / AGENTS.md-aware tools AGENTS.md Cross-tool standard. Supports layering: ~/.codex/AGENTS.md → repo root → subtree → AGENTS.override.md.
Claude Code AGENTS.md (or CLAUDE.md) Reads AGENTS.md natively. CLAUDE.md still works for path-scoped rules and imports.
Cursor .cursor/rules/*.mdc YAML frontmatter required for activation. .cursorrules (single-file) is deprecated and ignored by Agent mode.
GitHub Copilot .github/copilot-instructions.md Nearest-file precedence. Optional: .github/instructions/*.instructions.md with applyTo frontmatter; .github/skills/ for Agent Skills.
Google AntiGravity GEMINI.md, .agents/agents.md, .agents/skills/*/SKILL.md .agents/ is the native workspace extension directory for agents, workflows, and skills.
Continue.dev .continuerules Plain markdown.
Other Tool-specific rules file Most accept plain markdown.

Two ways to populate the target file:

  1. Static — copy the matching stub from examples/rules/ (one file per tool, already formatted).
  2. Dynamic — let the CLI generate it from this guide:
    # AGENTS.md / CLAUDE.md / Copilot / Continue.dev — compact always-loaded rules
    hera-agent-unity doctor --agent-rules --compact >> AGENTS.md
    
    # Cursor — compact rules with activation frontmatter
    hera-agent-unity doctor --agent-rules --compact --format cursor > .cursor/rules/hera-agent-unity.mdc
    
    # AntiGravity — compact project entry + full on-demand skill
    hera-agent-unity doctor --agent-rules --compact >> GEMINI.md
    hera-agent-unity doctor --agent-rules --format antigravity > .agents/skills/hera-agent-unity/SKILL.md
    

hera-agent-unity is a CLI that drives a running Unity Editor over HTTP. Common uses: execute C# inside the Editor, read console logs, query the active scene, run tests, capture screenshots, batch several commands in one round-trip. Each call is a tool round-trip; response bytes become your input tokens, so reads cost as much as your own writes.

Quick links:

Read the full file on GitHub · 809 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 · 809 lines · 12,675 tokens per session scan C a30f9e79c673

Subscribe to this mod's changes

hera-agent-unity AGENTS.md is an instructions file published in the GitHub repository NotNull92/hera-agent-unity (28 stars, last pushed 14d ago), licensed Apache-2.0. It adds 12,675 tokens to every session, about $0.0634 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.