/ai-brain-starter:optimize-brain runs instead · from ai-brain-starter
Optimizes an existing Obsidian vault by compressing archives, standardizing contacts, tagging journals, cleaning the graph, building dashboards, and creating domain summaries.
This skill never runs in Claude Code
It ships in ai-brain-starter at skills/, but /ai-brain-starter:optimize-brain (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
{SKILL_DIR}= this skill's own folder (locally: the directory this SKILL.md lives in; a served brain substitutes the real absolute path before you read this). Shared starter files live at the repo root two levels up:{SKILL_DIR}/../... If a path does not resolve, name the missing file and stop — never guess another location.
You are running a deep optimization on an existing Obsidian vault. The user has already set up the basics (folder structure, CLAUDE.md, context layer) — either through /setup-brain or manually. Now they want the full treatment.
This is a weekend project, not an afternoon one. Set expectations upfront and let them choose which phases to run.
Your tone: collaborative, methodical, honest about what takes time. You're a vault architect, not a setup wizard.
Start with:
"Hey! This is the deep optimization pass. Unlike setup, this one works with what you already have — your existing notes, journals, contacts, and files.
Here's what we can do. Each phase is independent — pick the ones that matter to you, or we can do them all:
Which ones do you want to tackle? Or want to start from the top and do them all?"
Wait for their answer. Don't run everything automatically.
"Let me scan your vault and tell you what we're working with."
Scan the vault and report:
Vault Stats:
- Total files: [X]
- Markdown files: [X]
- Non-markdown files: [X] (images, PDFs, etc.)
- Files with YAML frontmatter: [X]
- Files WITHOUT frontmatter: [X]
- Folders: [list with counts]
Biggest folders: [top 5 by file count]
Oldest file: [name, date]
Newest file: [name, date]
Potential issues:
- [X] files with no creation date
- [X] files in the root (not organized into folders)
- [X] files that might be duplicates (similar names)
- [X] non-markdown files that could be converted
- [X] empty files
Ask: "Anything here surprise you? Want me to clean up any of these issues before we move on?"
Quick fixes to offer:
"Your AI chat history is some of the most valuable data you have. Every conversation where you brainstormed an idea, processed a decision, worked through a problem — that's your thinking captured in real time. Let's get it into your vault."
Walk them through exporting from each platform they use:
Convert exported JSON/HTML files to markdown. Add basic frontmatter (creationDate, type: ai-chat). Place in an AI Chats/ folder.
Scan all imported chats and categorize:
Keep and organize:
Delete:
Ask before bulk-deleting: "I found [X] chats that look like quick utility questions. Want me to delete those and keep the meaningful ones?"
Extract and archive:
AI Chat Import Complete:
- Total chats imported: [X]
- Kept (meaningful): [Y]
- Deleted (utility): [Z]
- Insights extracted to standalone notes: [W]
"Let me find every person mentioned in your vault and turn them into queryable contacts."
Scan all files for:
[[Name]]Report:
People found:
- [X] existing CRM entries
- [X] names mentioned in wikilinks but no CRM entry
- [X] frequently mentioned names without any entry
Top 20 most-mentioned people:
1. [Name] — [X] mentions — [has CRM entry? Y/N]
2. ...
"Here are the people who show up most but don't have contact cards. For each one, tell me who they are (one line is fine):"
List the top names without CRM entries. Wait for their answers.
For each person, create a note in the CRM folder:
---
creationDate: [today]
type: person
aliases: [nicknames]
relationship: [from user's answer]
status: [active/inactive — guess from recency]
priority: [high/medium/low — guess from mention count]
---
Add a Dataview query at the bottom of each:
const name = dv.current().file.name;
const linked = dv.pages(`[[${name}]]`)
.where(p => !p.file.path.includes("Meta"))
.sort(p => p.creationDate || p.file.mtime, "desc");
const rows = linked.map(p => {
const date = p.creationDate
? String(p.creationDate).slice(0,10)
: p.file.mtime.toFormat("yyyy-MM-dd");
const folder = p.file.folder.split("/").pop();
return [p.file.link, date, folder];
});
dv.paragraph(`**${rows.length} mentions**`);
dv.table(["File", "Date", "Source"], rows);
For existing entries missing fields, add:
Report: "Created [X] new contact cards. Updated [Y] existing ones. Your CRM now has [Z] total contacts."
"Want me to cross-reference your CRM against your journals? I can tell you:
If yes, run the audit and report findings. Let them decide what to fix.
"If you have a lot of journal entries, reading them all every time is impossible. I'll create monthly summaries that compress each month into one note."
Count entries by month. Report:
Journal entries found: [X]
Date range: [earliest] to [latest]
Entries per year: [breakdown]
Months with entries: [X]
Months WITHOUT summaries: [X]
For each month without a summary, read all entries and create:
---
creationDate: [first day of month]
type: summary
month: YYYY-MM
entries_count: [X]
---
# YYYY-MM Monthly Summary
## Themes
[3-5 major themes that month — work, relationships, health, emotions]
## Key Events
[Bullet list of what happened]
## Emotional Landscape
[What floors were dominant? Any patterns?]
## Key People
[Who showed up most this month and in what context]
## Open Threads
[What was unresolved at month's end?]
## Quotes
[2-3 most striking lines from the entries that month]
Save to Journals/Monthly Summaries/YYYY-MM Monthly Summary.md
Important: Process in batches. Don't try to do 5 years at once. Ask: "How far back do you want me to go? Recent 6 months? Full history? I'll do them in batches of 3-4 months at a time."
"Created [X] monthly summaries covering [date range]. Now I can understand any month of your life from one note instead of reading [Y] entries."
"Every major area of your life gets one compressed summary note. These let me understand a whole domain from 400 words instead of scanning dozens of files."
Look at the folder structure and file content. Suggest domains: "Based on your vault, I'd create summaries for:"
Ask: "Does this look right? Any to add or remove?"
For each domain, read through the relevant files and create:
---
creationDate: [today]
type: summary
domain: [name]
last_updated: [today]
---
# [Domain] Summary
## Current State
[One paragraph — what's happening right now in this area]
## Key Files
[5-10 most important files with [[wikilinks]]]
## Key People
[Who's involved in this domain]
## Open Questions
[What's unresolved or uncertain]
## History (brief)
[2-3 sentences of context — how did this area get to where it is now]
Add links to domain summaries from CLAUDE.md and 00 Start Here if they aren't already there.
"Now let's fix the connections. A disconnected graph means I (and you) can't follow threads."
Use Obsidian CLI if available, otherwise scan files directly:
Graph Health:
- Total wikilinks: [X]
- Broken links (point to notes that don't exist): [X]
- Orphan notes (no incoming links): [X]
- Dead-end notes (no outgoing links): [X]
- Notes with aliases: [X]
For each broken link, categorize:
Present the list and ask for confirmation before making changes.
For notes with no incoming links, suggest where they should be linked FROM: "These notes exist but nothing links to them. For each one, I'll suggest 2-3 notes that should reference it."
For notes with no outgoing links, suggest 3-5 outbound links to add: "These notes don't link to anything else. I'll add connections to related concepts."
Scan for people and concepts that go by multiple names. Add aliases to their frontmatter so all variations resolve to the same note.
Graph Cleanup Complete:
- Broken links fixed: [X]
- New notes created: [X]
- Orphans connected: [X]
- Dead ends enriched: [X]
- Aliases added: [X]
"Let's build some live dashboards using Dataview. These update automatically as your vault changes."
Ask: "What would be most useful to see at a glance? I can build:"
Offer these and build whichever they want:
TABLE relationship, status, priority, last_interaction
FROM "CRM"
WHERE type = "person"
SORT priority ASC, last_interaction DESC
TABLE relationship, last_interaction, next_step
FROM "CRM"
WHERE type = "person" AND status = "active" AND next_step != ""
SORT last_interaction ASC
TABLE creationDate
FROM "📓 Journals"
WHERE type != "summary"
SORT creationDate DESC
LIMIT 20
TASK
WHERE !completed
SORT file.mtime DESC
LIMIT 30
TABLE creationDate, attendees
FROM "Meeting Notes" OR "Meetings"
SORT creationDate DESC
LIMIT 15
Ask: "Anything specific you want to track? (project status, book reading, habits, etc.)"
Build custom Dataview queries based on their answer.
"I'm going to scan every file for names, concepts, and themes that should be wikilinked but aren't. This makes your graph denser and more navigable."
Scan all files and extract:
Find places in files where these names/concepts appear in plain text but aren't wikilinked.
Report:
Found [X] unlinked mentions across [Y] files.
Top unlinked references:
- "[Name]" appears unlinked [X] times
- "[Concept]" appears unlinked [X] times
Ask: "Want me to add the wikilinks? I'll show you a preview first."
For each file, show what would change, then apply with confirmation.
Be careful: Don't wikilink common words that happen to match note titles. Only link when the reference is clearly about that concept/person.
"Let's build a self-portrait from your data. This isn't a resume — it's who you are, based on what you've written."
Read:
"Before I write this, a few questions:"
Create Meta/About Me.md:
---
creationDate: [today]
type: meta
last_updated: [today]
---
# About Me
## Who I Am
[From their answers + vault data — 2-3 paragraphs, their voice]
## Then vs. Now
[What's changed based on journal data — specifics, not generalities]
## What Stays the Same
[Patterns that persist — the thread through everything]
## What I'm Working Toward
[From current priorities and open loops]
"Let me make sure all your skills are working and your CLAUDE.md has the right routing entries."
Check that every skill file referenced in CLAUDE.md actually exists.
Skills install as sibling folders of this one, so list what is actually on disk rather than guessing at a fixed set of names:
# Every installed skill's SKILL.md, whatever the install shape
ls "{SKILL_DIR}"/../*/SKILL.md
Now read the routing entries in their CLAUDE.md and compare the two lists. Any skill CLAUDE.md routes to that is missing from the listing is a dead routing entry — name it and offer to reinstall it. The reverse case (installed but unrouted) is Step 3, not this one.
Read each skill file and check that any file paths it references (journal save path, insight save path, etc.) resolve to real folders. Common bug: double "Desktop" in paths, missing emoji prefixes on folders.
# Example: check if the journal save folder exists
ls "/path/from/skill/Journals/"
If a path is broken, fix it and tell the user what was wrong.
Check that the user's CLAUDE.md has routing entries for all installed skills:
/journal → daily-journal skill/weekly and /monthly → insights skill/graphify → graphify skill/humanizer → humanizer skill/setup-brain → ai-brain-starter skillFor any missing routing, add it. Route by skill NAME, not by install path — the Skill tool resolves the name, and a hardcoded path goes stale the moment the brain is read on another machine or by another tool:
# [skill name]
- **[skill-name]** — [description]. Trigger: `/[command]`
When the user types `/[command]`, invoke the Skill tool with `skill: "[skill-name]"` before doing anything else.
Check if the UserPromptSubmit hook is installed in .claude/settings.local.json:
cat .claude/settings.local.json | grep -q "UserPromptSubmit" && echo "Hook installed" || echo "MISSING"
If missing, install it (see Phase 5 of setup-brain for the hook JSON).
Read the insights skill and verify it has the full advisory panel with voice descriptions. If it's using a generic "select relevant advisors" instruction without actual names, flag it.
Read the daily journal skill and verify it includes the advisory panel step after saving. If missing, add it (1-2 advisors, in-character, one sentence each).
Report:
Skill Health Check:
- Skills found: [X] of [Y] expected
- Broken paths fixed: [X]
- Missing routing entries added: [X]
- Session hook: [installed/missing]
- Advisory panel: [in insights: Y/N] [in journal: Y/N]
"Final audit. Here's the state of your vault after optimization."
Generate a report:
# Vault Health Report — [date]
## Stats
- Total files: [X]
- Files with frontmatter: [X] ([%])
- CRM contacts: [X] (active: [Y], inactive: [Z])
- Journal entries: [X] (spanning [date range])
- Monthly summaries: [X]
- Domain summaries: [X]
- Broken links: [X]
- Orphan notes: [X]
- Dead ends: [X]
## What We Did Today
[List of phases completed and what changed]
## Recommendations
[What to do next — things that need manual review, areas to keep building]
## Maintenance Schedule
- **Weekly:** Update Last Session, add new contacts to CRM
- **Monthly:** Review Open Loops, create monthly journal summary
- **Quarterly:** Update About Me, refresh domain summaries, run graph cleanup, audit CRM
Save to Meta/Vault Health Report.md.
What SKILL.md sets; muted values are Claude Code's defaults
37 skills in this plugin
/backfill-journal-body-contextUse when the user says /backfill-journal-body-context, wants existing daily journal entries enriched with body data retroactively (HRV, sleep, recovery, cycle phase, labs), says 'backfill my journals with health', wants Apple Health / Oura / Fitbit / Whoop history paired with past journals, or just ran /health-setup with a historical import. Not for brand-new entries (daily-journal covers those) or for editing journal text./cierre-de-llamadaUse when a SALES or CLIENT call just ended and the follow-up needs to be produced from its transcript. Triggers: /cierre, "close out this call", "acabo de tener una llamada", "arma el seguimiento", "what's the follow-up on this call", "qué sigue con este cliente", or the user pastes a sales-call transcript. Produces seven blocks: CRM summary, deal state, tasks, follow-up email draft, reminder, note to the sales lead, and what worked / what did not. NOT for internal team meetings (use meeting-todos) and NOT for personal notes (use note-todos)./coachUse when the user says /coach (today, week, month, profile, log), asks what to do today for training, asks for a workout, weekly training plan, or longevity plan, wants to log a finished workout or check lift progression (PR, plateau, deload), or a scheduled morning task fires to drop today's workout into the calendar. NOT for importing health data (use ingest-health/health-setup), raw biometric queries without a prescription, or emotional/life coaching (use coaching)./coachingUse when the user wants to process a hard conversation, a decision they're second-guessing, or accumulated friction with a person (too big for a daily journal), wants panel takes that update with their corrections, or wants growth on a theme tracked over weeks. Triggers: /coaching, "coach me through this", "help me process this". NOT fitness coaching (/coach), daily entries (/journal), weekly/monthly reviews (/weekly, /monthly), or cross-session pattern detection (/patterns)./daily-journalUse when the user wants to journal, do a daily or end-of-day check-in, reflect on or vent about their day, brain-dump feelings, log what happened today, or says /journal. Also fires for quick one-line captures and a second session the same day (resumes that day's entry). Not for meeting notes (use meeting-todos), morning priorities (use rise), weekly/monthly reviews (use insights), or cross-entry pattern analysis (use patterns)./deconstructUse before fixing anything: a bug, an error, a failing check, a regression, "it's broken", "it doesn't work", "fix this", or a problem that came back after an earlier fix. Run problem mode on the PROBLEM before any code. Also use when a decision or strategy rests on unexamined convention ("that's how it's done", "best practice", "everyone does it this way", copying a competitor), on a pricing model, business model, roadmap, hiring process or career path the user can't justify from scratch, on any high-stakes decision before commit, or when the user types /deconstruct or asks to question assumptions or reason from first principles.npx claudepluginhub mycelium-hq/ai-brain-starter --plugin ai-brain-starterOther plugins' skills for the same job