/ai-brain-starter:patterns runs instead · from ai-brain-starter
Extracts signal from recent sessions, detects hardening patterns, and proposes concrete captures. Use after weekly reviews, repeated corrections, or before fix/debug/build/refactor.
This skill never runs in Claude Code
It ships in ai-brain-starter at skills/, but /ai-brain-starter:patterns (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 extracting signal before it evaporates. This skill scans recent sessions and surfaces what's hardening into real insight, then proposes concrete captures.
Run this after a weekly review, after a heavy journaling session, or whenever the user says "I keep noticing..." or "this keeps coming up."
Headless / auto mode: If you are running in a cron job, background script, or --print session with no interactive user, skip Step 3's confirmation. Auto-capture all findings. Add (auto-captured — review and edit) as a note in any new files created. Proceed directly to Step 4 → Step 5.
On first invocation, look for [VAULT]/.patterns-prefs.md. If it doesn't exist, ask:
Meta/Last Session.md, or none)Meta/Decision Log.md, or none)Journal/, or none)Writing/Drafts/)Notes/Concepts/)Vault Changelog.md, or none)CLAUDE.md at vault root)Save preferences. Don't ask again.
Use BEFORE starting a non-trivial feature, bug-diagnosis, or refactor — not after. This is the proactive sibling of the reactive auto-detection below. Pattern source: EveryInc/compound-engineering-plugin ce-learnings-researcher (MIT, reimplemented clean).
Trigger surface: any session that opens with verbs like "fix", "debug", "diagnose", "implement", "build", "refactor", "extract", "consolidate" plus a named surface (a service, an MCP server, a runbook, a hook) — work where a similar problem might already have been solved.
What to do (silently, before the user's first task):
feedback_* / memory files, prior /patterns captures, and a failure-inventory note if one exists (last ~60 days) — for keywords matching the surface the user just named.Why this matters: the reactive auto-detection (below) catches drift AFTER the work is done. The pre-flight check catches it BEFORE you re-solve a problem you already solved — so you don't spend Tuesday rediscovering what you codified on Thursday.
Anti-pattern: dumping a 5-link wall of "you might want to read these." ONE link, ONE sentence, the closest match. The user can ask for more.
At the end of every session (before the session-close checklist), Claude should silently evaluate whether the current session hit any of these four triggers. If one or more fires, surface it as a suggestion before closing.
Trigger 1: High tool-call friction The session required 5+ tool calls to accomplish something that should have been routine (e.g., finding a file, running a known workflow, looking up a fact that's in the vault). This suggests a missing shortcut, rule, or skill step. → "I noticed it took [N] steps to [task]. Want me to run /patterns to capture a shortcut?"
Trigger 2: User correction The user corrected Claude's approach during this session ("no, not that way", "don't do X", "use Y instead"). A feedback memory was likely saved, but there may be a deeper pattern if this correction echoes prior ones. → "You corrected me on [topic] this session. Want me to check if this is a recurring pattern worth capturing as a rule?"
Trigger 3: Dead-end recovery Claude hit errors or dead ends before finding the working path (wrong file, failed approach, had to backtrack). The successful path should be preserved so future sessions don't repeat the exploration. → "I had to backtrack on [task] before finding the right approach. Want me to capture the working path as a pattern?"
Trigger 4: Non-trivial discovery Claude discovered something non-obvious about the vault, a tool, an API, or a workflow that isn't documented anywhere. A discovery memory may have been saved, but it might warrant a rule or skill update. → "I discovered [finding] this session. Want me to check if it should become a permanent rule?"
How to evaluate: This is a lightweight check, not a full /patterns scan. Claude reviews the conversation in memory for: corrections received, tool-call counts on repeated tasks, backtrack moments, and surprises. If nothing fires, say nothing. If one or more fires, offer a single concise prompt (not a wall of text). The user can say "yes" (run full /patterns), "just save it" (capture the specific finding without a full scan), or "no" (skip).
Do NOT auto-run the full pattern scan. Only suggest. The user decides whether to run it.
Read these sources in parallel (skip any set to none in prefs):
journal-index.json exists in the vault's Meta folder (⚙️ Meta/ or Meta/), use it; otherwise read directly)If a weekly review was just run, its output is already in context — use that, don't re-scan journals.
If the Instinct Engine is installed, a PreToolUse hook has logged EVERY tool call this session to ~/.claude/instinct/observations.jsonl. Read that ledger instead of reconstructing the session from the transcript — it is the 100%-capture source, not a ~50-80% reconstruction.
python3 "{SKILL_DIR}/../../scripts/instinct.py" decay (erodes instincts unseen past the grace window so confidence stays honest).action values per session in the ledger. 5+ of the same action to reach one outcome = a friction pattern backed by hard counts, not a vibe.python3 "{SKILL_DIR}/../../scripts/instinct.py" report --limit 30 lists instincts by effective confidence and flags stale ones.If the engine is NOT installed, fall back to the in-context conversation review below.
Look across everything for:
Recurring themes — What topics, people, or tensions keep appearing? If something shows up 3+ times in different sessions, it's a pattern.
Decision frameworks — Are there repeating decision types where the same logic applies each time? (e.g., "When [X], I always choose [Y] because [Z]") These should become CLAUDE.md rules.
Writing patterns — Metaphors, phrases, or ideas that resurface across entries. Often the most original material — but invisible because it's spread across time.
Behavioral loops — What accountability items keep getting flagged? What does the user keep resolving and then re-encountering?
Vault gaps — What concepts keep appearing in notes that don't have their own concept note yet?
Present findings grouped by type. Be specific — quote the actual phrase or pattern. Maximum 5 proposals at a time:
Writing pattern: "[exact quote]" has appeared in 3 entries and 2 drafts in the last 2 weeks. → Proposed: start a writing seed in your drafts folder
Decision framework: Every time [situation], you [action]. This has happened [N] times. → Proposed: new CLAUDE.md rule — "[rule text]"
Ask: "Which of these do you want to capture?"
After the user confirms, execute all approved captures in one pass:
python3 "{SKILL_DIR}/../../scripts/instinct.py" reinforce <slug>. When the user corrected one, run ... correct <slug>. That bidirectional update is what makes the library self-improving instead of append-only. See docs/instinct-engine.md. When a domain accumulates many high-confidence instincts, run /evolve to propose promoting the cluster into a dedicated skill.Append to the configured changelog file (if set):
- [DATE] /patterns run: [N] captures made — [brief list]
If any universal patterns emerged (not personal, applicable to any second-brain user), flag them: "This pattern could go in the universal patterns repo — want me to note it for next time?"
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mycelium-hq/ai-brain-starter --plugin ai-brain-starter37 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).Other plugins' skills for the same job