본문으로 건너뛰기
cccskills
무료GitHub에 공개

brain-ops

Look up people, companies, and topics in an existing knowledge base before answering. Save authorized information with source references, update related pages and timelines, and maintain links that connect each record to its context.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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.

설치 방법 보기

이럴 때 유용합니다

  • Recall past discussions about a company
  • Save new facts with source references
  • Review changes across records and timelines
  • Connect people and company records

포함된 파일(1)

  • SKILL.md16.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Brain Operations — The Ambient Context Layer

Recall relevant context before responding. Save explicit requests with provenance; automatic capture is off until the user opts in. Reading this skill does not enable capture, delegation, or paid enrichment. A chat-only instruction suppresses writes for that turn, including when standing capture is enabled.

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 core 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 withdraw active memory (history, source material, and backups may remain). context_pack and delta complete the seven-verb surface. 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.

Tight-budget page questions: explicitly use recall({query: "zebra telescope", budget_tokens: 75, budget_policy: "query_first"}) so ranked page evidence packs before recent facts. CLI: gbrain recall --query 'zebra telescope' --budget-tokens 75 --budget-policy query_first --json. Keep entity-first, event/session-filtered and fact-focused questions on their existing facts-first route; do not change context_pack. Costs are character-based estimates, and an oversized first item is dropped without skipping or truncation. Read budget_packing before interpreting an empty result as missing memory. See skills/query/SKILL.md for the MCP request and caller example. Guidance is not native-harness activation: adoption remains unverified until a fresh conversation is observed making the opted-in call.

Choose a readback path that can see the intended visibility. Trusted local CLI callers can recall and withdraw private facts. Every MCP caller, including stdio, and a thin CLI connected to MCP currently have world-only fact recall and withdrawal. A request to remember does not authorize making real private information world-visible. Use a trusted local write/readback path for private memory when available. If only remote access is available, a successful private write receipt confirms storage, but private recall remains unverified; explain that limit and the trusted local path needed for private readback or withdrawal. Do not widen visibility or request broader OAuth scopes merely to make verification pass. For an MCP connection test, use only a harmless synthetic visibility: "world" fixture with the user's test authorization, retain its ID, and withdraw it afterward.

<REDACTED:pattern> in a result (for example <REDACTED:url_credentials> or <REDACTED:high_entropy_assignment>) means the brain holds a credential-shaped value there and withheld it from this response; the stored page is unchanged. Tell the user which kind of value was withheld and that it is readable on the brain host. Do not retry other operations to recover it, and do not echo a guess. A credential the user asked you to remember is withheld from remote recall by design: every MCP caller, including stdio, and a thin CLI connected to MCP is remote, so only gbrain recall run on the brain host shows it as written. Docs: docs/guides/write-refusals.md#secret-scan-refusals-and-redaction.

Keyless brains: when extract_facts returns skipped: extraction_unavailable, YOU are the extractor — pull the facts from the turn yourself and write each one via remember with kind set (event | preference | commitment | belief | fact — those five are the frozen protocol enum; the idea kind the extractor and DB carry is NOT one of them) and the visibility the envelope's agent_action names (default private — pin it; remember defaults to world), or author a ## Facts fence on the entity page. A skipped: extraction_failed envelope (server-side extractor errored on this turn; reason names why) invites the same manual remember fallback for that turn — automatic extraction stays on for future writes.

Contract

This skill guarantees:

  • Brain is checked BEFORE any external API call (brain-first lookup)
  • Explicit save requests and opted-in inbound signals trigger the READ → WRITE loop; enrichment requires its separately configured authority
  • 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 entity "<name>" (v0.43+) — ONE known person/company/project → full card (description, aliases, open threads, recent events, edges, backlink/fact counts). Zero LLM calls, sub-100ms. This one call replaces steps 2–6 for known-entity lookups; near-misses return suggestions.
  2. gbrain search "name" — exact-token lookup for existing pages (cheap hybrid, no expansion)
  3. gbrain query "natural question about name" — concept/landscape questions go here FIRST (meaning-match plus reranking recovers synonym phrasings; --expand adds LLM rewrites when results look thin; a nonzero search count is not proof of completeness)
  4. gbrain get <slug> — if you know the slug, read the full page
  5. Check backlinks: who references this entity?
  6. Check timeline: recent events involving this entity

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

⚠️ NEVER scope/count a corpus with shallow ls — query gbrain or find. Federated sources often carry MULTIPLE coexisting directory conventions — a flat legacy layer AND a date-nested meetings/YYYY/MM/ layer. A non-recursive ls dir/*.md sees only one and undercounts massively. Real example: a shallow ls of one source's meetings/ counted 132 files, almost all the user's, and concluded that WAS the corpus — missing thousands of transcripts nested under meetings/YYYY/MM/. To count/scope a brain corpus:

  • Best: gbrain sources list (shows per-source indexed page counts) + gbrain query. gbrain indexes ALL federated sources correctly; trust its index, not the filesystem.
  • If you must hit the FS: find <dir> -name '*.md' | wc -l, never ls *.md. Then map the layout: find <dir> -name '*.md' | sed -E 's#(.*/)[^/]+$#\1#' | sort | uniq -c.
  • The bug is never "gbrain can't see the source" — it's almost always a shallow FS glob. Verify against gbrain sources list before believing a low count.

Phase 1.5: Analytical Queries (gbrain think)

For questions that need synthesis, temporal grounding, or analytical answers — not just "find the page" but "answer the question":

  1. Use gbrain think "<question>" — multi-hop synthesis across pages + takes + the graph. Temporal questions route through trajectory analysis; everything else gets an LLM-synthesized, cited answer with conflict + gap analysis. Returns a grounded answer, not just a list of matching pages.
  2. Best for: "when did acme-example last raise", "what was the ARR in March", "what changed since Q1", "who is alice-example's cofounder and what are they working on", "summarize our relationship with acme-example".
  3. Falls back gracefully to standard retrieval when no timeline facts match.
  4. Cost: LLM calls per question — this is the expensive path. Use query for simple page lookups where you just need the slug or a quick context check.

Phase 2: Authorized Capture (READ → WRITE)

For an explicit save request, or a message within the user's opted-in capture scope that has no chat-only restriction:

  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, save supplied information with provenance; invoke enrichment only when separately authorized

Attribute the user's direct statements with [Source: User, YYYY-MM-DD]. Without capture authorization, use the information in the current conversation without persisting it. Explicit remembering does not enable ongoing capture.

Phase 2.5: Structured Graph Updates (auto-link)

"Auto-link" reconciliation extracts entity references from a page and writes them to the graph (links table) with inferred relationship types; stale links (refs no longer in the page text) are removed. WHO runs it depends on the write path:

  • Trusted local writes (gbrain put, gbrain capture, gbrain call put_page) auto-link inline and return auto_links: { created, removed, errors }.
  • MCP callers (stdio AND HTTP) return auto_links: { skipped: "remote", hint } and auto_timeline: { skipped: "remote" }. Body wikilinks are saved as text. A post-commit effect then adds plain mentions edges to pages that already exist in the same source (auto_links.mention_links: "queued"; gbrain config set mcp.remote_auto_links off turns it off). Typed, frontmatter and timeline edges are not part of it: a stdio gbrain serve reconciles those asynchronously with its maintenance sweep (startup + 10-minute idle ticks). gbrain serve --http does not self-sweep — reconcile on demand with gbrain sweep --once (delegates to the live serve over IPC) or gbrain extract links --source db. Use add_link for relationships you need immediately, except meeting attendance, which auto-link derives from the meeting page. Untrusted body text can plant ranking-boosting edges, which is why the inline path is local-only.
  • Inferred link types: attended, works_at, invested_in, founded, advises, source (frontmatter), mentions (default). Where the active schema pack does not override attendance (gbrain-base-v2, which gbrain init sets), attended comes only from a meeting page's explicit attendee list (its Attendees: line or attendees: frontmatter) and points person -> meeting; a pack that overrides it, such as the older gbrain-base, sets its own rule and direction.
  • 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: Optional Enrichment

Enrichment is an additional user choice. Neither a mentioned entity, a shared link, nor capture opt-in authorizes external research, paid calls, or delegation by itself. Follow an explicit ingestion/enrichment request or the user's stored scope and spending policy. Without that authority, recall existing context and save only the supplied information that the user authorized retaining.

Use background agents only when delegation is authorized and supported by the harness. Report observed results without claiming a generated routine ran.

Output Format

Use retrieved context in the response and cite it. Confirm authorized writes only after readback; if no write was requested or opted in, do not persist the conversation merely to produce a memory update.

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-source brains still write [default:slug] OR may omit the prefix for backward compat.
  • Every page payload returned by 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.

When it fails

Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:

  • put_page returns revision_conflict: re-read the page, merge your change into the new text, and save with the new revision. write_pending (exit 10): poll get_write_request (gbrain write-request <request_id>) before claiming the write landed.
  • put_page (or capture, tags, timeline) returns owner_unavailable with detail: unbound_source: this is a classic Postgres brain. Write the page as a file in the source's checkout, commit, and run gbrain sync --source <id>; if you are remote, give those three steps to the user. Never claim the source or switch modes to get the write through (see the agent operator protocol).
  • A write is refused by the secret scan or a slug fence (permission_denied): do not strip or rename to dodge it; tell the user what was refused and why (see docs/guides/write-refusals.md).
  • recall / search returns nothing with a degraded notice or search_degraded: say the brain is searching keywords only right now, not that nothing is saved.
  • insufficient_scope / scope_denied over MCP: the connection lacks that scope. Tell the user; never ask for a broader token just to make a write pass.

Anti-Patterns

  • Answering questions about people/companies without checking the brain first
  • Using external APIs before checking the brain
  • Writing facts without inline [Source: ...] citations
  • Blocking the response to do enrichment
  • Overwriting user's direct statements with lower-authority sources
  • Creating brain pages for non-notable entities
  • Creating duplicate pages for the same entity — always check first before creating: gbrain entity "<name>" (catches aliases + near-misses), then query with name variants

Tools Used

  • search — cheap hybrid search (vector + keyword, no expansion)
  • query — hybrid search for concept/landscape questions (--expand adds LLM multi-query expansion)
  • get_page — read a brain page
  • put_page — create/update brain pages
  • add_link — cross-reference entities
  • add_timeline_entry — record events
  • get_backlinks — check who references an entity
  • sync_brain — sync changes to the index

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Check research claims cited in books, articles, or conversations by tracing the original paper, methods, underlying data, and independent replication. Save a sourced assessment explaining whether the claim holds up and what remains uncertain.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Check a study cited in a book
  • Trace a numerical claim in an article to its source data
  • Verify research evidence before using it in writing
garrytan/gbrain3.1만2026년 10월 20일 업데이트

Explore old files and email archives to rediscover personal writing, ideas, and meaningful conversations. Review selected items one at a time, save worthwhile material as organized notes, and track progress within explicitly permitted folders.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Rediscover old journals and creative writing
  • Find meaningful letters and email conversations
  • Recover past product and business ideas
garrytan/gbrain3.1만2026년 10월 20일 업데이트

Restructure raw article text stored in gbrain into summaries, exact quotes, key insights, and links to related pages. Preserve the original text and connect the article's significance to projects and interests already recorded in gbrain.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Organizing saved articles into readable notes
  • Collecting exact quotes for essays
  • Connecting articles to current projects
garrytan/gbrain3.1만2026년 10월 20일 업데이트

ask-user

무료

Present clear choices when a task needs a human decision, then pause execution until the user replies. This reusable interaction pattern supports filing decisions, priority selection, and confirmation before destructive actions, with an option to decline.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Clarifying requests with several possible meanings
  • Confirming before bulk deletion or overwriting
  • Choosing where to file meeting notes
garrytan/gbrain3.1만2026년 10월 20일 업데이트

Collect public posts across a blog, newsletter, or feed archive and save clean Markdown pages for each article. The workflow avoids duplicates, supports resumed runs, repairs empty results, and hands articles to a separate enrichment skill.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Importing a blog's public article archive
  • Organizing public newsletter posts as knowledge pages
  • Rerunning a feed import without duplicates
garrytan/gbrain3.1만2026년 10월 20일 업데이트

Create a detailed chapter-by-chapter reading companion from an EPUB or PDF, connecting the book’s ideas to experiences and words saved in your personal knowledge store. The result highlights parallels without prescribing actions.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Connect a book’s ideas to personal experiences
  • Review detailed chapter summaries alongside personal reflections
  • Create a parent’s guide for reading a children’s book aloud
garrytan/gbrain3.1만2026년 10월 20일 업데이트

garrytan의 스킬 모두 보기

이 스킬의 문제 신고