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/modem-dev/hunk/agents-mdgit clone --depth 1 https://github.com/modem-dev/hunkWhat 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.02942 | $0.02942 |
| Opus 5 | $0.01471 | $0.01471 |
| Sonnet 5 | $0.00588 | $0.00588 |
| Haiku 4.5 | $0.00294 | $0.00294 |
Grade A, and why
hunk 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.
hunk agent notes
purpose
- Terminal-first diff viewer for understanding coding-agent changesets.
- Product target is "modern desktop diff tool in a terminal", not a pager-style TUI.
architecture
CLI input
-> parse runtime + config-backed view options
-> normalize into one Changeset / DiffFile model
-> App shell coordinates state, layout, and review navigation
-> pane components render review UI
-> Pierre-backed terminal renderer draws diff rows
shared review seam
Review core serves multiple surfaces: TUI today; web, API, and agent/runtime consumers later. Do not recreate semantic review behavior in a surface:
DiffFile[] -> projectReviewDocument -> ReviewDocumentV1 -> ReviewStore
ReviewIntent + caller facts -> planReviewIntent -> ReviewAction[] -> reducer -> surface projection
- Model:
src/core/review/{types,document,identity}.tsowns the ordered, JSON-safe document. File order is review/sidebar order; usekey(referenced asfileKeyelsewhere),contentIdentity, andsourceIdentity(cached source text additionally requiressourceAttested) — not runtime IDs or indexes — across reloads/surfaces. - Shared derivations:
geometry.ts,expansion.ts,anchors.ts,stml.ts, andcontentManifest.tsown ranges, gaps, source splitting, note targets/ownership, tag roles, and parity manifests. Consume them; never re-derive those facts in a renderer. - State:
state.tsis semantic state;actions.tstransitions;reducer.tspure/no-I/O;selectors.tsshared policies;store.tssynchronous observable storage. New cross-surface operations start as intents. Callers supply mutable-note IDs/timestamps; core derives identities. - Surfaces/publishers:
useTerminalReview.tsis the TUI adapter andreviewNoteMapping.tsis terminal-only. Rows, measurement, scrolling, layout, themes, DOM mechanics, and source I/O stay local.useHunkSessionBridge.tspublishes the current terminal session export;registration.tsbuilds its metadata/initial snapshot andbridge.tsreceives agent commands. This broker export is not a fullReviewStatemirror. - Other consumers: Web/API consumers reuse the model, derivations, state, intents, and the
producer/protocol tier. Never build a parallel protocol. Keep presentation/client-local state
local; host/extension commands need explicit remote capabilities. See
docs/browser-review-rebuild.mdfor the rollout and current boundaries. - Conformance:
test/review-conformance/has hand-authored semantic fixtures covering every registered core, terminal, producer, broker, protocol, and extension projection. Every new semantic consumer registers its real projection and runs the whole corpus.scripts/source-boundaries.test.tskeeps the seam renderer/platform-free; its Node-debt list is shrink-only and tombstone lists append-only. A repaid seam finding deletes copies, adds a file or banned-symbol tombstone and adversarial fixture, registers consumers, and updatesdocs/browser-review-seam-audit.md.
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.
- yesterday First seen · 186 lines · 2,942 tokens per session scan A 6eb5e3076901
hunk AGENTS.md is an instructions file published in the GitHub repository modem-dev/hunk (8,933 stars, last pushed yesterday), licensed MIT. It adds 2,942 tokens to every session, about $0.0147 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-30.
Other instructions, from other repositories
revdiff CLAUDE.md
Instructions for umputun/revdiff, covering revdiff, commands, project structure, architecture principles and config.
critique AGENTS.md
Instructions for remorses/critique, covering opentui, using unreleased opentui versions, bun, react and rules.
goder AGENTS.md
AGENTS.md instructions for nullism/goder, covering agent architecture, configuration, review loop behavior, safety model and key files.
langgraph AGENTS.md
Instructions for langchain-ai/langgraph, covering agents instructions, corridor security analysis, libraries and dependency map.
agentgateway copilot-instructions.md
Instructions for agentgateway/agentgateway: Do not check for, speculate about, or report compilation errors during code review. Compilation diagnostics from review are frequently incorrect; rely on CI to detect and report compilation failures.
hatch3r CLAUDE.md
Instructions for hatch3r/hatch3r, covering hatch3r — development instructions, architecture, development commands, two-axis pillar framework (2.0.0) and orchestrator self-discipline (bypass protection).