with-md: Instructions file for Codex

AGENTS.md

with-md AGENTS.md is an instructions file for Codex, OpenCode from tin-computer/with-md. It costs 912 tokens per session, scanned A, original, MIT.

Repository instructions for agents working on with.md, a collaborative Markdown application. They describe its main parts, including the web interface, data storage, live editing, and synchronization with GitHub.

In plain words
What is it for?
Use them when developing or debugging with.md. They cover local startup and checks for the web app, backend services, and TypeScript code.
Why use it?
They give an agent the project map, development commands, and validation steps before it changes code. This helps it work within the existing architecture rather than guessing how parts fit together.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/tin-computer/with-md/agents-md"><img src="https://agentmods.dev/badge/instructions/tin-computer/with-md/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 912 This file is loaded in full into every session.
When invoked 912 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.00912 $0.00912
Opus 5.5 $0.00365 $0.00365
Sonnet 5.5 $0.00182 $0.00182
Haiku 4.5 $0.00091 $0.00091

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

Security

Grade A, and why

with-md 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 1mo 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 · 107 lines

How it starts

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

AGENTS.md

Guidance for agents working in this repository.

Project Purpose

with.md is a filesystem-first markdown collaboration app:

  • GitHub stores canonical markdown files.
  • Convex stores synced file metadata/content and collaboration state.
  • Hocuspocus + Yjs power realtime editing.
  • Next.js (web/) is the product UI and API surface.

Architecture At A Glance

  • web/: Next.js 15 app (port 4040), UI + API routes.
  • convex/: backend schema/functions (DB, storage, sync metadata, comments, queue).
  • hocuspocus-server/: websocket collaboration bridge (default port 3001).

Runtime flow:

  1. User authenticates in web/.
  2. Web app syncs markdown from GitHub into Convex.
  3. Realtime editor connects to Hocuspocus.
  4. Hocuspocus loads/stores snapshots and markdown through Convex HTTP actions.
  5. Changes queue for push back to GitHub.

Local Development

From repo root:

npm install
npx convex dev
npm run dev:hocuspocus
npm run dev:web

Validation:

npm run test:web
npm --workspace web run build
npx tsc --noEmit -p hocuspocus-server/tsconfig.json

Repository Map

  • web/src/components/with-md/with-md-shell.tsx: top-level UI orchestrator.
  • web/src/components/with-md/collab-editor.tsx: TipTap/Yjs realtime editor.
  • web/src/hooks/with-md/use-collab-doc.ts: provider lifecycle and IndexedDB behavior.
  • web/src/app/api/auth/collab-token/route.ts: user realtime token minting.
  • web/src/lib/with-md/collab-token.ts: token format/signing.
  • convex/collab.ts: realtime authentication and document load/store logic.
  • convex/http.ts: internal endpoints used by Hocuspocus.
  • convex/mdFiles.ts: markdown file CRUD/import/move/delete/save/repair paths.
  • convex/repos.ts: repo records and fallback seed behavior.
  • hocuspocus-server/src/index.ts: websocket auth/load/store lifecycle.

Critical Product Invariants

  1. GitHub is source of truth for repository files.
  2. Do not enable rich edit for unsupported markdown syntax; preserve Source mode fallback.
  3. Realtime load/store must be idempotent; avoid duplicate bootstrap paths.
  4. File switching must not leak stale editor state between files.
  5. Prefer minimal-diff markdown updates and preserve meaningful content.
  6. Keep oversized-file guardrails intact (source-only editing for very large docs).

Read the full file on GitHub · 107 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. 1mo ago First seen · 107 lines · 912 tokens per session scan A ec52fa57a649

Subscribe to this mod's changes

with-md AGENTS.md is an instructions file published in the GitHub repository tin-computer/with-md (76 stars, last pushed 19d ago), licensed MIT. It adds 912 tokens to every session, about $0.0036 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-09-11.

Related

with-md AGENTS.md compared with instructions from other repositories

with-md AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
with-md AGENTS.mdtin-computer/with-mdInstructions file7619d agoMITA912Codex, 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