gbrain-operations

Manages gbrain knowledge base sync, embeddings, dream cycles, MCP setup, and troubleshooting.

1|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/tapway/shogun-os --skill gbrain-operations-tapway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gbrain-operations
Source: https://github.com/tapway/shogun-os/tree/main/skills/gbrain/operations
Command: npx skills add https://github.com/tapway/shogun-os --skill gbrain-operations-tapway

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires psycopg2, and includes scripts (resource) and references (resource) components.

What problem does it solve? Operating a gbrain knowledge base involves many moving parts — content sync, vector embeddings, nightly dream cycles, MCP server connectivity, and database engines (PGLite or Postgres/Supabase) — and failures like stale locks, WASM crashes, or quota errors can silently break the whole system. ## Core Features & Use Cases - Full CLI lifecycle reference: Covers gbrain sync, embed, doctor, dream, mcp, brainstorm, capture, and publish with flags, best practices, and cron scheduling patterns. - Deep troubleshooting playbooks: Step-by-step recovery for PGLite lock contention, WASM runtime crashes after WSL2 kernel upgrades, Supabase auto-pause, embedding 429 rate limits, and autopilot PATH failures. - Automation patterns: Python wrapper for running gbrain from scripts, cron job templates for 15-minute syncs and nightly dream cycles, and background execution for multi-hour bulk imports. - Use Case: Your nightly dream cycle starts failing with PATTERNS_PHASE_FAIL after a config change. Use the dream-cycle troubleshooting reference to identify the missing provider prefix in the model string and fix it with gbrain config set. ## Quick Start Ask the agent to run a gbrain health check with doctor and fix any stale locks or sync issues it finds.

Frequently Asked Questions about gbrain-operations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a stale gbrain sync lock?

Delete the stale lock row from the gbrain_cycle_locks table in the PGLite database, or remove the leftover postmaster.pid file under ~/.gbrain/pglite. Then rerun gbrain doctor to confirm the database is healthy before syncing again.

How do I schedule automatic gbrain sync and dream cycles with cron?

Create a sync script that runs gbrain sync and gbrain embed --stale, then register it with hermes cron every 15 minutes using no-agent mode. Schedule the dream cycle nightly with a cron entry that runs gbrain dream on the default profile.

Why does gbrain fail with a PGLite WASM Aborted error after a WSL2 kernel upgrade?

Kernel upgrades can change WASM memory mapping so file-backed PGLite databases crash while in-memory ones still work. The recommended fix is migrating to native PostgreSQL in WSL, since gbrain re-syncs from the brain markdown files.

Should I use PGLite or PostgreSQL as the gbrain database engine?

PGLite is zero-config but brittle under kernel upgrades and blocks concurrent worker processes needed by dream cycle subagents. Local PostgreSQL offers crash recovery, faster queries, and working subagent workers, making it the recommended choice for production or WSL setups.

Why does gbrain embed return 429 rate limit errors?

The embedding provider quota is exhausted or rate-limited, often when an expired OpenAI key is used instead of the Backup Provider key. Reduce batch size with --batch-size, switch providers with --provider, or verify quota via the provider's API.

How do I run large gbrain imports without terminal timeouts?

Run the import as a background process with notify_on_complete enabled and a timeout of 3600 seconds, since importing thousands of files can take over two hours. Foreground execution hits the 300-second cap and kills the import mid-run.