distill-session-knowledge

distill-session-knowledge is a skill for Claude Code, Codex from BlackBeltTechnology/pi-agent-dashboard. It costs 78 tokens per session (929 once invoked), scanned A, original, MIT.

An offline tool that examines this project's past pi session logs and turns repeated lessons into reusable project knowledge.

In plain words
What is it for?
Use it to find patterns in session history, review proposed knowledge updates, and route approved results into skills, memory, or documentation.
Why use it?
It helps preserve recurring mistakes, decisions, fixes, and procedures instead of leaving them buried in old conversations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions AGENTS.md.

Good fit Use it to find patterns in session history, review proposed knowledge updates, and route approved results into skills, memory, or documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blackbelttechnology/pi-agent-dashboard/distill-session-knowledge
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add BlackBeltTechnology/pi-agent-dashboard --skill distill-session-knowledge
Clone the repo
git clone --depth 1 https://github.com/BlackBeltTechnology/pi-agent-dashboard

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for distill-session-knowledge

README.md
[![agentmods](https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/distill-session-knowledge/github.svg)](https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/distill-session-knowledge)
Your own site
<a href="https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/distill-session-knowledge"><img src="https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/distill-session-knowledge/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for distill-session-knowledge

Your own site · 80×15
<a href="https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/distill-session-knowledge"><img src="https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/distill-session-knowledge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 929 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 27
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 44
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 69
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.00929
Opus 5 $0.00039 $0.00464
Sonnet 5 $0.00016 $0.00186
Haiku 4.5 $0.00008 $0.00093

Measured 9d ago against content hash 5f6c7bdcc10e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

distill-session-knowledge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/distill-session-knowledge/.pi/skills/distill-session-knowledge/SKILL.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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).

When to use

  • "Mine / distill my pi sessions", "what recurring mistakes do I keep making", "extract reusable procedures from my history", "turn session logs into skills".
  • After a stretch of work, to harvest verified lessons before they decay.

Procedure

  1. Dry-run the miner (no writes) for this project:

    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.

  2. Review the routing plan. Each entry shows 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 it establishes 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.
  3. Apply once the plan looks right — persists the watermark + below-threshold candidates store and prints the final plan:

    npx --no distill-session-knowledge --cwd "$(git rev-parse --show-toplevel)" --apply --json
    
  4. Execute the routed writes from the plan, using your tools (this is the haiku-class subagent distillation step). For each non-stale entry:

    • skill_managemcp__pi__skill_manage create/patch (query existing first).
    • memorymcp__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 the Documentation 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.

Read the full file on GitHub · 73 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 73 lines · 78 tokens per session scan A 5f6c7bdcc10e

Subscribe to this mod's changes

distill-session-knowledge is a skill published in the GitHub repository BlackBeltTechnology/pi-agent-dashboard (278 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 929 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.