heimdall AGENTS.md

Repository instructions for Heimdall, a tool that checks other software repositories before changes are written or committed.

In plain words
What is it for?
Use them when editing Heimdall, writing its Bash tests, running its checks, or preparing commits that must pass its repository gates.
Why use it?
They prevent unfinished code from being accepted and require tests to prove that checks can detect failures.

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

Made for: Codex, OpenCode.

Per session 1,020 This file is loaded in full into every session.
When invoked 1,020 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.01020 $0.01020
Opus 5 $0.00510 $0.00510
Sonnet 5 $0.00204 $0.00204
Haiku 4.5 $0.00102 $0.00102

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

Security

Grade A, and why

heimdall 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 · 74 lines

How it starts

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

Working in the Heimdall repo

Heimdall is the watchman: it gates other people's repos. So the bar here is the bar we sell. Read this before your first edit.

The rules that actually block you

  • No stub, placeholder, TODO, or skeleton code. A PreToolUse hook scans every Claude Code write for unfinished code shapes (empty bodies, not-implemented throws, # TODO comments) and refuses the write — but that hook only fires inside a live Claude Code session. bin/heimdall-gate-run's pre-commit phase backs it up at the git layer: it re-scans the staged diff against the same shared shapes (bin/lib/heimdall-stub-patterns.sh), so the ban holds no matter which tool — or human — makes the commit. If you cannot implement something fully, say so — faking it is the one failure mode this repo exists to catch.
  • Tests are bash. One file per surface: test/<name>.test.sh, run with bash test/<name>.test.sh. Exit 0 = green. A test prints PASS/FAIL lines and a count. Follow the shape of a neighbouring test rather than inventing a harness.
  • Every assertion must be falsifiable. Before you call a test done, break the thing it covers and watch it go RED, then revert and watch it go GREEN. A test that cannot fail is not a gate — it is decoration.
  • Quality gates run before push (heimdall-state check-quality-gates): tests green, lint clean, no untested changes.

Environment

  • bash 3.2.57 on macOS. timeout(1) does not exist — use perl -e 'alarm N; exec @ARGV' -- <cmd>.
  • Tests must be hermetic: redirect HOME, work in mktemp -d, never touch the real ~/.heimdall and never reach a live control plane.
  • Nothing here is submitted to an external service during a test run. Local artifacts only.

Conventions

  • Generated regions in tracked files live between HEIMDALL:<NAME>:BEGIN / HEIMDALL:<NAME>:END markers and are written by a renderer, never by hand — see bin/heimdall-render-version (README version region) and bin/heimdall-init (the AGENTS.md fence below). Match that pattern; do not invent a second one.
  • Version truth is .claude-plugin/plugin.json .version. Every other surface is rendered from it.
  • Independent work runs in parallel: batch independent tool calls into one message, and give each parallel agent its own file scope.
  • One completed task = one atomic commit, conventional prefix.

Read the full file on GitHub · 74 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 · 74 lines · 1,020 tokens per session scan A e2ecdf3e1bce

Subscribe to this mod's changes

heimdall AGENTS.md is an instructions file published in the GitHub repository randomittin/heimdall (5 stars, last pushed 12d ago), licensed MIT. It adds 1,020 tokens to every session, about $0.0051 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.