/throughline:consolidatefrom throughline
Mine handoff session logs for lessons recurring across sessions and propose promoting them to durable homes, with a human gate. Use when the user says "consolidate handoffs", "mine the handoff logs", "promote lessons", or when HANDOFF.md is bloated. Not for memory files (use consolidate-memory).
Ships in throughline. 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.
Goal: Handoff distills one session; onboard reads it back. Neither notices that the same lesson has now appeared in four different session logs. This skill is the periodic pass that does: mine the logs since the last pass, find what recurs, and propose promoting it - with a human gate - into the durable layer where it stops needing to be re-learned.
Data directory (resolve once): $THROUGHLINE_DATA_DIR if set, else
<project-root>/.claude/throughline/. Below, DATA refers to that path. In a
linked git worktree, <project-root> here is the main working tree, not the
worktree itself (see docs/REFERENCE.md "Git worktrees") - so DATA is shared across every
worktree of the repo.
DATA/logs/handoff-YYYY-MM-DD-HHMM.md.agent/handoff/logs/ (the singular
THROUGHLINE_DATA_DIR convention documented in docs/REFERENCE.md - skip it if that
path already is DATA/logs/) or .agent/handoffs/ (a plural variant used
by other harnesses). When either directory exists and isn't already covered
by DATA, mine it too - the two names differ by one letter and are easy to
conflate, so check for both.Scope boundary: this skill owns the handoff session logs - see Phase 0 for
which requests are in scope, and for the memory-file half of the boundary. What
that boundary means mid-pass: if a candidate's right home is an auto-memory file,
write the one new entry (Phase 4) and leave the reflective cleanup of the memory
dir to consolidate-memory - don't duplicate that work.
Two shipped skills share the word "consolidate" and touch completely different
stores. This one reads the handoff session logs; the
consolidate-memory skill owns the auto-memory files
(Claude Code: ~/.claude/projects/<slug>/memory/, routing). A handoff or a user can name
either job with the same two words, and the store is the part that gets lost.
Decide the store from the request before reading any file. If it is about the
memory dir - $CLAUDE_MEMORY_DIR where set, else
~/.claude/projects/<slug>/memory/, and their MEMORY.md index - duplicate or
stale memories, orphans, or dangling [[wikilinks]] - stop here: say in one line
that this is consolidate-memory's job, and suggest
the user run it. Read no session logs, propose no promotions, and end the turn. Do
not "confirm scope" by mining the logs first.
One request can name both stores ("consolidate handoffs and tidy MEMORY.md").
Then run this pass over the logs and name the memory half for
consolidate-memory in the same report - the
redirect above is for a request that is only about the memory dir, and neither
half may be dropped silently.
Every request that is not redirected reaches Phase 1, but announce first unless the
request names a log outright. "consolidate handoffs" and "mine the handoff logs" name
the store, so they need no announcement. "consolidation pass" and "promote lessons"
do not - consolidate-memory calls its own run a pass too - and neither does a bare
"consolidate". For any of
those, whatever it came from, a handoff briefing or the user, state in your first
line that you are reading the session logs, then continue. That announcement is
unconditional on every store-less request: it is what makes a wrong briefing surface
before work is spent, so it must not hinge on the request looking handoff-shaped.
DATA/HANDOFF.md: among lines containing the literal (session logs) (Phase 4
writes it; consolidate-memory records under "Memory hygiene passes"), take the
greatest through handoff-YYYY-MM-DD-HHMM.md value - the newest log that pass
read. If the section is absent, this is the first pass - everything is in scope.
If it has no line with both, read no marker from it (it predates the format and
may hold memory sweeps): treat every log as in scope and say so when confirming
scope below.DATA/logs/handoff-*.md whose filename sorts
after that through value (plain string comparison), plus .agent/handoff/logs/*.md and .agent/handoffs/*.md when those
directories exist and aren't already DATA/logs/. The filenames carry the
date; no content parsing needed to scope.DATA/HANDOFF.md's own size discipline (separate from mining the
logs below - this looks at HANDOFF.md itself). It is read in full every
session (see handoff Phase 4 for the resident-cost rationale). handoff
now enforces a measured cap per edit (target 150 lines / ~8KB, hard stop
200 lines / ~11KB, byte count binding since the file is table-heavy - not
guidance, a count it checks after every write), plus a template with no
durable-fact sections at all: architecture, environment, tools, and
auth/secrets content has no home in HANDOFF.md anymore, only in native
memory. Per-edit discipline can still drift over many small handoffs, so
re-run the count here: wc -l DATA/HANDOFF.md and wc -c DATA/HANDOFF.md.
handoff Phase 4 step 4's frontmatter shape), or
an existing session log (cited, never edited - see Phase 4). A candidate
with nowhere durable to land doesn't qualify for HANDOFF-diet - cutting it
would be a real loss, not a relocation. CHANGELOG.md remains a valid
destination for genuine per-version narrative where the project already
maintains one; don't require every project to start one just for this.Read the in-scope logs. "Key learnings & gotchas" is the richest seam, but lessons also hide in "What happened" and "Next steps". A candidate is anything that recurred in 2 or more sessions:
Each candidate carries three things:
A lesson seen once is not a candidate - it stays in its log until it earns a second appearance.
For each candidate, propose exactly one home:
| Home | When |
|---|---|
(a) Global CLAUDE.md rule | The lesson holds across all projects |
| (b) The owning skill, in its source repo | The lesson corrects or extends a specific skill. File an issue in that repo - never edit another repo's skill directly |
(c) Project CLAUDE.md | The lesson is project-specific, true every session, and belongs in the project's own instructions rather than a memory fact |
| (d) Auto-memory file (Claude Code; elsewhere per routing) | A confirmed preference or fact that fits the native memory types (feedback, user, project, reference) — the default for anything "project-specific and true every session" that isn't an instruction. HANDOFF.md is never a home here: it holds in-flight state only (see handoff Phase 2), so a durable lesson routed there would just become a fresh HANDOFF-diet finding (row (e)) |
| (e) HANDOFF-diet (trim, don't add) | The candidate is a Phase 1.4 size-discipline finding - HANDOFF.md is over its 200-line/~11KB cap, or durable-fact content has crept back into it. For each line proposed for removal, state exactly where its surviving copy lives or will be written (existing memory topic file, a new one to write in this same promotion, existing session-log citation, or an existing CHANGELOG.md entry), so the reviewer can confirm nothing is actually lost |
Present the full list - lesson, evidence, confidence, proposed home - and stop. Nothing is applied without explicit approval, per item. The user may approve, redirect (same lesson, different home), or reject each candidate independently. Unlike handoff's post-write review, this gate is pre-write: promotions touch always-loaded files, where one wrong line costs every future session.
handoff Phase 4 step 4, or the routing file
outside Claude Code) or a new CHANGELOG.md entry only when the project already
maintains a CHANGELOG.md (never create one solely for this; see Phase 1.4) -
re-verify every cited existing memory file/CHANGELOG.md/session-log copy
still checks out, then trim the now-redundant content from HANDOFF.md. Never
write into a session log - they are append-only historical evidence (see
Reminders); a candidate with nothing durable to point to never reaches this
step (gated in Phase 1.4).DATA/HANDOFF.md under "Consolidation passes" (create the
section if absent), one line per promotion, each starting with
YYYY-MM-DD (session logs) through handoff-YYYY-MM-DD-HHMM.md (the newest log
this pass read), then what was promoted and where. In a table, all of that goes in
the first cell. A pass that promotes nothing still writes one such line ("nothing
promoted"), or the next pass re-mines the same logs. Phase 1 reads this line as
the marker.
Update the Last Updated date.consolidate-memory's turf - one new memory entry per approved
candidate is fine; restructuring the memory dir is not this skill's job.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dynamic/throughline --plugin throughline4 skills in this plugin
/consolidate-memoryMemory file hygiene for ~/.claude/projects/<project-slug>/memory/ - detects duplicates, stale entries, unindexed orphans, index orphans, and dangling [[wikilinks]]. Use when the user says "consolidate memory", "clean up memory", or asks to dedupe or audit memory files or MEMORY.md./handoffDistill the session into HANDOFF.md plus a session log from the capture buffer. Use when the user says "handoff", "wrap up", "save the session", "checkpoint", or signals done (thanks, that's all). Offer it proactively at wrap-up./onboardProject orientation at session start - reads HANDOFF.md, checks live git/PR/issue state, surfaces unconsumed capture buffers. Use when starting or resuming work, or when the user says "onboard", "catch me up", "where were we", "what's the state".Other plugins' skills for the same job