Session ingest
Skill BlaiseMoses01/obsidian-second-brain-starter/.claude/skills/session-ingest
Kaparthy LLM wiki style Obsidian vault template for Claude Code knowledge consolidation
npx -y skills add BlaiseMoses01/obsidian-second-brain-starter --skill session-ingestAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Scrape the current Claude Code session's transcript and ingest it into the configured second-brain vault as a sessions/ page, with full fan-out to projects/people/goals. Run at the end of a working session, before /clear. Works from any CWD.
SKILL.md
4.4 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
Ingest this session into the wiki
Capture the conversation you just had — from any repo — and fold it into the vault like a scoped
ingest. A deterministic script scrapes the transcript, a Haiku subagent summarizes it (keeping the
bulky raw text out of this context), then you do the wiki integration after a confirmation step.
Vault root
Resolve the vault root first. Run this in a Bash tool call (not via !-inline execution — the
static permission check rejects shell expansions, so the inline form fails with "Contains expansion"):
d="${CLAUDE_SKILL_DIR:-$(pwd)}"; if [ -n "${SECOND_BRAIN_DIR:-}" ]; then echo "$SECOND_BRAIN_DIR"; else while [ "$d" != "/" ] && [ -n "$d" ]; do if [ -f "$d/CLAUDE.md" ] && [ -d "$d/wiki" ]; then echo "$d"; break; fi; d=$(dirname "$d"); done; fi
Steps
-
Resolve the vault root (precedence):
- If
$ARGUMENTSis non-empty, use it as the vault path. - Else use the auto-resolved path injected above (
$SECOND_BRAIN_DIR, or derived from this skill's location). - If neither yields a directory containing
CLAUDE.md+wiki/, stop and tell the user to setSECOND_BRAIN_DIR(in~/.claude/settings.jsonenv, or the repo's settings) or pass the path as an argument. All vault writes below use this absolute root.
- If
-
Scrape the transcript:
python3 ${CLAUDE_SKILL_DIR}/scripts/scrape_session.py ${CLAUDE_SESSION_ID}It writes a clean digest to/tmp/claude-session-<id>.mdand printsSTAGING_FILE=,TITLE=,DATE=,CWD=,SLUG=,TURNS=. Capture the staging path. If it exits with an error (no transcript), stop and report. -
Summarize via a Haiku subagent. Spawn an
Agentwithmodel: haikuwhose prompt gives it the absolute staging-file path and this output contract — it reads the file and returns ONLY:topic(short, for the page slug) and a 1–2 line summary- what was done / decided
- entities touched: projects, people, organizations, goals (names)
- action items (owner + absolute due date where stated)
- open threads / next steps and key takeaways The raw transcript stays in the subagent's context, not this one.
-
Confirm before writing. Read
<vault>/index.mdto dedup against existing pages. Then show the user the proposedsessions/page (title + summary) and the list of wiki pages you'll create/update. Wait for approval. Convert any relative dates to absolute (today's date is in session context). -
Full ingest (mirror the
ingestdiscipline; all paths absolute under the vault root):- Write
<vault>/wiki/sessions/YYYY-MM-DD-<topic-slug>.md. If<vault>/wiki/_templates/session.mdexists, use it; otherwise use the embedded structure below. - Fan out: create or update each touched
projects/,people/,organizations/,goals/,devlog/page. Add new facts; cite back with[[sessions/<slug>]]; prefer updating an existing page over a near-duplicate; on conflicts add a> [!warning] Contradictioncallout linking both and flag it; bump each touched page'supdated:to today. - Update
<vault>/index.mdwith the new session and any new pages (one-line summaries). - Append to
<vault>/log.md:## [YYYY-MM-DD] session-ingest | <topic>with 1–3 bullets. - Update
<vault>/home.mdif active projects, open goals, or recent decisions changed.
- Write
-
Clean up. Remove the
/tmpstaging file.
Embedded sessions/ page structure (used when no template is present)
---
date: YYYY-MM-DD
repo: <cwd the session ran in>
projects: ["[[projects/project-name]]"]
tags: [session]
---
# <Topic> — YYYY-MM-DD
## Summary
1–2 lines.
## What was done
- ...
## Decisions
- ...
## Action items
- [ ] <action> — owner: [[people/firstname-lastname]] — due: YYYY-MM-DD
## Open threads
- ...
## Links
- [[projects/project-name]] · [[people/firstname-lastname]]
Done when
- A
sessions/page exists for this session, relevant entity/project pages are updated with cite-backs,index.md+log.mdreflect it, and the/tmpstaging file is removed.