stitchkit: Instructions file for Codex

AGENTS.md

stitchkit AGENTS.md is an instructions file for Codex, OpenCode from max-listov/stitchkit. It costs 3,595 tokens per session, scanned A, original, MIT.

A project instruction file for developing Stitchkit, a framework that turns one API definition into an HTTP API, MCP tools, AI-agent tools, and a typed client.

In plain words
What is it for?
It is for framework contributors working on Stitchkit code, design decisions, tests, documentation, and releases.
Why use it?
It tells contributors which architecture rules, development guides, and release practices apply when changing the framework itself.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/max-listov/stitchkit/agents-md"><img src="https://agentmods.dev/badge/instructions/max-listov/stitchkit/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,595 This file is loaded in full into every session.
When invoked 3,595 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.03595 $0.03595
Opus 5.5 $0.01438 $0.01438
Sonnet 5.5 $0.00719 $0.00719
Haiku 4.5 $0.00360 $0.00360

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

Security

Grade A, and why

stitchkit 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 · 173 lines

How it starts

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

stitchkit — agent guide

Contract-first backend framework for Bun and Node. One defineContract() → an HTTP API, MCP tools, AI-agent tools, a CLI and a typed client. What it is and is not: docs/PRINCIPLES.md.

📦 Building an app with stitchkit? Not this file: see the README, the guide, and in your project node_modules/stitchkit/llms.txt (it names the llms/<entrypoint>.txt slice to load per import) or skills/stitchkit copied into .claude/skills/.

🔧 Developing stitchkit? One rule per line, each linked to where its reasoning lives: ADRs in docs/decisions/, the rest in docs/architecture/. Setup, commands, hooks, local development against an app, PRs: CONTRIBUTING.md.

Before you change code

  • Name the invariant (I1–I15) your change serves; nothing under "Not in stitchkit" ships. → PRINCIPLES
  • NEVER ship a competing WebSocket or hook engine — wrap Socket.IO (createSocketIOClient / createSocketIOServer) and react-query-kit (createCursorQuery). → ADR 0008
  • ALWAYS Zod-first: the schema is the source of truth, types come from z.infer; never hand-write a duplicate type. → PRINCIPLES I3
  • NEVER write as in business logic. Casts live only at named boundaries — internal/typed.ts, executableAgentRuntimeTools in tools/runtime-tool.ts, adapters over untyped emitters (Socket.IO, event bus, cache bridge), the generic bridges in browser/client.ts — each with a comment saying why; elsewhere fix the types upstream. → ADR 0003, engineering-rules
  • Transport and hooks use RuntimeContext (loose), handlers HandlerContext (typed); never cast between them. → ADR 0003
  • ALWAYS keep the core Web Fetch-clean: createHandler takes HandlerConfig (no Bun types); Bun APIs live only in createServer and stitchkit/server. → ADR 0013
  • ALWAYS keep the core generic — no domain model; scopes are free strings, no billing, source is transport-only. → ADR 0002
  • NEVER make the project declaration a condition of a build, test, start path or check; stitchkit/declaration stays a leaf (packages/core/tests/project-declaration.test.ts). → ADR 0104
  • ALWAYS make a declared option load-bearing and register the test that proves it in packages/core/tests/option-effects.test.ts. → I9, engineering-rules
  • ALWAYS extend the owner that already exists: one implementation per job, one owner per public name, no alias, shim or parallel path. → ADR 0199, I8
  • NEVER import agent-runtime/ from the core; the runtime may import the core, shared machinery goes to a neutral part (src/durability/). Every direction between parts of src/ is declared in packages/core/tests/import-graph.test.ts — declare a new one there. → ADR 0197
  • NEVER publish a runtime internal because it looks useful: it leaves agent-runtime only when it needs no store and no run protocol, already exists proven by tests, and is typed against what the caller holds. → ADR 0142
  • ALWAYS register every process a test starts with packages/core/tests/support/process-reaper.ts before it can exist; bun run test fails the run, naming the survivor, when one is left. → ADR 0249
  • Keep functions ≤200 and files ≤500 lines (packages/core/tests/code-size.test.ts); an exception is a reasoned entry in packages/core/tests/fixtures/code-size-exceptions.json, and the list only shrinks. → ADR 0199
  • Put an endpoint's tool options in the one tool group (tool: { name, view, ui, annotations, mcp }); expose stays outside it. → ADR 0196

Read the full file on GitHub · 173 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. 2d ago Changed · +5 tokens per session 70e7df6ee005
  2. 20d ago Changed · +3 lines · +85 tokens per session c7c2116fc5b6
  3. 1mo ago Changed · +6 lines · +154 tokens per session 0ec0a688175f
  4. 1mo ago Changed · +10 lines · +222 tokens per session e58b1052f37e
  5. 1mo ago Changed · +2 lines · +28 tokens per session f4799aab5846
  6. 1mo ago Changed · +1 lines · +27 tokens per session f92538e0e867
  7. 1mo ago Changed · -16 tokens per session 6e39ce7cc995
  8. 1mo ago Changed · -285 lines · -3,599 tokens per session 40cdee01301f
  9. 1mo ago Changed · +13 lines · +229 tokens per session cc5b15de54d3
  10. 1mo ago First seen · 423 lines · 6,460 tokens per session scan A d59070731197

Subscribe to this mod's changes

stitchkit AGENTS.md is an instructions file published in the GitHub repository max-listov/stitchkit (3 stars, last pushed 2d ago), licensed MIT. It adds 3,595 tokens to every session, about $0.0144 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-31.

Related

stitchkit AGENTS.md compared with instructions from other repositories

stitchkit AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
stitchkit AGENTS.mdmax-listov/stitchkitInstructions file32d agoMITA3,595Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,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