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
Tests de salud + auto-fix para instalaciones de gbrain (y servicios OpenClaw si existen); úsalo tras reinicios o cuando algo parezca roto, y es extensible con scripts propios.
execreaden todo el repo
0–100, la ruta de este skill
último commit aquí
últimos 90 días
71 tok en reposo
6 KB
Funciona con cualquier agente que lea SKILL.md
npx -y skills add garrytan/gbrain --skill smoke-test --agent claude-codeSe instala solo en este repositorio.
Di cualquiera de estas frases y el agente debería cargar este skill.
Run
gbrain smoke-testafter any machine or container restart, or whenever something seems broken.
This skill guarantees:
~/.gbrain/smoke-tests.d/*.sh drop-in scripts/tmp/gbrain-smoke-test.log| # | Test | Auto-Fix |
|---|---|---|
| 1 | Bun runtime | Install from bun.sh |
| 2 | GBrain CLI loads | Reinstall deps |
| 3 | GBrain database (doctor) | — |
| 4 | GBrain worker process | Start worker |
| 5 | OpenClaw Codex plugin (Zod CJS); skips if OpenClaw absent | npm install zod@4 --force |
| 6 | OpenClaw gateway; skips if OpenClaw absent | — (may not be started yet) |
| 7 | Embedding API key | — (check .env) |
| 8 | Brain repo exists | — |
gbrain smoke-test
This is the invocation for all installs; it resolves the test script from the installed package.
gbrain smoke-test >> /tmp/bootstrap.log 2>&1
Add to your ensure-services.sh or equivalent:
bash /path/to/gbrain/scripts/smoke-test.sh >> /tmp/bootstrap.log 2>&1
exec: gbrain smoke-test
Contributor note: inside a gbrain repo checkout you can also run the script
directly with bash scripts/smoke-test.sh.
Create executable scripts in ~/.gbrain/smoke-tests.d/:
# ~/.gbrain/smoke-tests.d/check-redis.sh
#!/bin/bash
redis-cli ping | grep -q PONG
Rules:
check-redis from check-redis.sh)This section is for contributors working in the gbrain source repo. Plugin
installs ship the script read-only and upgrades overwrite it; if you just want
extra checks, use the ~/.gbrain/smoke-tests.d/ drop-in scripts above.
Edit scripts/smoke-test.sh. Follow this pattern:
# ── N. [Service Name] ──────────────────────────────────────
if [test condition]; then
pass "[Service Name]"
else
# Auto-fix attempt
[fix command]
if [re-test condition]; then
fixed "[What was fixed]"
pass "[Service Name] (after fix)"
else
fail "[Service Name] — [error detail]"
fi
fi
timeout N on any command that could hangpass(), fail(), fixed(), skip()skip() when a prerequisite is missing, don't fail| Var | Default | Description |
|---|---|---|
GBRAIN_SMOKE_LOG |
/tmp/gbrain-smoke-test.log |
Log file path |
GBRAIN_DIR_OVERRIDE |
(auto-detect) | Force gbrain install path |
GBRAIN_DATABASE_URL |
(from .env) | Database connection URL |
OPENCLAW_GATEWAY_PORT |
18789 |
Gateway port to test |
GBRAIN_BRAIN_PATH |
(deployment-specific) | Brain repo path. Container deployments default to /data/brain; set it to your brain repo path otherwise. Test 8 skips (not fails) when unset. |
(OpenClaw gateway deployments only: this concerns OpenClaw's Codex ACP plugin, not the OpenAI Codex CLI.)
Cannot find module './core.cjs' → all Codex ACP sessions failcore.cjs in some installsnpm install zod@4 --force in the codex extension's zod dirGBRAIN_DATABASE_URL not propagated to worker subprocessDATABASE_URL and GBRAIN_DATABASE_URLtimeout N around any command that
could hang. A single hung drop-in stalls every subsequent run.pass → fail-detected → fix → re-test loop is the contract; fixes
that skip the re-test can report success on a still-broken state.skip as fail. Missing prerequisites (no OpenClaw installed,
no brain repo configured) are skips, not failures. Exit code = count of
real failures, not skipped checks.GBRAIN_DATABASE_URL, HOME, etc.) so the script travels across
container rebuilds.The script writes a one-line status per check to stdout (✅/❌/🔧/⏭️) plus a
final summary line: Results: N/M passed, F auto-fixed, S skipped. A
structured timestamped log appends to $GBRAIN_SMOKE_LOG
(default /tmp/gbrain-smoke-test.log) for post-run forensics. Exit code
equals the count of unfixed failures (0 = all pass, positive integer =
count of remaining failures).
Reproducido 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 (CLI/paquete) y, opcionalmente, servicios OpenClaw presentes para esos tests adicionales.
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.
Antes de arreglar una alerta de lentitud, stale o timeout, mide el paso tú mismo con un cronómetro en vez de un cambio de código: triage de operaciones basado en medición previa.
Skill unificado de Minions para jobs deterministas de shell y orquestación de subagentes LLM: cola durable, observable y controlable, más la doctrina de ejecución durable para operaciones largas.
Ejecuta `gbrain skillpack-check` para generar un reporte JSON legible por agentes sobre la salud del install de gbrain, combinando `gbrain doctor` y `apply-migrations --list`.