session-backfill
Backfill structured session summaries from Claude Code .jsonl transcripts into the vault's per-project Sessions folder.
Skill by hamchowderr
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hamchowderr-session-backfill
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/session-backfill
Tools it pre-approves 2
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash(python3:*),Bash(claude:*)
What's inside
- Skill name
session-backfill- Description
- Backfill structured session summaries from Claude Code .jsonl transcripts into the vault's per-project Sessions folder. Distills each CC session into TL;DR / Goal / Outcome / Decisions / Blockers / Next / References — agent- and human-searchable, not raw transcripts. Use when user says "backfill sessions", "summarize my sessions for X", "fill in the empty session notes", or wants to make QMD project history actually useful.
- License
- MIT
- Allowed tools
- Bash(python3:*),, Bash(claude:*)
- Instructions
- 113 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Pre-approves some shell commands
Agent Skills spec issues
- files: referenced but missing: scripts/project_map.json
Files (3)
- SKILL.md
- backfill.py · scripts/
- project_map.example.json · scripts/
SKILL.md (first lines)
# Session Backfill Skill
Turn empty braynee session-auto-track stubs into substantive per-project session notes by distilling the real Claude Code conversation history.
## Why
Braynee's session-auto-track creates a one-line stub session note when each CC session starts. The stubs never get filled in — they say "Waiting for user to state goal" and "(none yet)" forever. Meanwhile the actual conversation lives in `~/.claude/projects/<encoded-path>/*.jsonl`. QMD indexes only the stubs, so project history is unsearchable.
This skill reads each `.jsonl`, filters the tool-call noise, distills the conversation skeleton, and writes a structured summary into `<vault>/2. Areas/Sessions/<Project>/<date>-<slug>-<type>-<id>.md`.
Idempotent: if a structured note already exists for a `session_id`, it's skipped. Safe to rerun.
## Distillation: no API billing by default
The default backend is **`claude -p`** — it uses your local Claude Code subscription via OAuth. **No `ANTHROPIC_API_KEY`, no Console credits, no infisical, no per-session cost.** The script explicitly strips `ANTHROPIC_API_KEY` from the `claude -p` subprocess env so it can never silently fall back to API billing.
`--use-api` is an explicit opt-in for the raw Anthropic API (Console credits). Use it only if you specifically want API billing and have set `ANTHROPIC_API_KEY` yourself. It is never required and never the default.
## Commands
```bash
# Single project (pilot use) — uses `claude -p`, no API billing
python3 {baseDir}/scripts/backfill.py --project sophon-webapp
# Dry run — print what would be created, no distillation at all
python3 {baseDir}/scripts/backfill.py --project sophon-webapp --dry-run
# Limit to N most-recent sessions per project
python3 {baseDir}/scripts/backfill.py --project sophon-webapp --limit 5
# All projects (the big backfill)
python3 {baseDir}/scripts/backfill.py --all
# Point at a non-default vault location
python3 {baseDir}/scripts/backfill.py --all --vault "/path/to/Obsidian Vault"
# Opt in to the raw API (Console billing — only if you explicitly want it)
ANTHROPIC_API_KEY=... python3 {baseDir}/scripts/backfill.py --project sophon-webapp --use-api
```
## Vault resolution
The vault is resolved universally, no hardcoded path:
1. `--vault PATH` argument
2. `$BRAYNEE_VAULT` / `$OBSIDIAN_VAULT` environment variable
3. Common locations probed for a `.obsidian` directory (`~/Obsidian Vault`, `~/vault`, `~/Documents/Obsidian Vault`, OneDrive / iCloud variants)
4. Falls back to `~/Obsidian Vault` so a brand-new vault still works
## Note format produced
Every backfilled note follows this structure:
```markdown
---
type: session
project: "[[Sophon Webapp]]"
status: done
session_type: debug
session_id: "66b42f24-..."
started: 2026-04-27T09:01:00Z
tags:
- session
- debug
---
## TL;DR
[1-2 sentences — state of work + outcome]
## Goal
[What this session was trying to accomplish]
## Outcome
- **Shipped:** concrete changes that landed
- **In flight:** things started but not finished
## Decisions
- **[Decision]** — rationale, tradeoff
## Blockers / Open Questions
- [Things stuck, waiting, unknown]
## Next
[Single highest-leverage next action]
## References
- **Files:** `path/to/file.ts`
- **Related:** [[wikilinks]]
```
## Project name mapping
Claude Code stores each project under `~/.claude/projects/<encoded-path>/`, where the encoded path is the project's absolute path with separators (and the Windows drive colon) replaced by `-`. The skill derives the project slug generically — it strips a leading Windows drive letter, then takes the path segment after the last recognised parent directory token (`code`, `src`, `work`, `repos`, `dev`, …). This works for any user on any OS regardless of where their code lives.
For projects where the derived slug doesn't map to a clean wikilink (e.g., `dealreveal-engine` → `DealReveal`, not `Dealreveal Engine`), add an override. Overrides are optional — without them the slug is title-cased word-by-word.
**Put the map at `<vault>/.braynee/project_map.json`.** It is looked up there first, then at `scripts/project_map.json` next to this script. The vault copy is the one that works in practice: the script-dir copy is git-ignored, so an installed plugin never ships it and every override silently no-ops (cp-x4y8). A map in the vault is also user data that survives plugin upgrades. Copy `scripts/project_map.example.json` as a starting point.
An override's `folder` must name a Sessions folder that actually exists, or the backfill creates a second one beside it. Check before adding: `ls "<vault>/2. Areas/Sessions"`.
## Requirements
- **Python 3.10+** — that's it for the default path.
- **`claude` CLI on PATH** (Claude Code) — used for distillation via your subscription. Already present wherever this skill runs.
- Optional: `pip install anthropic` **only** if you pass `--use-api` (raw API, Console billing).
- No infisical, no secrets manager, no API key needed for normal use.
## Cost
- Default (`claude -p`): consumes your Claude Code subscription quota, **no API dollar cost**.
- `--use-api` (opt-in only): `claude-sonnet-4-6`, prompt-cached system prompt, ~$0.02/session on Console credits.From hamchowderr/braynee, MIT.
More from hamchowderr/braynee
- 0.603score
board
hamchowderr
Build or refresh a repo's beads board — one published Artifact per repo that shows the backlog visually: status tiles, open PRs and deploys, epic progress, a…
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
clients
hamchowderr
Client relationship management.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
comms
hamchowderr
Sync client communication history (email + Slack) into Obsidian weekly rollup files.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
daily
hamchowderr
Open, create, or update today's daily note.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
excalidraw
hamchowderr
Create Excalidraw diagrams in Obsidian using the ExcalidrawAutomate (EA) API.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
health
hamchowderr
Run a Brain Check — audit your second brain across Setup, Connections, Beads, Memory, Rules, and Inbox.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
prd
hamchowderr
Author and manage Product Requirements Documents (PRDs) under "2.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
recap
hamchowderr
Load context from previous Claude Code sessions and vault notes.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
sessions
hamchowderr
Export Claude Code sessions to Obsidian markdown.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
settings-viewer
hamchowderr
Opens a live visual dashboard of your Claude Code configuration and usage analytics.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
setup
hamchowderr
Second brain onboarding wizard.
SkillAFreshness: A★ 2Claude Code - 0.598score
query
hamchowderr
Search your vault using QMD (semantic + BM25).
SkillAFreshness: A★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- Sep 23, 2026 (1 month ago)
- Last release
- Oct 12, 2026 (16 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/hamchowderr/braynee
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from hamchowderr
- 0.603score
clients
hamchowderr
Client relationship management.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
comms
hamchowderr
Sync client communication history (email + Slack) into Obsidian weekly rollup files.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
daily
hamchowderr
Open, create, or update today's daily note.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
excalidraw
hamchowderr
Create Excalidraw diagrams in Obsidian using the ExcalidrawAutomate (EA) API.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
health
hamchowderr
Run a Brain Check — audit your second brain across Setup, Connections, Beads, Memory, Rules, and Inbox.
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
board
hamchowderr
Build or refresh a repo's beads board — one published Artifact per repo that shows the backlog visually: status tiles, open PRs and deploys, epic progress, a…
SkillAFreshness: A★ 2Claude Code +9
Cite this page
session-backfill skill. Agent Mart. https://agentmart.dev/skills/hamchowderr-session-backfill (last updated 2026-10-24)