Offline-mine this project''s pi session JSONL logs into reusable, verified knowledge: extracts faults, decisions, corrections, procedures and docs, promotes only recurring patterns, and routes artifacts into skill_manage, memory and docs. Use on "mine my sessions", "distill session knowledge", "extract lessons from logs", "turn my pi history into skills/memory".
npx skills add https://github.com/BlackBeltTechnology/pi-agent-dashboard --skill distill-session-knowledge
Offline miner. Turns past pi session traces into durable artifacts. No new
infrastructure — routes into skill_manage, the memory tool, and docs/
(indexed by context-mode FTS5). Dry-run by default; nothing is written until you
review the plan and explicitly apply.
Engine: the published @blackbelt-technology/pi-dashboard-session-distiller
package, invoked through its distill-session-knowledge bin (this skill package
declares it as a runtime dependency).
"extract reusable procedures from my history", "turn session logs into skills".
npx --no distill-session-knowledge --cwd "$(git rev-parse --show-toplevel)"
Add --n <k> to change the recurrence threshold (default 3). Add --json to
emit the full routing plan as JSON for programmatic review.
signal -> sink [action] conf=…:procedure -> skill_manage — candidate reusable SKILL.md.fault -> memory(failure/tool-quirk) — a wrong-way→right-way tool fix.user_correction -> memory(failure/correction) — +AGENTS.md flag means itestablishes a rule and should also patch the relevant AGENTS.md row.
ask_user_decision -> memory(project/convention) — a recorded human decision.documentation -> docs — a recurring how-to summary.STALE flag = confidence below floor; skip or prune, do not write.candidates store and prints the final plan:
npx --no distill-session-knowledge --cwd "$(git rev-parse --show-toplevel)" --apply --json
haiku-class subagent distillation step). For each non-stale entry:
skill_manage → mcp__pi__skill_manage create/patch (query existing first).memory → mcp__pi__memory add with the entry's target + category(memory_search first to dedup; merge into a match instead of duplicating).
docs → delegate the write to a docs subagent in caveman style per theDocumentation Update Protocol, then ctx_index the new doc so it is
FTS5-searchable (task 5.2).
+AGENTS.md entries → patch the relevant AGENTS.md rule via the docs subagent(≤200 chars/row, caveman style) in addition to the memory write.
duplicates (the planner marks merge when a sink already holds the artifact;
still query the live sink, the planner's exists is conservative).
STALE artifact.docs/.npx --no distill-session-knowledge --cwd "$(pwd)" prints a routing plan andmutates nothing (dry-run default; no watermark advance).
ctx_search returns a freshly distilled doc.Take blackbelttechnology/distill-session-knowledge from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npx.
Without those the skill loads but fails at the first command.