Setup
28.9kConfigura GBrain con auto-aprovisionamiento de Supabase o PGLite, inyección en AGENTS.md y primera importación.
- Costo de contexto al activarse
- 7.4k tok
- Tamaño del paquete
- 1 archivo
- Última actualización
- hace 4 días
Filtro de calidad previo a la escritura para todo lo que entra al brain: nada de cp/mv en crudo. Resuelve entidades con nombre por registro y aplica el árbol de decisión de dedup leyendo el primer resultado.
Reemplaza a: cp/mv directo de archivos al repo brain, Confiar solo en el score vectorial de gbrain search para detectar duplicados
en todo el repo
0–100, la ruta de este skill
último commit aquí
últimos 90 días
115 tok en reposo
16 KB
Funciona con cualquier agente que lea SKILL.md
npx -y skills add garrytan/gbrain --skill brain-ingest-gate --agent claude-codeSe instala solo en este repositorio.
Di cualquiera de estas frases y el agente debería cargar este skill.
Convention: see conventions/brain-first.md — the lookup chain (
gbrain entity→search→query→get) is the same chain this gate runs before every write.Convention: see _brain-filing-rules.md — when the gate's verdict is "write", the primary subject picks the directory.
Convention:
skills/conventions/quality.mdowns the cross-cutting page rules (citations, Iron Law back-linking, notability) — every page the gate lets through follows them. Gate-specific delta: the gate only decides write/link/skip; the admitting skill applies the quality rules on write.
No content enters the brain without passing this gate. A raw cp or mv
into the brain repo is a bug.
One insight, one place. If it already exists, link to it — don't clone it.
Before any new page is written (file migration, bulk import, manual
gbrain put, subagent output), two checks run in order:
Scope honesty: this gate is a routing convention — the harness resolves it into context when an ingest-shaped intent matches, and a well-behaved agent follows it. Nothing in the gbrain runtime mechanically blocks an unenriched or duplicate write if the skill never loads.
The native pipeline does NOT do semantic dedup for you:
gbrain import / gbrain sync skip only matching frontmatter IDs.
Identical content under a different slug or ID indexes twice — every
duplicate becomes a second search hit competing with the canonical page.gbrain capture's dedup is a 24-hour exact content-hash — it catches
re-captures of identical bytes, not the same insight reworded.remember verb dedupes facts, not pages.Semantic dedup and named-entity resolution are this skill's job, in full.
gbrain sync or gbrain import indexes them. For batches, also read
conventions/test-before-bulk.md:
gate 3-5 items and inspect the decisions before running the rest.gbrain put or gbrain capture of rich content, or
direct file writes into the brain repo.This skill is a gate, not a pipeline. It owns the pre-write checks below. Everything downstream of a "write" verdict is delegated to shipped skills — do not restate their steps here or inline:
| Concern | Delegate to |
|---|---|
| Routing new external content (meetings, articles, media) | ingest |
| Entity detection + notability on inbound content | signal-detector |
| Creating/updating person + company pages, tiered effort, backlinks | enrich |
| Concept pages, tiering, cluster synthesis | concept-synthesis |
| Back-link enforcement (Iron Law) | conventions/quality.md |
| Which directory the page lands in | _brain-filing-rules.md |
Fires whenever the content is about a NAMED project, place, company, person, or anything someone "wants to build / found / make."
Vector similarity alone cannot be trusted to catch named-entity dupes: a page stored under its chosen NAME will not embed close to the generic English phrase someone happens to describe it with. The classic failure: a search for a descriptive phrase scores the canonical named page below the prose floor, so a duplicate stub gets written on top of a years-old page. Stored by named meaning; retrieval attempted by literal generic phrase.
Resolve registry-first, not by the generic phrase. gbrain's native registry is the entity surface:
gbrain entity "<name>" # zero-LLM card: page, aka list, near-miss suggestions
A card hit means the page exists — STOP, link, don't clone. On a miss (or
for concept-shaped nouns), fall through to gbrain query "<name>" --limit 3.
If the brain also keeps an explicit index of named initiatives (e.g. a page
under concepts/), read it before concluding anything is new.
Expand through aliases before searching. Named pages should carry an
aliases: frontmatter list (generic label + chosen name + any nickname +
signature phrase). Search EACH alias and the generic label, not just the
phrase the user happened to say.
A vector score is a floor for prose, NEVER a gate for named things.
If there is ANY plausible named match, open and read the candidate page
(gbrain get <slug>) before concluding it doesn't exist. A named page can
be the right answer at a score that would be a clear miss for prose.
When a NEW named thing appears, bake its aliases in the same write.
Create the page with the full aliases: list so every future synonym
resolves through gbrain entity. One frontmatter list covers all future
phrasings — O(1), not a per-instance reminder.
A memory reminder ("query the real name, not the generic phrase") is a per-instance sticky note: it only works if it happens to be in hot context that turn, doesn't generalize to the next named entity, and rots. This skill loads when an ingest-shaped task routes here. Process rules belong in the triggered gate, not in hot memory.
Before writing ANY new page (for named things, the resolution gate above runs first and takes precedence):
Extract the core claim — 1-2 sentences capturing what's novel about the new content.
Search for it:
gbrain search "<core claim>" --limit 5
OPEN AND READ the top hit (gbrain get <slug>). Never band on the
score alone. Donor systems publish cosine cutoffs for this step — do NOT
port them: gbrain search returns fused hybrid rank scores, not cosine
similarity, and no numeric threshold maps across. The band comes from
reading, not from the number.
Assign a band:
| Band | Meaning | Action |
|---|---|---|
| clear-dup | The top hit already states the same insight about the same subject | STOP. Link to the existing page (gbrain link / gbrain timeline-add) instead of writing. |
| plausible-dup | Same territory; possibly a new angle | Read both fully. Same insight → link, don't write. Genuinely new angle → write WITH a cross-link to the existing page. |
| clear | Nothing in the top results covers the claim | Write normally through the delegated enrichment skills. |
New content to write
├─ Named thing? → Named-Entity Resolution Gate first
│ (entity card → alias-expanded search → READ the candidate)
├─ Extract core claim (1-2 sentences)
├─ gbrain search "<core claim>" --limit 5
└─ OPEN AND READ the top hit (gbrain get <slug>)
├─ clear-dup → STOP. Link to existing. Report "duplicate".
├─ plausible-dup → Read both. Same insight?
│ ├─ yes → STOP. Link to existing. Report "duplicate".
│ └─ no → Write with cross-link. Report "new angle".
└─ clear → Write via enrichment skills. Report "unique".
After the batch, verify the gate's output holds:
gbrain check-backlinks check # mentioned entities link back (fix with: check-backlinks fix)
gbrain backlinks <new-slug> # each new page has inbound links
gbrain search "<core claim>" --limit 3 # the insight has exactly ONE home
If check-backlinks check reports gaps on pages the gate just admitted, the
enrichment delegation was skipped — route back through
enrich before declaring the ingest done.
This skill guarantees:
aliases: frontmatter list in the same
write that creates them.gbrain check-backlinks check verification pass.writes_to:.The full behavior contract is documented in the body sections above; this section exists for the conformance test.
One decision line per item checked, then the verification result:
Ingest gate — 3 item(s) checked
| item | entity resolution | band | action |
|---|---|---|---|
| notes-on-widget-co.md | resolved: companies/widget-co | clear-dup | linked (timeline entry on companies/widget-co) |
| pricing-thesis.md | n/a (prose) | plausible-dup | new angle — written to concepts/ with cross-link to concepts/pricing-power |
| charlie-example-intro.md | miss (near-miss: people/charlie-example) | — | read near-miss; same person → linked, no new page |
Verification: check-backlinks check → 0 gaps on admitted pages
Every "linked" or "duplicate" row MUST name the matched slug. If any row says "written", the enrichment delegation (which skill handled it) should be recoverable from the conversation.
cp file.md <brain-repo>/concepts/ — raw copy, no gate, no enrichment.mv of a folder into the brain repo, then gbrain sync — sync
happily indexes every duplicate; matching-ID skip will not save you.aliases: list — the next synonym
creates the next duplicate.gbrain put —
single manual writes are where duplicate stubs come from.source + source_id) only makes RE-RUNS idempotent; it
does not catch cross-source duplicates or resolve named entities. This gate
is the semantic + named-entity layer bulk-ingestion runs on its Phase 3 trial
items and bakes into the codified pipeline (its Phase 1d/6). "Build a
large-corpus pipeline" → bulk-ingestion; "does this page already exist before
I write it" → this gate.Reproducido de garrytan/gbrain bajo licencia MIT. Leer esta página en markdown.
2 archivos en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.
Requiere el CLI gbrain (entity, search, query, get, link, timeline-add, check-backlinks) y el brain repo con directorios people/, companies/, concepts/, projects/.
Este repo incluye 75 skills. Si instalas uno, normalmente ya tienes los demás.
Configura GBrain con auto-aprovisionamiento de Supabase o PGLite, inyección en AGENTS.md y primera importación.
Chequeos de salud del brain: aplicación de back-links, auditoría de citas, validación de filing, detección de info obsoleta, páginas huérfanas y benchmarks.
Migra un brain de gbrain-base a la taxonomía de 14 tipos canónicos de gbrain-base-v2 usando gbrain onboard --check y el handler Minion unify-types.
Cuándo y qué recuperar: abre la página del brain de una entidad relevante antes de responder desde memoria.
Operaciones del brain: búsqueda primero, ciclo leer-enriquecer-escribir, atribución de fuentes, enriquecimiento ambiental y back-linking. Leer antes de cualquier interacción con el brain.
Importa exports de ChatGPT, Claude y Perplexity y transcripciones de sesiones como páginas fechadas en conversations/, valida y extrae hechos, y mantiene el archivo sin huecos con detección y backfill.
Archivista universal para archivos personales (Dropbox/B2/Gmail-takeout/disco local). Filtra contenido de alto valor y lo muestra de forma interactiva; exige un allow-list scan_paths explícito en gbrain.yml.
Transforma volcados de texto crudo de artículos en el brain en páginas estructuradas con resumen ejecutivo, citas textuales, insights clave, por qué importa y referencias cruzadas.
Operaciones del brain: búsqueda primero, ciclo leer-enriquecer-escribir, atribución de fuentes, enriquecimiento ambiental y back-linking. Leer antes de cualquier interacción con el brain.