nanocodex: Instructions file for Codex

AGENTS.md

nanocodex AGENTS.md is an instructions file for Codex, OpenCode from gakonst/nanocodex. It costs 1,605 tokens per session, scanned A, original, Apache-2.0.

Development instructions for Nanocodex, a library-first Rust agent SDK and managed platform for accounts, permissions, durability, secrets, and hosted tools.

In plain words
What is it for?
Use them when developing the SDK or platform, especially for local operation, Cloudflare deployment, and keeping the SDK's scope narrow.
Why use it?
They clarify the product boundary and the approved commands for running, stopping, deploying, and verifying the platform.

Instructions file for CodexOpenCode

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

This is gakonst/nanocodex's own configuration. It tells Codex and OpenCode how to work on nanocodex 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 nanocodex configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gakonst/nanocodex. 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/gakonst/nanocodex/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/gakonst/nanocodex

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/gakonst/nanocodex/agents-md"><img src="https://agentmods.dev/badge/instructions/gakonst/nanocodex/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,605 This file is loaded in full into every session.
When invoked 1,605 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01605 $0.01605
Opus 5.5 $0.00642 $0.00642
Sonnet 5.5 $0.00321 $0.00321
Haiku 4.5 $0.00161 $0.00161

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

Security

Grade A, and why

nanocodex AGENTS.md scanned grade A with 1 finding 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 28d 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.

Makes network callslowCapability

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

- For managed API durability work, reproduce and verify behavior with `curl`
AGENTS.md · 115 lines

How it starts

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

Nanocodex development

  • Define observable behavior and failure cases before implementation. Validate changes with black-box, end-to-end journeys that a real user could perform: invoke the shipped CLI, call the public API over its actual transport, or use both when both surfaces matter. Run the real executable/runtime and assert on user-visible results, including representative errors, authorization, and recovery paths. Use synthetic accounts/data and safe test environments; stub only unavoidable external dependencies, not the behavior under test.

  • Skip low-level unit tests as the default for both new coverage and routine validation. Do not add helper-by-helper or mock-heavy tests to stand in for a user journey. Prefer a small set of representative E2E scenarios over a large matrix of incidental configurations. If a critical failure truly cannot be observed at a public boundary, document that gap and use the narrowest realistic integration check rather than silently substituting unit coverage.

  • Finish each E2E run with reproducible evidence: the command, inputs, expected and observed outcomes, and an inspectable trace, transcript, log, screenshot, or recording where relevant. A passing test name alone is not evidence.

  • For managed API durability work, reproduce and verify behavior with curl against public HTTP routes. Retain request bodies, response headers, SSE or JSON responses, and assertions under ignored output/. Exercise durable admission, disconnect/retry, recovery, and subsequent usable work; client SDK or CLI checks supplement this HTTP evidence.

  • Continuously look for ways to improve the developer experience in CI. Inspect the relevant jobs' actual results, duration, failures, and artifacts; favor fast, reliable user-journey feedback, actionable failure output, and easy reproduction locally. Remove redundant work and flaky setup, but do not hide failures, skip required checks, or trade away meaningful E2E coverage merely to make CI green. When changing CI, verify the resulting workflow run.

  • When a journey or protocol check covers the same failure, remove redundant lower-level cases, unused fixtures, test-only APIs, and obsolete runner references. Prune mock setup that no surviving scenario uses. Use compiler, lint, and package checks for static contracts; do not test source text, private layouts, method presence, fixed prompt/UI copy, or a mock's own behavior as a proxy for runtime behavior.

  • Keep documentation focused on current APIs, architecture, setup, and operations. Remove superseded designs, implementation plans, checklists, and review notes when the work lands; Git retains their history. Update links and consumers when removing documents or support files.

  • Publish per-run screenshots, videos, logs, traces, and benchmark results as CI artifacts or keep them in ignored output/. Do not commit generated evidence; retain only intentional fixtures consumed by tests or current documentation.

  • Keep only the static assets and fixture files their consumers need. Check dynamic filename construction and build manifests before pruning imported asset packs; preserve attribution and canonical source artwork.

  • macos/ owns the desktop app and native tiled workspace; js/desktop-runtime owns its runtime. apple/NanocodexInbox targets iPhone and iPad.

  • js/nanocodex and js/nanocodex-react are public contracts. Cover changes with relevant contract, type, package, and runtime checks.

  • js/nanocodex-vite owns the Vite plugin, WASM build, OAuth relay, and Cloudflare Vite integration.

  • Apps and Workers deploy independently. Shared behavior belongs in a package, consumed through its public API.

  • Use root pnpm scripts and existing Turbo/Portless/Vite/Wrangler tooling. Deploy dependencies first and account last. Component deploy scripts build their dependencies from a clean checkout. See README.md for setup.

  • Use synthetic identities and project data in fixtures and examples. Keep real account IDs, private project inventories, and one-off personal migration plans outside tracked source; pass operational data through private runtime inputs.

Read the full file on GitHub · 115 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. 28d ago Changed · +5 lines · +73 tokens per session acdc58368c40
  2. 29d ago Changed · +12 lines · +138 tokens per session f3507b49f452
  3. 1mo ago Changed · +33 lines · +452 tokens per session f653a68b5113
  4. 1mo ago Changed · +3 lines · +86 tokens per session 0ecc7652ddc1
  5. 1mo ago Changed · +8 lines · +125 tokens per session 4e17d265bced
  6. 1mo ago Changed · +35 lines · +463 tokens per session 6098475953b2
  7. 1mo ago Changed · +3 lines · +43 tokens per session a08a52a93f14
  8. 1mo ago Changed · -30 lines · -443 tokens per session 2a26affb8f71
  9. 2mo ago Changed · -120 lines · -1,359 tokens per session ea59c3bdde09
  10. 2mo ago First seen · 166 lines · 2,027 tokens per session scan A 6f1f0e6d840c

Subscribe to this mod's changes

nanocodex AGENTS.md is an instructions file published in the GitHub repository gakonst/nanocodex (564 stars, last pushed 25d ago), licensed Apache-2.0. It adds 1,605 tokens to every session, about $0.0064 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

nanocodex AGENTS.md compared with instructions from other repositories

nanocodex AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nanocodex AGENTS.mdgakonst/nanocodexInstructions file56425d agoApache-2.0A1,605Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode