/onebrain:recapfrom onebrain
Batch-promotes recurring insights from session logs into memory files with frequency filtering. Useful for extracting persistent lessons from recent sessions.
Ships in onebrain. 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.
Batch-promotes insights from session logs into memory/ files. Applies frequency filtering to ensure only recurring insights are promoted. Does NOT write to MEMORY.md — Critical Behaviors are promoted exclusively via /learn.
Glob [logs_folder]/session/**/*-session-*.md (post-v2.4.0: session logs live under the dedicated session/ subfolder); filter to files WITHOUT recapped: frontmatter field.
Process only those (faster than scanning all logs).
If no unrecapped logs found → tell user "No unrecapped session logs found." and stop.
Read recap.min_sessions from onebrain.yml (default: 6 if field absent).
Read recap.min_frequency from onebrain.yml (default: 2 if field absent).
1 unrecapped log: → warn: "Only 1 session log — promotion filter requires at least {min_frequency} sessions." → stop (nothing can pass frequency filter with only 1 log)
2 to (min_sessions - 1) unrecapped logs:
→ warn: "{N}/{min_sessions} sessions — below threshold. Recommended to wait for more sessions. Run recap now?"
→ AskUserQuestion: run-now / wait
→ if wait: stop without processing
≥ min_sessions unrecapped logs: → proceed immediately, no confirmation needed
After deciding to proceed, apply frequency filter to all extracted insights:
Why require recurrence: An insight seen once is an observation. Seen in multiple separate sessions, it becomes evidence of a genuine pattern worth long-term storage. The frequency filter prevents one-off thoughts from cluttering memory/ with noise that quickly becomes stale.
Example (min_frequency=2, 8 logs):
When insights conflict with existing memory files, scan ONLY files with status: active
or status: needs-review — skip deprecated files.
Collect ALL conflicts first, then resolve sequentially:
────────────────────────────────────────────────────────────── ⚠️ {N} conflicts found — resolving one at a time ────────────────────────────────────────────────────────────── [{n}/{N}] 💡 insight from session {YYYY-MM-DD}: "{insight text}"
Conflicts with `memory/{filename}.md`
Then AskUserQuestion:
Options:
verifiedsupersedes: on new, superseded_by: on oldAfter resolving conflicts, scan for files with overlapping topics. Build a topic frequency map from all active+needs-review files. Scan only files whose topics appear in 2+ files — skip deprecated.
Resolve sequentially [1/N]:
[{n}/{N}] 🔀 Overlapping topics — merge recommended
{file-a}.md (topics: {a}, {b})
{file-b}.md (topics: {a}, {b}, {c})
Then AskUserQuestion:
merge:
dev-workflow-worktree.md)conf; most recent verified; if either was needs-review
→ merged file inherits needs-review (caution wins); update total_needs_review accordinglytotal_active if it was active, or total_needs_review if it was needs-reviewtotal_active (or total_needs_review if inherited needs-review)Contradiction during merge: if files contain contradicting facts, do NOT auto-pick.
AskUserQuestion showing both versions: keep version A / keep version B / cancel merge
skip → leave both files as-is, move to next opportunity
recap.min_sessions and recap.min_frequency from onebrain.yml (apply defaults if absent)min_frequency)recapped: YYYY-MM-DD in frontmattertopics: [...] in frontmatterauto-saved: true and synthesized_from_checkpoints: true logs processed same wayonebrain.yml stats.last_recap: YYYY-MM-DDEach insight that passes the frequency filter:
memory/kebab-case-topic.md with frontmatter:
tags: [agent-memory], source: /recap, status: active, conf: medium, verified: today, updated: today, created: today, topics: [...]-NN automatically (no user prompt —
batch mode)type from content (same 5 categories as /learn): behavioral / context / dev / project / reference — pick silently, no prompt| [[memory/filename]] | topic1, topic2 | {inferred-type} | active | description |updated: and total_active counterDo NOT write to MEMORY.md. Critical Behaviors are promoted exclusively via /learn.
Follow ../_shared/audit-log-format.md (canonical frontmatter, append-per-day algorithm, run-section heading, failure mode) with:
YYYY-MM-DD-recap.md — one file per day.[audit-log, recap]/recapPer-skill body template (replace the canonical ## Run HH:MM section's body with this):
## Run HH:MM
### Memory Changes
- **created** memory/feedback_X.md — "always do Y" (frequency: 3 sessions)
- **updated** memory/project_active.md — added Studio milestone
- **deprecated** memory/feedback_old_pattern.md — superseded by feedback_X
### Source Sessions
- 07-logs/session/2026/05/2026-05-08-session-02.md
- 07-logs/session/2026/05/2026-05-09-session-01.md
### Skipped (insufficient frequency)
- "use bun for everything" — only 1 occurrence
✅ No unrecapped session logs found.
──────────────────────────────────────────────────────────────
💡 Recap — {N} sessions processed
──────────────────────────────────────────────────────────────
Promoted {N} insights to memory/:
• `{filename}.md` — {topic}
{N} session logs marked recapped.
→ Run /distill to compress a completed thread into a knowledge note.
Promotable vs. non-promotable insights (min_frequency=2, 3 logs):
| Topic | log-01 | log-02 | log-03 | Unique log count | Promoted? |
|---|---|---|---|---|---|
| "review-rounds" | ✓ | ✓ | ✓ | 3 | ✅ yes |
| "worktree" | ✓ ✓ ✓ ✓ | — | — | 1 | ❌ no — 4 occurrences in 1 log = frequency 1 |
| "checkpoint" | — | ✓ | — | 1 | ❌ no — below min_frequency |
Good promotable insight (generalizable, not session-specific):
Run minimum 3 independent review rounds before merging any PR.
Not promotable (open question, not yet a fact):
Should we use per-occurrence weighting instead of per-log frequency?
→ Comes from ## Open Questions — skip, don't promote.
Frequency is per unique session log, not per occurrence. A topic mentioned 3 times within a single session log still counts as frequency 1. Only occurrences across separate log files increment the frequency count.
Extract from findings sections only. Insights from ## Open Questions are unresolved and not promotable — they are not yet facts. Extract from ## Key Decisions, ## Insights & Learnings, and ## What Worked / Didn't Work sections only.
merged confidence on merge. When merging two memory files where one is conf: high and the other is conf: low, the merged file inherits the LOWER confidence. The conservative value wins — a low-confidence fact does not become high-confidence by being merged with one that is.
auto-saved: true logs. These are checkpoint-synthesized summaries. They may contain less detail than manually-written session logs. Weight them equally for frequency counting but be conservative about extracting nuanced insights from them.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
recap, session-logs, insights, memory-files, frequency-filtering
32 skills in this plugin
/bookmarkQuick URL bookmark capture : paste a link, AI generates name and description, suggests category, saves to Bookmarks.md in awesome-list format. Invoke when user wants to save a URL for later — bare URL with no other context defaults to this. Do NOT use for: deeply processing or summarizing the URL content now (use summarize), saving a note that is not a URL (use capture), or researching a topic from scratch (use research)./braindumpCapture a stream of raw thoughts : classify them and file to inbox with action items extracted. Use when the user signals a free-form, stream-of-consciousness dump with multiple unrelated threads — 'let me dump everything on my mind'. Do NOT use for: a single titled idea (use capture), saving a URL (use bookmark), or anything structured and focused./captureQuick note capture with automatic wikilink suggestions to related existing notes. Use when the user wants to save a single, specific, titled idea, insight, or piece of information to the vault. Do NOT use for: unstructured multi-thread thought dumps (use braindump), saving a URL for later (use bookmark), deeply summarizing an article or URL (use summarize), processing a book (use reading-notes), or teaching the agent a preference (use learn)./cloneClone your agent's portable context (agent folder including MEMORY.md) to a folder for transfer to another vault. Use only when the user explicitly wants to migrate or copy agent memory to a new vault. Do NOT use for: backing up the whole vault, updating OneBrain (use update), or reviewing memory (use memory-review)./connectFind connections between notes and suggest wikilinks to strengthen the knowledge graph. Use when the user wants to discover how existing notes relate to each other — 'find connections', 'what links to this note', 'strengthen my graph'. Do NOT use for: creating new notes (use capture), processing inbox (use consolidate), or searching for specific content (search directly)./consolidateReview inbox and recent notes, synthesize and merge into the knowledge base. Use when the user wants to process, organize, or clear the inbox regardless of topic — 'clean up my inbox', 'process my notes'. Do NOT use for: capturing new information now (use capture or braindump), synthesizing already-vaulted notes on a specific topic (use distill — consolidate works on the inbox), or finding note connections (use connect).npx claudepluginhub onebrain-ai/onebrain --plugin onebrainOther plugins' skills for the same job