bray: Instructions file for Codex

AGENTS.md

bray AGENTS.md is an instructions file for Codex, OpenCode from forgesworn/bray. It costs 2,558 tokens per session, scanned A, original, MIT.

General instructions for a project that provides AI agents with Nostr identities through an MCP server and command-line tool. Nostr is a decentralised messaging protocol that uses cryptographic identities.

In plain words
What is it for?
Use it when developing or maintaining the Nostr agent server and CLI, including identity management, signing, relay connections, and trust verification.
Why use it?
It explains how to build, test, lint, and understand the project’s identity, signing, relay, and trust components.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/forgesworn/bray/agents-md"><img src="https://agentmods.dev/badge/instructions/forgesworn/bray/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,558 This file is loaded in full into every session.
When invoked 2,558 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.02558 $0.02558
Opus 5.5 $0.01023 $0.01023
Sonnet 5.5 $0.00512 $0.00512
Haiku 4.5 $0.00256 $0.00256

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

Security

Grade A, and why

bray 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 9d 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 · 146 lines

How it starts

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

AGENTS.md: nostr-bray

Instructions for any coding agent. Claude Code reads this file through CLAUDE.md, which imports it.

What this is

MCP server, CLI and TypeScript SDK giving AI agents sovereign Nostr identities: 261 tools, across the tool groups listed below.

Build & Test

npm install
npm run build    # TypeScript → dist/
npm test         # vitest run
npm run lint     # tsc --noEmit

Work on branches, merge to main: forgesworn/anvil handles releases via workflow_call (see .github/workflows/auto-release.yml).

Architecture

src/
  index.ts              MCP server entry point (tool registration + HTTP/stdio transport)
  cli.ts                CLI entry point (77 subcommands + shell REPL)
  catalog.ts            ActionCatalog: non-promoted tools, search-actions + execute-action meta-tools
  context.ts            IdentityContext: master key, LRU cache, derive, sign, zeroise
  trust-context.ts      TrustContext: verification (Signet) + proximity (WoT) + access (Dominion)
  signing-context.ts    SigningContext interface (local key or NIP-46 bunker)
  read-only.ts          ReadOnlyContext (no signer) + the tool filter for read-only mode
  bunker-context.ts     NIP-46 BunkerContext + Heartwood extension probe
  bunker-pair.ts        nostrconnect:// pairing (`bunker pair`): saves the signer and its approved client key
  ws-safe.ts            SafeWebSocket: `ws` that cannot crash the process when nostr-tools closes a connecting socket
  config.ts             Secret loading from env/files, format detection
  relay-pool.ts         Relay connections, SOCKS5h proxy, Tor policy, write queue
  nip65.ts              NIP-65 relay list (signature-verified, TTL cache)
  validation.ts         Shared Zod validators (hexId, relayUrl, validatePublicUrl)
  format.ts             Human-readable CLI formatters
  help.ts               Per-command help with examples
  tool-response.ts      MCP output format helper (json/human)
  identity/             Identity tools (derive, prove, Shamir, NIP-05, migration)
  social/               Social tools (post, DM, blossom, groups, articles, badges, calendar…)
  trust/                Trust tools (attestations, ring sigs, spoken tokens)
  relay/                Relay tools (list, set, query, NIP-11 info, intelligence)
  zap/                  Zap tools (NWC wallet via NIP-47)
  safety/               Safety tools (duress persona, canary sessions/groups/beacons)
  util/                 Utility tools (decode, encode, verify, encrypt, filter, NIP browse)
  workflow/             Workflow tools (trust-score, feed-discover, verify-person, relay-health…)
  marketplace/          Marketplace tools (discover, pay, call, listings)
  privacy/              Privacy tools (ZK range/age/threshold proofs)
  moderation/           Moderation tools (labels, mute lists, pin lists, follow sets, bookmarks)
  signet/               Signet tools (badge, vouch, credentials, policy, challenge)
  vault/                Vault tools (Dominion epoch-based encrypted vaults)
  dispatch/             Dispatch tools (send, check, reply, ack, propose, capabilities)
  handler/              Handler tools (publish + discover NIP-90 DVMs)
  veil/                 WoT filter engine (no tools; internal scoring + cache)
  widgets/              Widget handlers (feed, DM thread, identity picker; no tools.ts)

Read the full file on GitHub · 146 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. 9d ago Changed · +4 lines · +143 tokens per session c736252333ef
  2. 22d ago Changed · +4 lines · +263 tokens per session 5a7a54024ec1
  3. 1mo ago Changed · +4 lines · +107 tokens per session f8425c69af17
  4. 2mo ago First seen · 134 lines · 2,045 tokens per session scan A 8bc6eb18884a

Subscribe to this mod's changes

bray AGENTS.md is an instructions file published in the GitHub repository forgesworn/bray (1 stars, last pushed 5d ago), licensed MIT. It adds 2,558 tokens to every session, about $0.0102 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

bray AGENTS.md compared with instructions from other repositories

bray AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bray AGENTS.mdforgesworn/brayInstructions file15d agoMITA2,558Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot