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
Filtra las preguntas de identidad al usuario: agota toda la cadena de búsqueda del brain antes de preguntar, y si aún así escala, lo hace con una hipótesis, no en blanco.
Reemplaza a: Preguntar directamente al usuario 'quién es X' sin investigar antes
en todo el repo
0–100, la ruta de este skill
último commit aquí
últimos 90 días
109 tok en reposo
14 KB
Funciona con cualquier agente que lea SKILL.md
npx -y skills add garrytan/gbrain --skill resolve-before-asking --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 for the base lookup chain (search → query → get_page → external APIs). This skill extends that chain one hop further, to the human boundary: asking the user is the LAST resort, after the brain AND external escalation, not a shortcut around them.
Convention: see _brain-filing-rules.md — pages touched by the ingest-resolution section file by primary subject (
people/,companies/).
Never ask the user "who is X?" when the answer already exists in the brain.
The memory answers before the human is bothered — that is the product promise. This skill defines the lookup chain that runs before any entity-identification question is sent to the user, and the escalation format when asking really is justified.
The pattern: the agent encounters an entity with a rich brain page — timeline entries, meeting history, an imported message archive — and instead of reading them, asks the user "who is X?". This is lazy escalation. It spends the user's attention on questions the system can answer itself.
Examples of the bug (anonymized):
This is a harness-routing convention, not a mechanical guarantee: route here whenever ANY of these are true —
[To be filled by content analysis] or similar
placeholder text.think — cross-brain synthesis (solves most cases)gbrain think "Who is {entity}? What is their relationship to the user? What role do they play? Use all available context — meetings, timeline, imported archives, facts."
think synthesizes across ALL brain data. If the entity has a page with
imported-activity stats, timeline entries, and meeting history, think will
connect the dots. Over MCP, entity("{entity}") first gives a zero-LLM card
(aliases, last-touched, top edges); synthesize is the heavy cross-page
answer when the card isn't enough.
If this returns a clear answer → STOP. Use the answer. Do not ask the user.
search + full page readgbrain search "{entity}" --limit 5
gbrain get {entity-slug}
What to look for:
relationship field in frontmatter — filled means resolved.If timeline entries repeat a consistent role → STOP. The role is obvious. Do not ask the user.
Don't hardcode channels. Check what the brain holds, then query it:
gbrain sources list
gbrain query "emails with {entity}" --limit 10
gbrain query "meetings with {entity}" --limit 5
Whatever is mounted — an email archive, calendar imports, chat transcripts, meeting notes — a handful of subject lines or meeting titles usually reveals the relationship:
gbrain timeline {entity-slug} --limit 20
gbrain backlinks {entity-slug}
gbrain graph {entity-slug} --depth 2
Dated events, who references this entity, and what it connects to. A person who back-links from a company page and three meeting pages is not an unknown.
Only after steps 1–4 return nothing useful. Run a generic web search on
"{entity name} {company/domain hints accumulated in steps 1-4}". Fold
anything found back into the brain page before using it (the brain-ops
read-enrich-write cycle), so the next lookup doesn't repeat the work.
Only after ALL previous steps return nothing conclusive:
Use ask-user for the choice-gate mechanics (2–4 options, escape hatch, stop the turn).
think/synthesize gives a clear answer,
OR 3+ timeline entries carry a consistent role description, OR the page's
relationship field is filled.There is no third state. Either the brain answered (use it) or it didn't (finish the chain, then ask with a hypothesis).
When ANY ingestion pipeline (email import, calendar enrichment, chat transcripts, meeting ingestion) creates or significantly updates a person or company page, resolve the entity's identity and relationship immediately — never leave placeholder text. Pages like
[To be filled by content analysis]> Contact from the user's personal network.## Context sectionare bugs, especially when the ingestion batch itself contains hundreds of signals about who the person is. Run this as a post-ingestion pass over every page the batch created or updated:
[To be filled, Unknown relationship, TBD). No placeholders AND
relationship filled → skip, already resolved.think needs).put_page): fill the relationship frontmatter
field, replace the placeholder description with a real one-liner, update
the ## Context or intro paragraph.Before running the chain, the sender's domain often seeds the hypothesis:
| Domain shape | Hypothesis |
|---|---|
@acme-example.com — a company already in the brain |
Likely acme-example employee. Confirm against the company page + shared meetings, then fill. |
| Corporate domain NOT in the brain | New company. Run the chain; consider seeding a companies/ page. |
| Personal domain (gmail, etc.) | No shortcut — run the full chain. |
A resolved page passes this test: if the user encounters the name in a briefing, triage, or meeting prep, the page's first line says who they are WITHOUT the user needing to ask.
> Contact from the user's personal network.> Operations lead at acme-example — handles invoicing and vendor onboarding for the user.This skill guarantees:
writes_to: directories, filed by primary
subject per _brain-filing-rules.md.Two possible outputs:
(a) Resolved silently — the identity is used in the current flow; if a
page had a placeholder, it is filled (put_page) as a side effect. No message
to the user about the lookup.
(b) Escalation with a hypothesis — formatted per the ask-user choice gate:
🔀 **Is {entity} the {best guess}?**
Searched: think, search + page read, mounted sources, timeline/graph, web.
Found: recurring invoices from @widget-co.com; two meetings alongside the
acme-example team. Nothing names their role directly.
1. **Confirm** — {entity} is {best guess}
2. **Correct me** — it's someone else (tell me who)
3. **Skip** — leave unresolved for now
After emitting the gate, stop the turn (see ask-user).
[To be filled by content analysis] on a page whose ingestion
batch carried hundreds of signals.jane@acme-example.com).memory_search for entity lookups — memory tools search session
notes, not the brain knowledge graph; brain-first.md bans this. Use
search / query / entity.search hit count as chain-complete — read the page;
run query for synonym phrasings before concluding "not in the brain".Would the user look at this person's brain page — the imported archive, the employer-revealing email domain, the timeline entries all repeating the same role — and think it was reasonable that the agent asked who this person is?
If the answer is no, the chain wasn't run. Run it.
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 acceso al CLI/MCP de gbrain (think, search, query, entity, timeline, backlinks, graph) y a las fuentes montadas del brain.
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.
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.