ClipBrain: Instructions file for Codex

AGENTS.md

ClipBrain AGENTS.md is an instructions file for Codex, OpenCode from agentpilled/ClipBrain. It costs 1,011 tokens per session, scanned A, original, MIT.

A set of instructions for coding agents working on ClipBrain, a Chrome extension and local Bun server that captures web pages, email threads, videos, PDFs, and Kindle highlights into a personal knowledge base.

In plain words
What is it for?
Use it when modifying ClipBrain's server, browser extension, capture tools, diagnostics, knowledge-base sync, or cleanup workflows.
Why use it?
It gives an agent the project's structure, runtime details, operating rules, and security boundaries. This reduces guesswork and helps the agent avoid unsafe or incorrect changes.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/agentpilled/clipbrain/agents-md"><img src="https://agentmods.dev/badge/instructions/agentpilled/clipbrain/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,011 This file is loaded in full into every session.
When invoked 1,011 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.01011 $0.01011
Opus 5.5 $0.00404 $0.00404
Sonnet 5.5 $0.00202 $0.00202
Haiku 4.5 $0.00101 $0.00101

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

Security

Grade A, and why

ClipBrain 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 2mo 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.

curl -sS http://127.0.0.1:19285/health
AGENTS.md · 89 lines

How it starts

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

ClipBrain Agent Instructions

This file is for Codex and other coding agents working in this repo. Claude Code can use CLAUDE.md; keep this file shorter and focused on operational rules.

Project Shape

ClipBrain is a Chrome extension plus a local Bun HTTP server. The extension captures web pages, Kindle highlights, Gmail threads, YouTube transcripts, and PDFs. The server writes captures to the user's local knowledge base through the installed gbrain CLI and optionally syncs markdown to Obsidian.

Important files:

  • server.ts: local HTTP API, dashboard routes, capture handling, diagnostics
  • clipbrain-mcp.ts: ClipBrain-specific MCP tools that call the local server
  • backfill.ts: controlled Knowledge Compiler backfill for legacy captures
  • corpus-report.ts: read-only corpus quality report for junk/duplicate audit
  • cleanup-plan.ts: read-only cleanup recommendations; never deletes or writes
  • cleanup-apply.ts: explicit approval-gated cleanup executor with backups/logs
  • gbrain-list.ts: shared robust gbrain list scanner used by server, corpus, and cleanup flows
  • doctor.ts: first-run diagnostics for launch readiness and local setup issues
  • twitter-agent.ts: draft-only building-in-public generator; never posts to X
  • service-worker.js: MV3 background worker, capture dispatch, offline queue
  • content-script.js, kindle-content-script.js, gmail-content-script.js: page extractors
  • post-process.ts: optional OpenAI enrichment after a capture is saved
  • dashboard.html, popup.html, popup.js: local UI surfaces
  • setup.sh, setup-mcp.sh: local install and MCP configuration
  • test/: Bun tests for server and post-processing behavior

Runtime Facts

  • Use Bun. Primary checks are bun run doctor, bun test, bun audit, and shell syntax checks for setup scripts.
  • The server binds to 127.0.0.1:19285 by default. It can be overridden with --host, --port, GBRAIN_CAPTURE_HOST, and GBRAIN_CAPTURE_PORT.
  • MCP setup registers both gbrain (gbrain serve) and clipbrain (bun clipbrain-mcp.ts). Keep gbrain for broad brain tools; use clipbrain for ClipBrain-specific agent handoffs such as context_pack.
  • Do not reintroduce a vendored gbrain dependency or local ./bin/gbrain build path. The app should use GBRAIN_BIN when set, then gbrain from PATH.
  • package-lock.json is intentionally absent. This repo uses bun.lock.
  • Runtime data files such as .captures.jsonl, .highlight-count, .highlight-counts.json, .clipbrain.json, .cleanup-actions.jsonl, and .cleanup-backups/ must stay out of commits. Tests should use CLIPBRAIN_DATA_DIR for isolated state.
  • Use bun run backfill --limit N for a dry-run before applying compiler upgrades with bun run backfill --apply --limit N.
  • Use bun run corpus to inspect likely junk, duplicate titles, and pending compiler upgrades. It is read-only.
  • Use bun run cleanup-plan to turn the corpus audit into a read-only keep/delete/merge/title-fix proposal before any manual cleanup.
  • Use bun run cleanup-apply for a dry-run of executable cleanup operations. Never run it with --execute unless the user has approved exact --approve action:slug tokens.

Read the full file on GitHub · 89 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. 2mo ago First seen · 89 lines · 1,011 tokens per session scan A f5a2a3e0c350

Subscribe to this mod's changes

ClipBrain AGENTS.md is an instructions file published in the GitHub repository agentpilled/ClipBrain (24 stars, last pushed 4mo ago), licensed MIT. It adds 1,011 tokens to every session, about $0.0040 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

ClipBrain AGENTS.md compared with instructions from other repositories

ClipBrain AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ClipBrain AGENTS.mdagentpilled/ClipBrainInstructions file244mo agoMITA1,011Codex, 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