h2: Instructions file for Codex

AGENTS.md

h2 AGENTS.md is an instructions file for Codex, OpenCode from dcosson/h2. It costs 305 tokens per session, scanned A, original, MIT.

A project guide for AI coding assistants, covering test isolation, commit checks, versioning, and the release process.

In plain words
What is it for?
Running isolated tests, checking commits, choosing version increments, updating the changelog, and building releases.
Why use it?
It prevents tests from changing a developer’s real settings and helps ensure releases pass the required checks.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is dcosson/h2's own configuration. It tells Codex and OpenCode how to work on h2 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything h2 configures →

View source ↗ dcosson/h2
Reuse

Borrowing it

Nothing to install: this file belongs to dcosson/h2. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dcosson/h2/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/dcosson/h2

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 h2 AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dcosson/h2/agents-md/github.svg)](https://agentmods.dev/instructions/dcosson/h2/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/dcosson/h2/agents-md"><img src="https://agentmods.dev/badge/instructions/dcosson/h2/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.

agentmods 80×15 button for h2 AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dcosson/h2/agents-md"><img src="https://agentmods.dev/badge/instructions/dcosson/h2/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 305 This file is loaded in full into every session.
When invoked 305 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00305 $0.00305
Opus 5.5 $0.00122 $0.00122
Sonnet 5.5 $0.00061 $0.00061
Haiku 4.5 $0.00030 $0.00030

Measured 1mo ago against content hash b66f628862b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

h2 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 1mo 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 29 lines

What it actually says

Testing Rules

Never use config.ConfigDir() in tests. Tests must not touch the real h2 config directory. Use setupFakeHome(t) or a similar pattern that sets H2_DIR to a temp directory and calls config.ResetResolveCache(). This prevents test side effects on the real ~/.h2 directory and ensures test isolation.

Release Process

Commit Quality Gate

Before every feature commit, run make check and ensure it passes.

When doing a production release, follow this sequence:

  1. Ensure you are on the main branch first.
  2. Fetch and fast-forward main to origin/main (git fetch origin main && git pull --ff-only origin main).
  3. Determine the version bump and update the h2 version:
    • If unsure what bump to use, ask the user.
    • Use semver rules:
      • patch for non-breaking changes.
      • for pre-1.0 versions: minor for breaking changes.
      • for 1.0+ versions: major for breaking changes.
  4. Update docs/CHANGELOG.md with changes since the last version tag and its tagged commit.
  5. Run all test suites and ensure they pass.
  6. Run make check and ensure it passes.
  7. Run make build-release and ensure it passes.
  8. Tag the current HEAD with the release version.
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. 1mo ago First seen · 29 lines · 305 tokens per session scan A b66f628862b2

Subscribe to this mod's changes

h2 AGENTS.md is an instructions file published in the GitHub repository dcosson/h2 (163 stars, last pushed yesterday), licensed MIT. It adds 305 tokens to every session, about $0.0012 per session on Opus 5.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