skills/brain-ops/SKILL.md
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 skillsauth add garrytan/gbrain brain-opsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.mdfor the 5-step lookup protocol. Convention: Seeskills/conventions/quality.mdfor citation and back-link rules.
This skill guarantees:
[Source: ...] citations)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.
Before using ANY external API to research a person, company, or topic:
gbrain search "name" — keyword search for existing pagesgbrain query "natural question about name" — hybrid search for contextgbrain get <slug> — if you know the slug, read the full pageThe brain almost always has something. External APIs fill gaps, not start from scratch.
Every message, meeting, email, or conversation that references a person or company:
User's direct statements are the highest-value data source. Write them to brain
pages immediately with attribution [Source: User, YYYY-MM-DD].
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.
add_link calls needed for ordinary page writes.attended (meeting -> person), works_at, invested_in,
founded, advises, source (frontmatter), mentions (default).put_page MCP response includes auto_links: { created, removed, errors }
so the agent can verify outcomes.gbrain config set auto_link false. Default is on.gbrain timeline-add
(or batch via gbrain extract timeline --source db).Before answering any question about a person, company, or topic:
Don't answer from general knowledge when a brain page exists.
This is not a special mode. This is the default. Everything the user says is an ingest event.
Rules:
No separate output. Brain-ops is an always-on behavior layer, not a report generator. The output is updated brain pages and enriched responses.
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:
sources.id (immutable), never sources.name (mutable display).[default:slug] OR may omit the prefix
for backward compat.search, query, get_page, list_pages
carries source_id — always use it when citing, never guess.If a search result has source_id: "gstack" and slug: "plans/foo",
the citation is [gstack:plans/foo]. That's the whole rule.
[Source: ...] citationssearch — keyword searchquery — hybrid vector+keyword searchget_page — read a brain pageput_page — create/update brain pagesadd_link — cross-reference entitiesadd_timeline_entry — record eventsget_backlinks — check who references an entitysync_brain — sync changes to the indexresearch
Self-evolving skill optimization via SkillOpt-paper-grounded text-space optimizer.
development
Keep gbrain current. When a `gbrain` invocation prints an `UPGRADE_AVAILABLE <old> <new>` marker (or `gbrain self-upgrade --check-only` reports an update), apply it per the configured self_upgrade.mode: notify (prompt the operator with a 4-option question + snooze) or auto (apply silently). The action is always the hardcoded `gbrain self-upgrade` — never a command read from the marker.
data-ai
Set up GBrain with auto-provision Supabase or PGLite, AGENTS.md injection, first import
tools
--- name: query-helper triggers: - find a page tools: - search - query writes_pages: false --- # query-helper This skill helps you query the brain. The first prose line becomes the description when no `description:` frontmatter is present.