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

  1. Parse $ARGUMENTS (a transcript path, a window like 7d, 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.
  2. 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.
  3. 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.
  4. Dedupe against what already exists before proposing: the target skill's current text, AUTHORING.md, the harness's standing rules, and project memory read via use-project-memory. A lesson the repo already records is dropped with the pointer to where.
  5. 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).
  6. Deliver the proposal table (target, proposed change, evidence locator) and stop for approval. An analysis ask ends here.
  7. Apply only the approved edits, then run the AUTHORING.md ship checklist for every touched skill.
Installs
2
First Seen
6 days ago
distill-session — okisdev/ai-reference