pubky-app: Instructions file for Codex

AGENTS.md

pubky-app AGENTS.md is an instructions file for Codex, OpenCode from pubky/pubky-app. It costs 4,623 tokens per session, scanned A, original, MIT.

Repository-specific development rules for Pubky App, a decentralized social application that works locally first and uses browser storage. They define how the interface, business logic, services, data models, and stores are allowed to interact.

In plain words
What is it for?
Use them when adding or changing Pubky App features, especially controllers, services, application logic, data storage, and UI code. They guide where code belongs and which module may call another.
Why use it?
They prevent code from bypassing the project’s architecture or creating unwanted side effects. They also make imports and responsibilities more predictable as the codebase grows.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

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

Reuse

Borrowing it

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

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 pubky-app AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/pubky/pubky-app/agents-md"><img src="https://agentmods.dev/badge/instructions/pubky/pubky-app/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,623 This file is loaded in full into every session.
When invoked 4,623 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.04623 $0.04623
Opus 5.5 $0.01849 $0.01849
Sonnet 5.5 $0.00925 $0.00925
Haiku 4.5 $0.00462 $0.00462

Measured yesterday against content hash 005b8f7c8fff, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pubky-app 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 yesterday.

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 · 207 lines

How it starts

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

Pubky App

Decentralized social app: Next.js 16 App Router, React 19 with the React Compiler, TypeScript, Tailwind v4 + Shadcn UI, Zustand, Dexie (IndexedDB), TanStack Query. Package name franky. Local-first: writes go to Dexie first and sync to the homeserver; reads come from Dexie and fall back to Nexus. This file is the entry point for every AI agent (Claude Code, Codex, Cursor); it indexes docs/, which is canonical and wins over anything here (docs/development-workflow.md is the long version).

Commands

Node 24 (.nvmrc), dependencies via npm ci. The pre-commit hook runs lint-staged then npm run typecheck.

Task Command
Dev server (port 3000) npm run dev (staging defaults are built in, no .env needed)
Format, lint, types npm run format:check, npm run lint, npm run typecheck
Unit tests (jsdom) npm test (~13k tests, minutes); one file npm test -- <path>; one name npm test -- -t "x"
Visual regression (VRT) npm run test:vrt (npm run test:vrt:setup once); baselines are CI-owned, never commit local
Production build npm run build (next build --webpack)
E2E (Cypress) npm run test:e2e; needs the full pubky-stack, not runnable from a bare checkout

Architecture (src/core)

UI (user actions) → Controllers → Application → Services → Models
Coordinators (system) ↗            ↓              ↓
                       Stores     Pipes         Database
Services → Pipes (pure transforms; the Nexus services apply the `*.fromNexus` read-boundary mappers)

Hard constraints (review-enforced, not compiler-enforced; docs/architecture.md):

Read the full file on GitHub · 207 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. yesterday Changed · -1 lines · +9 tokens per session 005b8f7c8fff
  2. 5d ago Changed · +15 tokens per session 80cc089d7029
  3. 9d ago Changed · +2 lines · +46 tokens per session f1995729a44b
  4. 14d ago Changed · +2 lines · +59 tokens per session 3d4add286046
  5. 16d ago Changed · +35 lines · +1,015 tokens per session 08d4042df5b0
  6. 17d ago Changed · +1 lines · +22 tokens per session 56d5591ba9b5
  7. 23d ago Changed · -2 tokens per session 4ad219914468
  8. 25d ago Changed · +12 tokens per session b1d8eb3c8e1c
  9. 1mo ago Changed · +7 lines · +117 tokens per session bb96a0d406c6
  10. 1mo ago First seen · 161 lines · 3,330 tokens per session scan A 409498686cea

Subscribe to this mod's changes

pubky-app AGENTS.md is an instructions file published in the GitHub repository pubky/pubky-app (28 stars, last pushed yesterday), licensed MIT. It adds 4,623 tokens to every session, about $0.0185 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-30.

Related

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

pubky-app AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pubky-app AGENTS.mdpubky/pubky-appInstructions file28yesterdayMITA4,623Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150kyesterdayMITA4,951Codex, OpenCode
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file291ktodayMITA4,396Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,303GitHub Copilot