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 3,330 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 3,330 This file is loaded in full into every session.
When invoked 3,330 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.03330 $0.03330
Opus 5.5 $0.01332 $0.01332
Sonnet 5.5 $0.00666 $0.00666
Haiku 4.5 $0.00333 $0.00333

Measured 2d ago against content hash 409498686cea, 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 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 · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 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

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

  • Controllers NEVER call Services directly and never do IO; they go through Application.
  • Coordinators NEVER call Application; they go through Controllers.
  • Application NEVER accesses Stores and never calls Controllers; only Controllers manage stores.
  • Services NEVER access Stores, except session reads in HomeserverService / LocksService via getState() (ADR-0004/0024), including auth failure metadata and the Locks creator-owner check against the current app account; reads only, never writes.
  • Pipes are pure: NO IO, NO side effects. Services never call up. Models touch Dexie only.
  • Cross-Application calls (ADR-0009): only PostApplication, NotificationApplication, BootstrapApplication, MigrationApplication, HotApplication, PostStreamApplication and TtlApplication may call other Applications; acyclic; depth 1, with one depth-2 exception: PostApplication | NotificationApplication | TtlApplication → PostStreamApplication → FileApplication.

Read the full file on GitHub · 161 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 · +4 lines · +104 tokens per session 409498686cea
  2. 9d ago Changed · +1 lines · +20 tokens per session 56fefd875dc2
  3. 11d ago Changed · +2 lines · +49 tokens per session 53ca1da45134
  4. 12d ago Changed · -1 lines · -4 tokens per session 4c88eaf96bc8
  5. 20d ago Changed · +1 lines · +33 tokens per session 5d7481252ef0
  6. 22d ago Changed · +2 lines · +39 tokens per session b74e38eb53c3
  7. 25d ago Changed · +1 lines · +57 tokens per session 25287ff98590
  8. 28d ago Changed · +9 tokens per session 46e0e5597267
  9. 1mo ago Changed · +25 tokens per session 0a05eab56ee9
  10. 1mo ago First seen · 151 lines · 2,998 tokens per session scan A 73d0df82631d

Subscribe to this mod's changes

pubky-app AGENTS.md is an instructions file published in the GitHub repository pubky/pubky-app (26 stars, last pushed today), licensed MIT. It adds 3,330 tokens to every session, about $0.0133 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

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,384 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens