swift-secp256k1: Instructions file for Codex

AGENTS.md

swift-secp256k1 AGENTS.md is an instructions file for Codex, OpenCode from 21-DOT-DEV/swift-secp256k1. It costs 3,188 tokens per session, scanned A, original, MIT.

A project guide for a Swift wrapper around libsecp256k1, a cryptography library used by Bitcoin and Nostr software. It covers supported Apple platforms, build and test commands, code style, and shared source files.

In plain words
What is it for?
Use it to build and test the Swift package, format or lint development code, maintain its P256K and ZKP targets, and work with vendored library sources.
Why use it?
It records platform requirements and non-obvious build rules, reducing the chance of breaking either cryptography target or release builds.

Instructions file for CodexOpenCode

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

This is 21-DOT-DEV/swift-secp256k1's own configuration. It tells Codex and OpenCode how to work on swift-secp256k1 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 swift-secp256k1 configures →

Reuse

Borrowing it

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

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 swift-secp256k1 AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/21-dot-dev/swift-secp256k1/agents-md"><img src="https://agentmods.dev/badge/instructions/21-dot-dev/swift-secp256k1/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,188 This file is loaded in full into every session.
When invoked 3,188 The same file — it is already loaded in full.
Security scan A 1 finding. 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.03188 $0.03188
Opus 5.5 $0.01275 $0.01275
Sonnet 5.5 $0.00638 $0.00638
Haiku 4.5 $0.00319 $0.00319

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

Security

Grade A, and why

swift-secp256k1 AGENTS.md scanned grade A with 1 finding 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 6d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Vendored-tree freshness gate: `Scripts/vendir-check.sh [check ...]` (bare run = all checks; needs vendir + yq). `allowlist` fails `vendir.yml` on keys or values outside the declared set (vendir drops unknown keys silen
AGENTS.md · 95 lines

How it starts

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

AGENTS.md (swift-secp256k1)

A Swift 6.1 wrapper around libsecp256k1 for the Bitcoin and Nostr ecosystems. Supports macOS 15+, iOS 18+, watchOS 11+, tvOS 18+, and visionOS 2+. Uses Swift 6 strict concurrency (swiftLanguageModes: [.v6]).

Commands

  • Build: swift build
  • Test: swift test
  • Format: swift package swiftformat . (dev checkout only)
  • Lint: swift package swiftlint (dev checkout only)
  • Install Lefthook hooks (one-time, dev checkout only): lefthook install
  • Install vendir (needed only to re-sync vendored sources): brew install carvel-dev/carvel/vendir — it tracks latest, so check vendir version against the pinned version named in "Extraction flow" below (exact binaries live on the vendir GitHub releases page)
  • Vendored-tree freshness gate: Scripts/vendir-check.sh [check ...] (bare run = all checks; needs vendir + yq). allowlist fails vendir.yml on keys or values outside the declared set (vendir drops unknown keys silently); resolve asserts each committed ref: resolves upstream to the lock's SHA (an unsynced ref: edit fails named); sync runs vendir sync --locked in a throwaway worktree of HEAD, then asserts a clean porcelain over the managed paths; locksha fails when entries sharing a git.url record different lock SHAs — the backstop for a literal typed in place of the shared &secp256k1-ref alias; ignorepaths probes raw.githubusercontent.com at each locked SHA and fails when a declared ignorePaths path exists upstream — the tripwire for a future upstream file being silently shadowed by a preserved shim (entries probe under newRootPath/ when the contents entry re-roots; exact-404-only pass, and only after an "anchor" file committed outside the ignore list answers 2xx — a dead pin 404s identically to an absent file; an entry naming a committed directory is a local finding; 429/5xx and transport trouble retried via curl's own backoff, then reported couldn't-verify). All five assert committed state (HEAD, not the working tree) — safe on a dirty working tree, but useless as a pre-commit hook. Exit 0 clean / 1 any drift found (dominates) / 2 nothing found but a check couldn't run.
  • Vendored-tree gate self-test: Scripts/vendir-check-test.sh [substring] — exercises vendir-check.sh against committed mktemp git fixtures (a PATH-stubbed spy curl covers the ignorepaths verdict branches hermetically; file:// fixture remotes run under a per-case VENDIR_CHECK_ALLOW_PROTOCOLS=file:https widening), then asserts the gate passes on the real tree. VENDIR_CHECK_TEST_OFFLINE=1 shrinks the real-tree leg to allowlist locksha for networkless runs.

Read the full file on GitHub · 95 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. 6d ago Changed · +7 lines · +169 tokens per session e64629ab6a3e
  2. 13d ago Changed · +10 lines · +141 tokens per session a294130774f7
  3. 18d ago Changed · +163 tokens per session 911b5ec7dc2e
  4. 19d ago Changed 4b71c0bed64f
  5. 20d ago Changed · +1 lines · +295 tokens per session ab8f40e07dc1
  6. 21d ago Changed · +27 tokens per session ccb1a1439659
  7. 22d ago Changed · -2 tokens per session b8a0188cf153
  8. 24d ago Changed · +1 lines · +144 tokens per session 77e8a8c450dc
  9. 25d ago Changed · +5 tokens per session 30ed981aeb0e
  10. 27d ago First seen · 76 lines · 2,246 tokens per session scan A 1ca1daba15d1

Subscribe to this mod's changes

swift-secp256k1 AGENTS.md is an instructions file published in the GitHub repository 21-DOT-DEV/swift-secp256k1 (161 stars, last pushed yesterday), licensed MIT. It adds 3,188 tokens to every session, about $0.0128 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

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

swift-secp256k1 AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
swift-secp256k1 AGENTS.md21-DOT-DEV/swift-secp256k1Instructions file161yesterdayMITA3,188Codex, 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