distill-session
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Context
This repo's Claude transcripts: !d=~/.claude/projects/$(pwd | sed 's#[/.]#-#g'); out=$(ls -t "$d"/*.jsonl 2>/dev/null | head -3); echo "${out:-(none)}"
Other harness stores present: !out=""; test -d ~/.codex/sessions && out="$out codex"; test -d ~/.grok/sessions && out="$out grok"; echo "${out:-(none)}"
Instructions
Mine the chosen transcripts for lessons that would change future agent behavior, gate them hard, and deliver a proposal table; nothing is applied without approval.
Process
- Parse
$ARGUMENTS(a transcript path, a window like7d, or a topic that narrows the scan; default to this repository's transcripts from the last 7 days). Resuming one specific session's unfinished work is not this skill; that ask continues in the conversation with the memory store, not by mining. Resolve stores and inventory transcripts newest-first per references/stores.md, cap the inventory at 20 files, and state the cap and what fell outside it. - Delegate reading: dispatch one read-only subagent per transcript, in parallel batches, each returning candidate lessons in the fixed shape from references/stores.md, covering both wins (what worked and deserves encoding) and anti-patterns (where the agent flailed or was corrected, and what would have prevented it). Bulk transcript text stays in the subagents; only the structured candidates enter the main context.
- Gate every candidate, killing on the first failure: durable (applies beyond that one task), specific (names files, commands, or conditions), decision-changing (would alter what the agent does next time), encodable (has a concrete structural home). A candidate whose only evidence is an agent's own success claim in the transcript is additionally re-verified against the live repository before it may pass; a self-report is not proof.
- Dedupe against what already exists before proposing: the target skill's current text,
AUTHORING.md, the harness's standing rules, and project memory read viause-project-memory. A lesson the repo already records is dropped with the pointer to where. - Route each survivor to its home: an edit to a named existing skill (cite the exact section and the sentence to change), a new-skill candidate (recorded in the backlog memory, not built in this pass), a standing-rules candidate (delivered as a suggested line, never written directly), or a durable project fact (written through
use-project-memory). - Deliver the proposal table (target, proposed change, evidence locator) and stop for approval. An analysis ask ends here.
- Apply only the approved edits, then run the
AUTHORING.mdship checklist for every touched skill.