skill-distillation

skill-distillation is a skill for Claude Code from naimkatiman/continuous-improvement. It costs 57 tokens per session (827 once invoked), scanned A, original, MIT.

A skill that records repeated successful ways of completing coding tasks. It finds tool sequences that worked across multiple sessions and turns them into reusable draft instructions.

In plain words
What is it for?
Use it after successful multi-step work or during a retrospective to find recurring test, build, and verification sequences in the observation log.
Why use it?
It prevents the agent from rediscovering the same reliable process each time. Only patterns ending in successful verification are considered.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths.

Part of the continuous-improvement plugin — 28 skills, 6 hooks shipped together

Good fit Use it after successful multi-step work or during a retrospective to find…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/naimkatiman/continuous-improvement/skill-distillation
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 naimkatiman/continuous-improvement --skill skill-distillation
Clone the repo
git clone --depth 1 https://github.com/naimkatiman/continuous-improvement

Made for: Claude Code.

Or install continuous-improvement, the plugin that ships this one along with the rest of its 28 skills, 6 hooks.

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 skill-distillation

README.md
[![agentmods](https://agentmods.dev/badge/skills/naimkatiman/continuous-improvement/skill-distillation.svg)](https://agentmods.dev/skills/naimkatiman/continuous-improvement/skill-distillation)
Your own site
<a href="https://agentmods.dev/skills/naimkatiman/continuous-improvement/skill-distillation"><img src="https://agentmods.dev/badge/skills/naimkatiman/continuous-improvement/skill-distillation.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 827 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.
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.00057 $0.00827
Opus 5 $0.00028 $0.00413
Sonnet 5 $0.00011 $0.00165
Haiku 4.5 $0.00006 $0.00083

Measured 6d ago against content hash 859bc8cc4956, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

skill-distillation 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 6d 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.

plugins/continuous-improvement/skills/skill-distillation/SKILL.md · 58 lines

How it starts

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

Skill Distillation — Turn Repeated Wins Into Reusable Instincts

Law 7 says learn from every session. The friction harvester already learns from failures. This skill learns from the other side: when the same tool sequence keeps ending in a passing verification, that is a recipe worth keeping — not a coincidence to forget.

When to Activate

  • At end of session, after a successful multi-step task — check whether the pattern is worth keeping.
  • When you notice you have solved a similar problem the same way more than once.
  • During a retrospective, to mine the observation log for patterns that have proven themselves.

Core Concept

Distillation walks the observation log, groups it into contiguous trajectories (split on session change or a long time gap), and keeps only the trajectories that ended in success:

verify-exit-0   — a Bash test/build/verify command with a non-failing output
reflection-pass — an observation containing "verified" / "phase 4" / "verify:all green"

It then mines the tool-name sequences of successful trajectories for n-grams (length 3–5) that recurred across multiple distinct sessions. A pattern repeated only within a single session is rejected — that is repetition, not a reusable skill.

The Promotion Ladder

Drafts never affect behavior until you promote them. Three explicit steps, no auto-promotion:

1. ci_distill_candidates           — list patterns that qualify (read-only)
2. ci_distill_propose id=<id>      — write a DRAFT to ~/.claude/instincts/<hash>/drafts/
                                      (placeholder body — you fill in the real recipe)
3. <edit the draft body by hand>   — the tool sequence is evidence, not a recipe
4. ci_distill_promote id=<id>      — promote to a live instinct at 0.5 confidence (SUGGEST)

The draft starts at 0.4 confidence and lives in a drafts/ subdirectory that the instinct loader ignores. Only ci_distill_promote writes a live instinct, at 0.5 (SUGGEST tier) — it suggests, it does not auto-apply, until the normal reinforcement loop earns it more confidence.

Read the full file on GitHub · 58 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. 6d ago First seen · 58 lines · 57 tokens per session scan A 859bc8cc4956

Subscribe to this mod's changes

skill-distillation is a skill published in the GitHub repository naimkatiman/continuous-improvement (7 stars, last pushed today), licensed MIT. It adds 57 tokens to every session and 827 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

opensrc

Fetch dependency source code to give AI agents deeper implementation context. Use when the agent needs to understand how a library works internally, read source code for a package, fetch implementation details for a dependency, or explore how an npm/PyPI/crates.io package is built. Triggers include "fetch source for"…

vercel-labs/opensrc · 103 tokens

nopus-configure

Configure nopus complexity sensitivity, extra-simple rewrites, rewrite evidence, and Pi response hiding for this user.

Vistyy/nopus · 27 tokens

agentpush

Bridge an imported agentpush MCP server (Telegram, WhatsApp, etc.) with live agentproto sessions via the daemon's transmitter subsystem: transmitmessage sends outbound and binds the recipient to a session, inboundwatcherstart polls agentpush for new messages, and inboundendpointcreate/POST /inbound(/:slug) route…

agentproto/ts · 119 tokens

bureau

Drive Bureau — the browser stack's installable capability server: a stealth Firefox (Camofox) + daemon that exposes browser tools as MCP-over-HTTP on :8830, plus a CLI for saved browser identities (sessions), social capture / search, adapter health probes, declarative workflows, and Guilde connection. Use when working…

agentproto/ts · 131 tokens

agentproto-apps

Operate and build Agentproto apps — AIP-42 app bundles (defineApp().emit(dir), APP.md + agents/ + workflows/ + ui/) and their daemon lifecycle (appinstall, appapply, apprun, appstatus, appstop) plus the app-scoped durable data plane (appdataread/write/list/migrate). Covers serving one with a UI (agentproto app serve →…

agentproto/ts · 178 tokens

agentproto-llm-endpoint

Use the local LLM endpoint proxy (localhost:18090) — or your own gated public deployment — to route Claude Code / Claude SDK through custom providers (OpenRouter, Moonshot, Groq, ZAI) via an Anthropic-compatible gateway. Covers adapter-specific behaviors, auth patterns, proxy codenames, and common failure modes.

agentproto/ts · 77 tokens