claude-code-second-brain AGENTS.md

Repository instructions for an AI coding agent working on the Claude Code Second Brain plugin, which observes the agent's messages and may offer occasional advice. They define what to read first and the project's privacy and safety boundaries.

In plain words
What is it for?
Use them when modifying the Second Brain plugin, especially its observation, advisory, privacy, or documentation code.
Why use it?
They help contributors preserve the plugin's intended quiet, non-blocking behavior and keep its privacy documentation accurate. They also reduce the risk of changing core design rules by accident.

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/shofer-dev/claude-code-second-brain/agents-md
Clone the repo
git clone --depth 1 https://github.com/shofer-dev/claude-code-second-brain

Made for: Codex, OpenCode.

Per session 513 This file is loaded in full into every session.
When invoked 513 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.00513 $0.00513
Opus 5 $0.00257 $0.00257
Sonnet 5 $0.00103 $0.00103
Haiku 4.5 $0.00051 $0.00051

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

Security

Grade A, and why

claude-code-second-brain 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 · 42 lines

How it starts

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

AGENTS.md

Guidance for agents working in this repository — the Second Brain Claude Code plugin (a background observer that drops rare, one-way advisories into a session). The sibling CLAUDE.md is a symlink to this file.

Read first

  • README.md — what it is and how it works; DESIGN.md — the reasoning, including what was evaluated and rejected; PRIVACY.md — exactly what leaves the machine; TODO.md — known gaps. Keep all four in sync with the code in the same change, current-state only.

Invariants

  • Silence is the success metric. Most passes must produce nothing. Any change that makes the advisor speak more often needs an explicit, design-level justification in DESIGN.md — a chatty Second Brain is a broken one.
  • One-way and non-blocking. The plugin only reads the agent's emissions (never tool results) and only ever injects a short advisory. It must never gain the ability to block, veto, pause, edit, ask, or write to the repository — that boundary is the product.
  • Privacy contract is load-bearing. Anything that changes what data is read, sent, or stored must update PRIVACY.md in the same change.

Working here

  • This is a public FOSS repo (github.com/shofer-dev). Never commit a credential, a private hostname, or a file referencing either by value; the plugin takes configuration at runtime.
  • Run the tests with run-tests.sh and keep them green before committing. It is also the pre-push gate (git-hooks/pre-push; activate once per clone with git-hooks/install.sh): a push with a red suite is refused. The suite needs only pytest; the script uses .venv when present and bootstraps one otherwise.
  • Commands live in commands/ (/second-brain-*), the observer loop in worker/, hook wiring in hooks/, monitors in monitors/ — skim the directory's files before changing its behaviour.

Read the full file on GitHub · 42 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 First seen · 42 lines · 513 tokens per session scan A 53b030e7cce8

Subscribe to this mod's changes

claude-code-second-brain AGENTS.md is an instructions file published in the GitHub repository shofer-dev/claude-code-second-brain (2 stars, last pushed 5d ago), licensed Apache-2.0. It adds 513 tokens to every session, about $0.0026 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-31.