nanocodex AGENTS.md

nanocodex AGENTS.md is an instructions file for Codex, OpenCode from gakonst/nanocodex. It costs 668 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.

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/gakonst/nanocodex/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 668 This file is loaded in full into every session.
When invoked 668 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.1 $0.00668 $0.00668
Opus 5 $0.00334 $0.00334
Sonnet 5 $0.00134 $0.00134
Haiku 4.5 $0.00067 $0.00067

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

Security

Grade A, and why

nanocodex 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 · 46 lines

What it actually says

Nanocodex development

  • js/nanocodex and js/nanocodex-react are stable contracts. Cover changes with focused contract, type, package, and runtime tests.
  • js/nanocodex-vite owns the Vite plugin, WASM build, OAuth relay, and Cloudflare Vite integration. Do not recreate those responsibilities in apps or adapters.
  • Adapters are not a dumping ground. Put behavior at its real owner and expose a narrow entrypoint.
  • Apps and Workers are independent deployables. Never import another app's or Worker's source; shared code needs an explicit package owner.
  • During JS/platform work, do not edit Rust unless the user explicitly requests it. Generated WASM is the Rust boundary.
  • Product code gets almost no unit tests: keep only pure policy and important protocol boundaries. Require canonical browser and real service/Worker evidence for product behavior.
  • pnpm dev uses Turbo to start the complete stack through Portless at https://nanocodex.localhost; linked worktrees get https://<branch>.nanocodex.localhost. The paired playground is https://playground.nanocodex.localhost or https://<branch>.playground.nanocodex.localhost. With a high PORTLESS_PORT, append that port to each URL. Deploy from the root, in order, with pnpm deploy:egress, pnpm deploy:managed, pnpm deploy:connect-dialog, pnpm deploy:connect-api, pnpm deploy:chief-of-staff, pnpm deploy:connect-playground, and pnpm deploy:account. Each component script must build its complete workspace dependency graph from a clean checkout; do not manually prebuild omitted packages.
  • pnpm owns the JavaScript workspace, Turbo owns task concurrency and build caching, Portless owns local names and ports, and Vite/Wrangler own runtime.
  • Do not add custom stack, deploy, test, rollout, probe, or verification wrappers. Keep installs, migrations, resource changes, deployment, and evidence explicit.
  • CI deployment starts independently of tests. Pull requests dry-run stateful Workers and publish Cloudflare previews only for Workers that support them; master deploys the production configs directly.
  • Wrangler upload success is not behavior evidence. Exercise the exact changed journey, inspect console/network/storage/sockets/CSP, and verify provider secrets never reach browser or app surfaces.
  • The product journeys are: passkey account reauthentication; two durable agent turns across reload/reconnect; exact Connect approval projection; connector or MCP connect/call/revoke fencing; attachment lifecycle; and cross-account isolation. Test only the journeys touched by a change.
  • Preserve Cloudflare names, bindings, migrations, grants, durable state, public exports, and customer behavior during moves.
  • Never mix, delete, or reset concurrent work; never commit secrets, generated builds, caches, retained jobs, or another user's files.
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 Changed · -120 lines · -1,359 tokens per session ea59c3bdde09
  2. 6d 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 (466 stars, last pushed yesterday), licensed Apache-2.0. It adds 668 tokens to every session, about $0.0033 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.