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
Bootstrapping de datos del día uno para una brain nueva: secuencia las fuentes de mayor impacto (Gmail, calendario, contactos, X/Twitter, conversaciones, archivos) usando ClawVisor para manejar credenciales de forma segura.
Reemplaza a: Conceder tokens OAuth crudos al agente para Gmail/Calendar/Contacts
searchqueryget_pageput_pageadd_linkadd_timeline_entrysync_brainen todo el repo
0–100, la ruta de este skill
último commit aquí
últimos 90 días
102 tok en reposo
20 KB
Funciona con cualquier agente que lea SKILL.md
npx -y skills add garrytan/gbrain --skill cold-start --agent claude-codeSe instala solo en este repositorio.
Este skill makes network requests.
Di cualquiera de estas frases y el agente debería cargar este skill.
You have a working brain. Search works. Now what?
An empty brain is a static database. A brain with your email history, calendar, contacts, conversations, and social media is a live context membrane that makes every future interaction smarter. This skill sequences the highest-leverage data sources to get you from zero to useful in one session.
~/.gbrain/cold-start-state.json so interrupted sessions
can resume.gbrain doctor --json all green)gbrain CLI commandsData sources ranked by information density × ease of import:
| Priority | Source | Why | Time | Pages Created |
|---|---|---|---|---|
| 1 | Existing markdown/Obsidian | Highest density — it's already structured | 5 min | 100s-1000s |
| 2 | Google Contacts | Seeds the people/ directory — names, emails, companies | 10 min | 50-500 |
| 3 | Google Calendar (90 days) | Meeting history with attendee context | 15 min | 30-90 |
| 4 | Gmail (recent threads) | Relationship context, active threads, org chart signals | 20 min | 50-200 |
| 5 | Conversations (ChatGPT/Claude exports) | Your thinking, questions, mental models | 15 min | 10-100 |
| 6 | X/Twitter archive | Your public positions, takes, engagement patterns | 20 min | 30-365 |
| 7 | File archives (Dropbox/Drive/local) | Historical documents, old writing, photos | 30+ min | varies |
| 8 | Meeting transcripts (Circleback/etc.) | Deep relationship context from recorded calls | 20 min | 10-50 |
Harness check first. ClawVisor requires an agent host with a ClawVisor integration (for example, an OpenClaw deployment). On harnesses without one, such as Codex or Claude Code, skip this phase: the documented default for Contacts, Calendar, and Gmail is a Google Takeout export, which covers all three offline (contacts CSV, calendar ICS, Gmail mbox). Phases 2-4 below document the Takeout path first.
Safety boundary: An AI agent with raw OAuth tokens to your Gmail, Calendar, and Contacts is an uncontrolled attack surface. One prompt injection, one malicious tool call, and your entire Google account is exposed. ClawVisor eliminates this risk class entirely.
ClawVisor is a credential gateway that sits between the agent and your APIs. The agent never sees your credentials — ClawVisor injects them at request time, enforces policies, and logs everything.
What ClawVisor gives you:
Setup (15 min):
export CLAWVISOR_URL="https://app.clawvisor.com"
export CLAWVISOR_AGENT_TOKEN="<token>"
"Full brain bootstrapping: read emails, calendar events, and contacts to populate knowledge base. List, read, and search across all connected accounts."
export CLAWVISOR_TASK_ID="<task_id>"
Critical scoping rule: Be expansive in task purposes. "Email triage" gets rejected by intent verification. "Full executive assistant email management including inbox triage, searching by any criteria, reading emails, tracking threads" works. The intent model uses the purpose to judge each request.
Do NOT fall back to direct OAuth. Instead, proceed with offline-only imports:
Tell the user:
"No problem. We'll work from file-based sources: a Google Takeout export covers Contacts, Calendar, and Gmail. You can set up ClawVisor anytime for live sync instead of point-in-time exports."
Do NOT offer direct OAuth as an alternative. An agent holding raw Google tokens is a security liability. The skill should not teach agents to store credentials they shouldn't have.
The highest-leverage first import. If the user already has a notes system, this is hundreds or thousands of structured pages ready to go.
echo "=== Markdown Repository Discovery ==="
for dir in ~/git/* ~/Documents/* ~/notes/* ~/obsidian/*; do
if [ -d "$dir" ]; then
md_count=$(find "$dir" -name "*.md" -not -path "*/node_modules/*" \
-not -path "*/.git/*" -not -path "*/.obsidian/*" 2>/dev/null | wc -l | tr -d ' ')
if [ "$md_count" -gt 5 ]; then
total_size=$(du -sh "$dir" 2>/dev/null | cut -f1)
echo " $dir ($total_size, $md_count .md files)"
fi
fi
done
# Obsidian vaults are markdown directories — import directly, then wire wikilinks
# (full flow: skills/migrate/SKILL.md)
gbrain import /path/to/vault --no-embed --workers 4
gbrain extract links --source db # parses [[wikilinks]] natively
# For plain markdown directories
gbrain import /path/to/dir --no-embed --workers 4
# Verify
gbrain stats
gbrain search "<topic from the imported data>"
gbrain extract links --source dbgbrain extract timeline --source dbgbrain embed --stale (runs in background)Track progress:
echo '{"phase_1_complete": true, "pages_imported": N}' > ~/.gbrain/cold-start-state.json
Seeds the people/ directory. Every person in your contacts becomes a brain page with name, email, phone, company, and notes. This is the foundation that all other imports build on — when Gmail references "john@acme.com", the brain already knows who John is.
// Fetch all contacts
const contacts = await clawvisor('google.contacts', 'list_contacts', {
limit: 1000,
fields: 'names,emailAddresses,phoneNumbers,organizations,biographies'
});
For each contact:
gbrain search "name" to avoid duplicates[Source: Google Contacts, YYYY-MM-DD]After importing 5 contacts, pause and show the user a sample page. Ask:
"Here's what a contact page looks like. Want me to continue with the rest, or adjust the format first?"
Meeting history with attendee context. Calendar events reveal who the user meets with, how often, and in what context. Combined with contacts, this builds a rich relationship map.
Via Google Takeout (default on harnesses without ClawVisor): export Calendar from takeout.google.com (ICS format, one file per calendar). Parse each event (title, start/end, attendees), keep the last 90 days, and file them into the brain structure below.
Via ClawVisor (ClawVisor-integrated hosts only; pseudo-code):
// Via ClawVisor — query ALL calendar accounts
const accounts = ['primary@gmail.com', 'work@company.com'];
for (const account of accounts) {
const events = await clawvisor(`google.calendar:${account}`, 'list_events', {
timeMin: new Date(Date.now() - 90 * 86400000).toISOString(),
timeMax: new Date().toISOString(),
singleEvents: true,
orderBy: 'startTime'
});
}
Follow the three-tier calendar architecture:
brain/daily/calendar/
├── calendar-log.md ← compiled truth (patterns, key people)
├── YYYY/
│ ├── YYYY-MM.md ← monthly summary
│ └── YYYY-MM-DD.md ← daily event log
For each event with attendees:
Relationship context and active threads. Email reveals organizational relationships, ongoing conversations, and communication patterns.
On harnesses without a ClawVisor integration, the source is the Gmail mbox file from a Google Takeout export. The sampling and filtering rules below apply the same way.
Don't import every email. Import the signal:
For each email thread:
Auto-skip (never import):
Always import:
Your thinking, captured. AI conversation exports reveal what the user was researching, building, and thinking about. This is original thinking preserved in dialog form.
conversations.jsonFor each conversation:
Only import conversations rated 3+. The brain is for signal, not noise.
Your public positions and engagement patterns. Twitter reveals what the user thinks, who they engage with, and what ideas they're developing publicly.
brain/media/x/{handle}/
├── x-log.md ← compiled truth (themes, voice, key threads)
├── daily/YYYY-MM-DD.md ← daily tweet log
├── monthly/YYYY-MM.md ← monthly rollup
└── bookmarks/ ← saved/bookmarked content
Historical documents, old writing, photos with metadata. This is the long tail — less structured but potentially very high value (old journals, letters, early writing).
Delegate to the archive-crawler skill. It handles:
Safety gate: Archive crawling can be slow and create many pages. archive-crawler is a skill, not a CLI command — it refuses to run without an explicit
archive-crawler.scan_paths:allow-list ingbrain.yml. Add the archive path to the allow-list, run the skill's scan pass first, and show the user the manifest before proceeding with full ingestion.
Supported sources:
Deep relationship context from recorded calls. If the user has a meeting recording service (Circleback, Otter, Fireflies, Read.ai), import recent transcripts.
Delegate to meeting-ingestion skill. Key rules:
After completing available phases:
Verify brain health:
gbrain doctor --json
gbrain stats
Test retrieval:
gbrain query "who do I meet with most often?"
gbrain query "what am I working on?"
gbrain search "<person from contacts>"
Set up live sync (if not already):
gbrain sync --repo <path> every 5-30 minutesTrack state:
// ~/.gbrain/cold-start-state.json
{
"started": "2026-01-15T10:00:00Z",
"credential_gateway": "clawvisor",
"phases_completed": [1, 2, 3, 4],
"phases_skipped": [6, 7],
"total_pages_created": 847,
"total_entities_linked": 1203,
"next_phase": 5
}
Tell the user what to do next:
"Your brain has N pages across people, calendar, email, and conversations. Live sync is configured for [sources]. From here:
- The signal-detector captures entities from every conversation
- The briefing skill can compile daily context
- The daily-task-prep skill handles day planning
- Say 'enrich [person]' to deep-dive any contact"
If the session is interrupted:
~/.gbrain/cold-start-state.jsonnext_phaseAfter each phase:
PHASE N COMPLETE: [source name]
================================
Pages created: N
Pages updated: N
Entities linked: N
Time elapsed: N min
Sample pages:
- people/jane-smith.md (created — 3 emails, 5 meetings)
- companies/acme-corp.md (updated — 2 new employees linked)
Next: Phase N+1 — [description]. Ready to proceed?
search — check for existing pages before creatingquery — hybrid search for entity deduplicationget_page — read existing pages for merge decisionsput_page — create and update brain pagesadd_link — cross-reference entitiesadd_timeline_entry — record events on entity timelinessync_brain — sync changes to the index after each phaseReproducido de garrytan/gbrain bajo licencia MIT. Leer esta página en markdown.
1 archivo en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.
Requiere gbrain instalado e inicializado (gbrain doctor --json en verde) y, opcionalmente, ClawVisor configurado o una exportación de Google Takeout.
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.