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/dzhng/duet-agent/agents-mdgit clone --depth 1 https://github.com/dzhng/duet-agentWrote 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/dzhng/duet-agent/agents-md)<a href="https://agentmods.dev/instructions/dzhng/duet-agent/agents-md"><img src="https://agentmods.dev/badge/instructions/dzhng/duet-agent/agents-md.svg" alt="Measured on agentmods" 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 | $0.01591 | $0.01591 |
| Opus 5 | $0.00796 | $0.00796 |
| Sonnet 5 | $0.00318 | $0.00318 |
| Haiku 4.5 | $0.00159 | $0.00159 |
Grade A, and why
duet-agent 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Guidelines
Treat Types As Documentation
- Type files and exported type declarations are part of the public documentation surface.
- Add comments where a field is declared, especially for config options and callback contracts.
- Explain how the field is used, what values mean operationally, and what changes when it is set.
- Prefer comments that document why a field exists or how downstream code interprets it.
- Avoid comments that only restate the type, such as "string value" or "array of items".
Keep Names Current
- Names should describe what code does now, not what it used to do.
- After refactors, search for old names, stale comments, abandoned feature flags, and dead detection logic.
- Do not preserve compatibility shims for unshipped scaffold code. Replace the scaffold outright.
Keep Comments Useful
- Keep comments for non-obvious behavior, platform quirks, invariants, and downstream consequences.
- Remove narrative comments about previous attempts, renamed code, or abandoned approaches.
- Remove comments that simply repeat the implementation.
Prefer Direct, Local Guarantees
- Detection and guard logic should check the one condition that actually matters.
- When a value becomes guaranteed, remove redundant fallback code and stale null checks downstream.
- Prefer
constoverletwhen reassignment is not needed. - Do not suppress signals with
_parameters,as any,@ts-ignore, or lint disables. Fix the source issue.
Avoid Thin Wrappers
- Do not create modules that only re-export another package.
- Import upstream APIs directly unless this project adds real semantics at the boundary.
- A local helper should earn its place by centralizing project-specific behavior.
Keep Runtime And Persistence Separate
- The turn runner runtime should not own persistence policy.
- Persistence should hydrate the concrete runtime store before use, then subscribe to store events for future writes.
- Install scripts set up prerequisites; runtime commands handle runtime work.
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.
- 4d ago First seen · 83 lines · 1,591 tokens per session scan A 84b51169900f
duet-agent AGENTS.md is an instructions file published in the GitHub repository dzhng/duet-agent (42 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,591 tokens to every session, about $0.0080 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
learn-harness-engineering CLAUDE.md
Instructions for walkinglabs/learn-harness-engineering, covering claude.md, project overview, commands, documentation site and run lecture code examples.
trueforge AGENTS.md
AGENTS.md instructions for truefoundry/trueforge, a project described as: The open-source agent harness - the runtime layer that turns an LLM into a working agent.
sprawling AGENTS.md
Instructions for 2youg1/sprawling, covering agents.md — how work is done in this repository, the loop, read before you write, one change, five steps and the rules a machine holds.
opencode-plusplus AGENTS.md
Instructions for whut09/opencode-plusplus, covering agent guide, generated agent guide, must-read rules, default workflow and project entrypoints.
sprawling CLAUDE.md
Instructions for 2youg1/sprawling: See AGENTS.md. It is the whole instruction set for this repository — the loop, what to read first, the five steps of one change, the rules a machine holds, and the language and commit conventions.
trueforge CLAUDE.md
Claude Code instructions for truefoundry/trueforge, a project described as: The open-source agent harness - the runtime layer that turns an LLM into a working agent.