/brain-ops
Brain knowledge base operations. The core read/write cycle: brain-first lookup, read-enrich-write loop, source attribution, ambient enrichment, back-linking. Read this before any brain interaction.
$ npx -y skills add garrytan/gbrain --skill brain-ops --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/brain-ops
Context preview
The summary Claude sees to decide when to auto-load this skill.
Brain knowledge base operations. The core read/write cycle: brain-first lookup, read-enrich-write loop, source attribution, ambient enrichment, back-linking. Read this before any brain interaction.
SKILL.md
brain-ops.SKILL.mdname: brain-ops
version: 1.0.0
description: |
Brain knowledge base operations. The core read/write cycle: brain-first lookup,
read-enrich-write loop, source attribution, ambient enrichment, back-linking.
Read this before any brain interaction.
triggers:
- any brain read/write/lookup/citation
tools:
- search
- query
- get_page
- put_page
- add_link
- add_timeline_entry
- get_backlinks
- sync_brain
mutating: true
writes_pages: true
writes_to:
- people/
- companies/
- deals/
- concepts/
- meetings/
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 `skills/conventions/brain-first.md` for the 5-step lookup protocol. > **Convention:** See `skills/conventions/quality.md` for citation and back-link rules.
> **Memory verbs (MEMORY_VERBS v1, gbrain ≥ 0.43).** Over MCP, prefer the five > frozen memory verbs for the read/write cycle: **`remember(fact, provenance, > ttl?)`** to save a single durable fact (mandatory provenance; dedupes + > supersedes), **`recall(query | entity, budget_tokens)`** to read it back > budget-packed, **`entity(name)`** for a zero-LLM card, **`synthesize(question)`** > for the expensive cross-page answer, **`forget(id)`** to expire a fact. Use > `remember` instead of `extract_facts` when you already have ONE formed fact; > `put_page` / `add_link` / `add_timeline_entry` stay the page/graph write path. > Fall back to the classic ops when the verbs aren't on the surface. Contract: > `docs/protocol/MEMORY_VERBS_v1.md`.
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 `skills/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. `gbrain search "name"` — exact-token lookup for existing pages (cheap hybrid, no expansion) 2. `gbrain query "natural question about name"` — concept/landscape questions go here FIRST (expansion recovers synonym phrasings; a nonzero `search` count is not proof of completeness) 3. `gbrain get <slug>` — if you know the slug, read the full page 4. Check backlinks: who references this entity? 5. Check 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
**User's direct statements are the highest-value data source.** Write them to brain pages immediately with attribution `[Source: User, YYYY-MM-DD]`.
Phase 2.5: Structured Graph Updates (automatic)
Every `put_page` call automatically extracts entity references and writes them to the graph (`links` table) with inferred relationship types. Stale links (refs no longer in the page text) are removed in the same call. This is "auto-link" reconciliation.
- No manual `add_link` calls needed for ordinary page writes.
- Inferred link types: `attended` (meeting -> person), `works_at`, `invested_in`,
`founded`, `advises`, `source` (frontmatter), `mentions` (default).
- The `put_page` MCP response includes `auto_links: { created, removed, errors }`
so the agent can verify outcomes.
- To disable: `gbrain config set auto_link false`. Default is on.
- Timeline entries with specific dates still need explicit `gbrain timeline-add`
(or batch via `gbrain extract timeline --source db`).
Phase 3: On Every Outbound Response (READ → PULL → RESPOND)
Before answering any question about a person, company, or topic:
1. **Check the brain** — read relevant pages 2. **Pull context** — use compiled truth + recent timeline 3. **Respond with context** — the brain makes every answer better
Don't answer from general knowledge when a brain page exists.
Phase 4: Ambient Enrichment
This is not a special mode. This is the default. Everything the user says is an ingest event.
- Person mentioned → check brain, create/enrich if needed (spawn background)
- Company mentioned → same
- Link shared → ingest it (delegate to idea-ingest)
- Data shared → delegate to appropriate skill
**Rules:**
- Never interrupt the conversation to do enrichment
- Spawn sub-agents for anything that would slow down the response
- Never announce "I'm enriching the brain" — just do it silently
Output Format
No separate output. Brain-ops is an always-on behavior layer, not a report generator. The output is updated brain pages and enriched responses.
Cross-source citation format (v0.18.0+)
When a brain has multiple sources (wiki, gstack, yc-media, etc.), every citation MUST include the source id: `[source-id:slug]`. Example:
> You told me about the retry budget approach — see > [wiki:topics/resilience] and [gstack:plans/retry-policy] for where > this came from.
Rules:
- The key is `sources.id` (immutable), never `sources.name` (mutable display).
- Single-sour
Read more
name: brain-ops version: 1.0.0 description: | Brain knowledge base operations. The core read/write cycle: brain-first lookup, read-enrich-write loop, source attribution, ambient enrichment, back-linking. Read this before any brain interaction. triggers: - any brain read/write/lookup/citation tools: - search - query - get_page - put_page - add_link - add_timeline_entry - get_backlinks - sync_brain mutating: true writes_pages: true writes_to: - people/ - companies/ - deals/ - concepts/ - meetings/
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 `skills/conventions/brain-first.md` for the 5-step lookup protocol. > **Convention:** See `skills/conventions/quality.md` for citation and back-link rules.
> **Memory verbs (MEMORY_VERBS v1, gbrain ≥ 0.43).** Over MCP, prefer the five > frozen memory verbs for the read/write cycle: **`remember(fact, provenance, > ttl?)`** to save a single durable fact (mandatory provenance; dedupes + > supersedes), **`recall(query | entity, budget_tokens)`** to read it back > budget-packed, **`entity(name)`** for a zero-LLM card, **`synthesize(question)`** > for the expensive cross-page answer, **`forget(id)`** to expire a fact. Use > `remember` instead of `extract_facts` when you already have ONE formed fact; > `put_page` / `add_link` / `add_timeline_entry` stay the page/graph write path. > Fall back to the classic ops when the verbs aren't on the surface. Contract: > `docs/protocol/MEMORY_VERBS_v1.md`.
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 `skills/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. `gbrain search "name"` — exact-token lookup for existing pages (cheap hybrid, no expansion) 2. `gbrain query "natural question about name"` — concept/landscape questions go here FIRST (expansion recovers synonym phrasings; a nonzero `search` count is not proof of completeness) 3. `gbrain get <slug>` — if you know the slug, read the full page 4. Check backlinks: who references this entity? 5. Check 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
**User's direct statements are the highest-value data source.** Write them to brain pages immediately with attribution `[Source: User, YYYY-MM-DD]`.
Phase 2.5: Structured Graph Updates (automatic)
Every `put_page` call automatically extracts entity references and writes them to the graph (`links` table) with inferred relationship types. Stale links (refs no longer in the page text) are removed in the same call. This is "auto-link" reconciliation.
- No manual `add_link` calls needed for ordinary page writes.
- Inferred link types: `attended` (meeting -> person), `works_at`, `invested_in`,
`founded`, `advises`, `source` (frontmatter), `mentions` (default).
- The `put_page` MCP response includes `auto_links: { created, removed, errors }`
so the agent can verify outcomes.
- To disable: `gbrain config set auto_link false`. Default is on.
- Timeline entries with specific dates still need explicit `gbrain timeline-add`
(or batch via `gbrain extract timeline --source db`).
Phase 3: On Every Outbound Response (READ → PULL → RESPOND)
Before answering any question about a person, company, or topic:
1. **Check the brain** — read relevant pages 2. **Pull context** — use compiled truth + recent timeline 3. **Respond with context** — the brain makes every answer better
Don't answer from general knowledge when a brain page exists.
Phase 4: Ambient Enrichment
This is not a special mode. This is the default. Everything the user says is an ingest event.
- Person mentioned → check brain, create/enrich if needed (spawn background)
- Company mentioned → same
- Link shared → ingest it (delegate to idea-ingest)
- Data shared → delegate to appropriate skill
**Rules:**
- Never interrupt the conversation to do enrichment
- Spawn sub-agents for anything that would slow down the response
- Never announce "I'm enriching the brain" — just do it silently
Output Format
No separate output. Brain-ops is an always-on behavior layer, not a report generator. The output is updated brain pages and enriched responses.
Cross-source citation format (v0.18.0+)
When a brain has multiple sources (wiki, gstack, yc-media, etc.), every citation MUST include the source id: `[source-id:slug]`. Example:
> You told me about the retry budget approach — see > [wiki:topics/resilience] and [gstack:plans/retry-policy] for where > this came from.
Rules:
- The key is `sources.id` (immutable), never `sources.name` (mutable display).
- Single-sour
Search gives you raw pages. GBrain gives you the answer. It's the brain layer your AI agent has been missing — the only one that does synthesis, graph traversal, and gap analysis in one box.
Repo: garrytan/gbrain
Other skills on gbrain.
- /voice-persona-mars
Route to Mars (introspective thought partner / demo showman voice persona). Used when the operator wants depth, meaning, or impressive social demos rather than logistics. Mars handles SOLO mode (philosophy, presence, patterns) and DEMO mode (tool-driven showmanship)
Open skill - /voice-persona-venus
Route to Venus (sharp executive-assistant voice persona). Used for logistics — calendar, tasks, recent messages, brain lookups — at sub-second phone-call latency. The default voice persona unless DEFAULT_PERSONA=mars is set.
Open skill - /voice-post-call
Post-call handling for a voice session — turn the transcript into a brain page, post the summary to the operator's messaging surface, archive the audio. Belt-and-suspenders: fires both from a tool the voice persona can call mid-call AND from the automatic call-end handler in
Open skill - /retrieval-reflex
When/what to retrieve — open the brain page for a salient entity before answering from memory.
Open skill - /academic-verify
Verify a research claim or academic citation by tracing it through publication → methodology → raw data → independent replication. Routes through perplexity-research for the actual web lookup, then formats results as a citation-checked brain page. Use when a
Open skill - /archive-crawler
Universal archivist for personal file archives (Dropbox/B2/Gmail-takeout/local-mount/hard-drive-dump). Filters for high-value content (the user's own writing, ideas, relationships) and surfaces it interactively. REFUSES TO RUN without an explicit gbrain.yml
Open skill

