thunderbolt AGENTS.md

Repository instructions for Thunderbird/Thunderbolt, covering coding principles, TypeScript, React, tools, libraries, and how to use React’s useEffect feature.

In plain words
What is it for?
Use them when changing TypeScript or React code, choosing project tools, handling errors, or implementing record-deletion flows.
Why use it?
They give coding agents consistent rules for writing readable code and handling data safely, including when records should be hidden instead of permanently deleted.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/thunderbird/thunderbolt/agents-md
Clone the repo
git clone --depth 1 https://github.com/thunderbird/thunderbolt

Made for: Codex, OpenCode.

Per session 6,549 This file is loaded in full into every session.
When invoked 6,549 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.06549 $0.06549
Opus 5 $0.03275 $0.03275
Sonnet 5 $0.01310 $0.01310
Haiku 4.5 $0.00655 $0.00655

Measured today against content hash 16f8be34778b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

thunderbolt 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 today.

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

How it starts

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

Core Principles

  • Bias towards tasteful simplicity - favor elegant, readable, maintainable solutions that add minimal complexity. Avoid over-engineering, premature optimization, and defensive coding patterns that obscure intent.
  • Always implement proper, architectural solutions - no shortcuts, hacky fixes, or temporary workarounds. Research best practices when needed.
  • Prefer optimistic code over defensive code - let errors surface loudly during development rather than wrapping everything in if-checks and try/catch blocks. Handle errors architecturally at higher levels (e.g., error handling middleware).
  • Deletes (soft vs hard)
    • Frontend: Never hard delete. Always soft delete data (set deletedAt; call APIs that update rather than permanently remove). The only exception is flows that explicitly perform account or device removal (e.g. “Delete account”), which call backend endpoints that hard delete by design.
    • Backend: Prefer soft deletes—set deletedAt and filter out soft-deleted records in queries. Use hard delete only when required: e.g. account deletion (user and related data), PowerSync delete operations, or other cases where permanent removal is by design.
  • Question and recommend alternatives - your goal is better outcomes, not blind execution. Stop and ask for input when appropriate.

TypeScript & Code Style

  • Never use any in TypeScript
  • Prefer type over interface
  • Prefer arrow functions over function keyword
  • Prefer const over let - create helper functions with early return instead of setting let variables inside conditionals
  • Use camelCase for const and variable names
  • Prefer early return over long if statements and nested code
  • Use direct imports: useEffect not React.useEffect
  • Prefer top-level imports over inline/dynamic imports (await import(...)) when no circular dependency exists
  • Prefer async/await over .then/.catch
  • Add JSDoc comments to new utility functions
  • Only comment non-obvious code - avoid useless comments like "// Save data collection mutation" before saveDataCollection()
  • Loosely prefer one React component per file

Read the full file on GitHub · 272 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. today Changed · +2 lines · +237 tokens per session 16f8be34778b
  2. 2d ago First seen · 270 lines · 6,312 tokens per session scan A 85f17f9fdb34

Subscribe to this mod's changes

thunderbolt AGENTS.md is an instructions file published in the GitHub repository thunderbird/thunderbolt (4,762 stars, last pushed today), licensed MPL-2.0. It adds 6,549 tokens to every session, about $0.0327 per session on Opus 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.