brain-ops

brain-ops is a skill for Claude Code, Codex from timurgaleev/memex. It costs 42 tokens per session (1,556 once invoked), scanned A, original, MIT.

The core operating rules for a personal knowledge base: look up existing information, enrich it, write updates, cite sources, and maintain links between related pages. It is meant to be read before using the knowledge base.

In plain words
What is it for?
Use it whenever you research or update a person, company, topic, or other knowledge-base entry. It guides the read-enrich-write cycle and the required source and backlink handling.
Why use it?
It reduces duplicate work and unsupported claims by checking existing context first and recording where new facts came from. It also keeps entity pages connected to the pages that mention them.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it whenever you research or update a person, company, topic, or other knowledge-base entry. It guides the read-enrich-write cycle and the required source and backlink handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/timurgaleev/memex/brain-ops
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.

Any agent
npx skills add timurgaleev/memex --skill brain-ops
Clone the repo
git clone --depth 1 https://github.com/timurgaleev/memex

Made for: Claude Code, Codex.

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 brain-ops

README.md
[![agentmods](https://agentmods.dev/badge/skills/timurgaleev/memex/brain-ops/github.svg)](https://agentmods.dev/skills/timurgaleev/memex/brain-ops)
Your own site
<a href="https://agentmods.dev/skills/timurgaleev/memex/brain-ops"><img src="https://agentmods.dev/badge/skills/timurgaleev/memex/brain-ops/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 brain-ops

Your own site · 80×15
<a href="https://agentmods.dev/skills/timurgaleev/memex/brain-ops"><img src="https://agentmods.dev/badge/skills/timurgaleev/memex/brain-ops.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,556 The whole file, excluding the scripts and references it only reads on demand.
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.00042 $0.01556
Opus 5.5 $0.00017 $0.00622
Sonnet 5.5 $0.00008 $0.00311
Haiku 4.5 $0.00004 $0.00156

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

Security

Grade A, and why

brain-ops 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 1mo 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.

deploy/skills/brain-ops/SKILL.md · 172 lines

How it starts

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

Brain Operations — The Ambient Context Layer

The brain is not an archive. It is a live context membrane that every interaction flows through in both directions.

Convention: See conventions/brain-first.md (via get_skill conventions/brain-first) for the 5-step lookup protocol. Convention: See conventions/quality.md (via get_skill conventions/quality) for citation and back-link rules.

Contract

This skill guarantees:

  • Brain is checked BEFORE any external API call (brain-first lookup)
  • Every inbound signal triggers the READ → ENRICH → WRITE loop
  • Every outbound response checks brain for relevant context
  • Source attribution on every fact written (inline [Source: ...] citations)
  • User's direct statements are highest-authority data
  • Back-links maintained on every brain write (Iron Law)

Iron Law: Back-Linking (MANDATORY)

Every mention of a person or company with a brain page MUST create a back-link FROM that entity's page TO the page mentioning them. An unlinked mention is a broken brain. See conventions/quality.md for format.

Phases

Phase 1: Brain-First Lookup (MANDATORY)

Before using ANY external API to research a person, company, or topic:

  1. search "name" — hybrid retrieval (no expand knob; expansion is off in the default mode bundles)
  2. query "natural question about name" — same retrieval with broader controls; escalate here with expand: true when the question is conceptual and step 1 came back thin
  3. page_get <slug> — if you know the slug, read the full page
  4. Check backlinks: who references this entity?
  5. Check entity_timeline: recent events involving this entity

The brain almost always has something. External APIs fill gaps, not start from scratch.

Phase 2: On Every Inbound Signal (READ → ENRICH → WRITE)

Every message, meeting, email, or conversation that references a person or company:

  1. Detect entities — people, companies, deals mentioned
  2. Load brain pages — read existing pages for context before responding
  3. Identify new information — what does this signal tell us that the page doesn't know?
  4. Write it back — update the brain page with new info + timeline entry + source citation
  5. Create if missing — if notable and no page exists, create via enrich skill

Read the full file on GitHub · 172 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. 1mo ago First seen · 172 lines · 42 tokens per session scan A dbccb3b169af

Subscribe to this mod's changes

brain-ops is a skill published in the GitHub repository timurgaleev/memex (11 stars, last pushed 21d ago), licensed MIT. It adds 42 tokens to every session and 1,556 once invoked, about $0.0002 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

Other skills, from other repositories

memory

Use this skill when Pioneer should proactively use durable memory or recalled context: decide whether memory can improve a turn, answer from remembered user/project facts, request memory tools, search/list/get stored memories, save durable preferences or project decisions, forget memories, audit or clean up memory, or…

pioneerdotai/pioneer · 64 tokens

thebrain-ingest

Lay material into TheBrain as a connected graph rather than a pile of notes. Use when asked to "put this article in my brain", "save this", "add it to the knowledge base", "break this down and record it" — about an article, a document, a discussion, a research result or the user's own thinking. Covers: how finely to…

yBookoff/thebrain-mcp · 112 tokens

thebrain-organize

Tidy up TheBrain: find duplicates, thoughts with no links, empty stubs, scattered branches about the same thing. Use when asked to "clean up my brain", "find duplicates", "what is dangling with no links", "sort this out", "the structure has drifted". Covers: how to hunt for disorder, what you may fix yourself, and…

yBookoff/thebrain-mcp · 85 tokens

thebrain-digest

Report what happened in the brain over a period, and what deserves going back to. Use when asked "what did I add this week", "show me a digest", "what have I been working on", "what is new in the brain", and at the start of a session when the context of previous work needs recalling. Covers: how to read the…

yBookoff/thebrain-mcp · 94 tokens

weasley-deepmind

A reference for using weasley-deepmind, a server that stores and retrieves an AI agent’s long-term memories between sessions. It describes memory storage, search, language processing, and related tools.

potatohoney-p/weasley-deepmind · 0 tokens

thebrain-research

Use TheBrain as a knowledge base when answering a question: look at what is already known first, and only then reason. Use when asked "what do I know about X", "what do I have on this topic", "have we discussed this already", "remind me what we concluded", and before any substantive answer on a topic that might be in…

yBookoff/thebrain-mcp · 110 tokens