Initialize a project_brain.db in the current project folder. Creates the database, project record, then scans existing files (CLAUDE.local.md, memory files, docs, emails) to bootstrap the brain with knowledge. Smart enough to handle re-runs — skips what already exists and only processes new/changed files.
npx skills add https://github.com/coco-research/coco --skill brain:init
Sets up a new project_brain.db in the current working directory and bootstraps it from existing project knowledge.
Run:
python3 ~/.claude/skills/brain/scripts/brain/brain_cli.py info
Run:
python3 ~/.claude/skills/brain/scripts/brain/brain_cli.py init
Ask the user:
Then run:
python3 ~/.claude/skills/brain/scripts/brain/brain_cli.py add-project "{name}" --slug {slug} --desc "{description}"
If the project has sub-scopes (like ProjectA-Phase1 and ProjectA-Phase2 under one umbrella), ask if the user wants multiple project records.
Run the scanner to discover what's available:
python3 ~/.claude/skills/brain/scripts/brain/brain_cli.py scan
This returns a JSON report with:
Show the user a summary:
FOLDER SCAN
===========
First scan: yes/no
Files found: NN total (NN new, NN changed, NN unchanged)
Knowledge sources detected:
CLAUDE.local.md: found / not found
CLAUDE.md: found / not found
Memory files: N files (list names)
Documents: N files in docs/
Emails: N files in emails/
Reference docs: N files
If nothing to process (all unchanged): "Everything up to date. No new knowledge to extract." → done.
Process sources in priority order. For each source, read the file, extract structured knowledge, and collect proposed writes. Do NOT write to the brain yet — collect everything first.
If found, read the full file. Extract:
decisions (with date, decision text, decided_by if mentioned)person entities (with metadata like role, email, team if mentioned)system entities (e.g., Snowflake, Postgres, Datadog)team entitiesdocument entities for key docsevents (with date, type, title)Each memory file has frontmatter (name, description, type) and content. Read each file:
decisions or context to enrich existing entitiessystem or document entities with metadataFor each file in docs/, emails/, and Reference Doc/:
document entity with metadata: {"path": "relative/path", "type": "doc|email|reference", "size": N}Same extraction as CLAUDE.local.md but lower priority (may overlap).
Show proposed writes:
BRAIN BOOTSTRAP SUMMARY
========================
Project: {name} ({slug})
From CLAUDE.local.md:
Entities: N (list: name [type])
Decisions: N (list: short text)
Events: N (list: title)
From memory files:
Decisions: N (list: short text)
Entities: N (list: name [type])
Document inventory:
Documents: N (list: filename [doc|email|reference])
Total proposed writes: NN
Ask: "Write all to brain? [Y/n/adjust]"
On confirmation, write in this order using Python:
import sys
sys.path.insert(0, '$HOME/.claude/skills/brain/scripts')
from brain.schema import get_db
from brain.operations import *
upsert_entity (idempotent, safe to re-run)create_relationship (also idempotent)create_decision (check for duplicates by matching decision text before inserting)create_event (check for duplicates by matching title + date)upsert_entity with type="document"After all writes, sync to MemPalace and brain.json:
from brain.memory_bridge import full_sync
full_sync("project_brain.db", project_slug)
After writes complete, update the manifest:
python3 ~/.claude/skills/brain/scripts/brain/brain_cli.py scan-update
BRAIN INITIALIZED
=================
DB: {path}/project_brain.db
Project: {name} ({slug})
Schema: v1 (11 tables)
Bootstrapped from existing knowledge:
Entities: +N (total: N)
Decisions: +N (total: N)
Events: +N (total: N)
Documents: +N (total: N)
Relationships: +N (total: N)
Manifest updated: N files tracked
Next: Run /brain-update at end of session, or /brain-rescan when files change.
After completing brain writes (Step 6) and confirming the manifest is updated (Step 6
scan-update), initialize the knowledge engine for this project.
First, register the project with the knowledge engine:
import sys, os
sys.path.insert(0, os.path.expanduser("~/.coco/knowledge"))
from engine import KnowledgeEngine
engine = KnowledgeEngine()
engine.register_project("{slug}", os.path.abspath("project_brain.db"))
This is required before the cron can harvest the project. (FIX M1: register_project
must be called before running any cron phases.)
Then, bootstrap article generation:
engine.full_refresh("{slug}")
Or equivalently via CLI:
python3 ~/.coco/knowledge/cron.py --run --project {slug} --phases 2,3,5
This runs:
Show the user:
KNOWLEDGE ENGINE
================
Articles generated: N
FTS5 indexed: N
Estimated cost: $0.XXX
Articles written to: ~/.coco/knowledge/articles/
Search with: /brain-wiki search "{project_name}"
Skip this step silently if:
~/.coco/knowledge/ does not exist (knowledge engine not installed)cron.py call fails for any reason (non-blocking — brain init still succeeds)upsert_entity which handles this automatically for entities./brain-update is for (conversation-driven).type field to decide what to extract.scan-update after writes so the next scan is incremental.Check whether ClickHouse's supported versions (last 3 majors + latest LTS) have recent stable patch releases, diagnose why the scheduled AutoReleases pipeline failed, and identify which releases must be created manually. Use when asked "are the patch releases up to date", "why did autorelease fail", "which releases are missing", "did a release get skipped", during the bi-weekly release-health check, or when investigating create_release.yml / auto_releases.yml failures. Reproduces the full investigation: supported versions from SECURITY.md, per-version staleness, classification of the last N days of AutoReleases/CreateRelease failures (version-bump-PR guard vs missing release-maker runner vs other), the Slack cross-check that reveals the blocking PR, and gated remediation (close a stale robot bump PR, dispatch CreateRelease for a missing version).
Monitors Hacker News for user-configured keywords, deduplicates against a local SQLite cache, and sends Slack alerts for new matching posts. Use when asked to monitor Hacker News for mentions, track keywords on HN, get alerts when something is posted about a topic on Hacker News, or set up HN keyword monitoring. Trigger when a user mentions Hacker News alerts, HN monitoring, keyword tracking on HN, or wants to know when a topic appears on Hacker News.
Deep-scan any tools you connect (CRM, email, support, reviews, analytics, billing, database) to produce a data-grounded Ideal Customer Profile and a reusable persona library. Read-only by default. Use when you need to define or refresh your ICP, build buyer personas from real data instead of guesses, or generate the persona inputs that the customer-panel-of-experts and prospect-panel-simulator skills consume.
Expert in background job processing with Bull/BullMQ (Redis), Celery, and cloud queues. Implements retries, scheduling, priority queues, and worker management. Use for async task processing, email campaigns, report generation, batch operations. Activate on "background job", "async task", "queue", "worker", "BullMQ", "Celery". NOT for real-time WebSocket communication, synchronous API calls, or simple setTimeout operations.
>- Distributed traces, spans, service dependencies, and request flow analysis. Use when investigating span-level details, failures, performance bottlenecks, or trace correlation. "distributed trace", "span details", "HTTP status codes in traces", "database query spans", "messaging spans", "gRPC calls", "Lambda cold starts", "trace ID lookup", "exception analysis", "correlate logs and traces", "request attributes". Do NOT use for explaining existing queries, product documentation or configuration questions, service-level RED metrics (use dt-obs-services), log searching (use dt-obs-logs), or problem analysis (use dt-obs-problems).
Clerk webhooks for real-time events and data syncing. Verify with verifyWebhook from the framework-specific package. Handle user, session, organization, billing, and payment events. Build event-driven features like database sync, notifications, and integrations.
Handles backend/API/database work for Unite-Hub. Implements Next.js API routes, Supabase database operations, RLS policies, authentication, and third-party integrations (Gmail, Stripe).
Manage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database). Use when a user asks OpenClaw to add a task to Things, list inbox/today/upcoming, search tasks, or inspect projects/areas/tags.
Take coco-research/brain:init from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.