/matts-second-brain:install [--multi-user] [--scan-transcripts] [--trilium-url URL]from matts-second-brain
Set up matts-second-brain end-to-end on this Claude instance: detect or install Trilium, prompt for an ETAPI token, register the MCP server, seed the brain taxonomy, optionally scan existing transcripts for inferable standards. Use when the user says things like 'set up second brain', 'install matts-second-brain', 'wire up Trilium memory', 'connect Claude to my notes'.
Ships in matts-second-brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Walks through the full setup. Idempotent — safe to re-run.
Check what's already in place. Report each as [ok] / [needs setup]:
# Trilium reachable?
curl -sf -o /dev/null "${TRILIUM_URL:-http://127.0.0.1:8787}/api/health-check" \
&& echo "[ok] Trilium reachable" \
|| echo "[needs setup] Trilium not reachable"
# trilium-mcp jar built?
test -f /home/matt/mcp/trilium-mcp/target/trilium-mcp-1.0.0.jar \
&& echo "[ok] trilium-mcp jar present" \
|| echo "[needs setup] trilium-mcp jar missing"
# Token present?
test -s /etc/claude-brain/trilium-token \
&& echo "[ok] ETAPI token configured" \
|| echo "[needs setup] ETAPI token not set"
# MCP registered in user's Claude config?
grep -q '"trilium"' ~/.claude.json 2>/dev/null \
&& echo "[ok] trilium MCP registered" \
|| echo "[needs setup] trilium MCP not registered"
For each [needs setup], walk the user through it interactively. Don't run destructive things without confirmation.
Offer to bring up a docker container:
docs/trilium-docker-compose.ymldocker compose up -d/home/matt/mcp/trilium-mcpmvn -q package inside itread -rs)/etc/claude-brain/trilium-token with mode 0640, owner root:claude~/.claude.json (or merge with existing mcpServers)/usr/local/bin/trilium-mcp as the command — wrapper handles env injectionUse trilium MCP tools to create the root note + structure if not already there:
Claude Memory/
├── 00 — How to use this brain # discipline rules (see skills/_discipline)
├── Standards/
├── Decisions/
├── Lessons Learned/
├── Apps/
├── Reviews/
└── Drafts/
Tag every note with #claude-brain. If the root already exists, skip — never overwrite the user's existing notes.
If --multi-user flag passed:
claude group if missing--users a,b,c/etc/claude-brain/ with group ownership/etc/profile.d/claude-brain.sh so future login shells auto-register the MCP/usr/local/bin/trilium-mcp if not presentIf --scan-transcripts flag passed:
~/.claude/projects/*/ for .jsonl session transcriptsbrain_scan_transcripts MCP tool to infer:
Standards/Lessons Learned/Apps/<name>/End by:
brain_recall("git workflow") — should return citations from the seeded standardsbrain_rememberWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
6 skills in this plugin
/_disciplineThe behavioural rules Claude follows when matts-second-brain is installed. Loaded automatically — defines how to consult and write back to the brain. Always invoked at session start. Skip only if the user has explicitly disabled second-brain./hygienePeriodic brain hygiene: dedupe near-duplicate notes, flag stale file citations and contradictions, archive long-unused notes, and reindex. Use when the user says 'brain hygiene', 'consolidate the brain', 'clean up duplicate notes', 'find stale notes', or after a long burst of writing. Opt-in and dry-run by default./maintenanceManage the unattended nightly brain maintenance job (scan recent transcripts, persist durable knowledge, dedupe, reindex). Use when the user says 'set up brain maintenance', 'schedule brain consolidation', 'run brain maintenance now', or wants to check/disable it. Subcommands: install, status, run, dry-run, uninstall, test./recallManually query the second-brain (Trilium) for notes relevant to the current task. Use when you want Claude to consciously consult the brain before acting — e.g. 'recall git workflow', 'what do we know about macpool deployment', 'recall lessons from the Stripe incident'./rememberManually write a note to the second-brain. Use when the user explicitly says 'remember this', 'note that', 'save this as a standard', 'log this lesson', or after a notable event you want preserved.matts-second-brain@wrxck-claude-plugins is listed by wrxck/claude-plugins — review the source before installing
npx claudepluginhub wrxck/claude-plugins --plugin matts-second-brain