/agent-tooling:distillfrom Agent Tooling
Extracts recurring friction from completed work into reusable skills. Use when a conversation exposed corrections, failed assumptions, or non-obvious guidance worth preserving for future tasks.
Ships in Agent Tooling. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Act as a friction extractor. Read the conversation that just happened, find where default agent behavior failed or would fail, and produce an executable skill that prevents that friction from recurring. If default behavior would handle it correctly, there is nothing to distill.
Treat the user's request to distill the conversation as a signal that it contained friction worth preserving. Identify that friction, frame it as a reusable skill, and write it with the user's approval.
If the user supplies optional focus guidance, weight the analysis accordingly.
Read the full conversation. Look for friction: corrections the user made, misunderstandings that required rephrasing, wrong assumptions, failed approaches, non-obvious solutions the user guided you toward. Ignore smooth exchanges — they offer no reuse value. Filter out generic insights that apply to any AI conversation.
Friction gate. If you genuinely find no friction — the conversation was straightforward Q&A or simple task completion — say:
"I did not identify friction patterns where default AI behavior would fail. Would you like me to look deeper, or is there specific friction you want me to focus on?"
If the user redirects you, continue. If they confirm there is nothing, stop.
Anti-anchoring. Before committing to a friction pattern, enumerate all candidate friction points you noticed. Check: is the most obvious friction the most important, or is it masking a subtler structural issue? Select the highest-value cluster.
Skill framing. Can the friction be framed as a single coherent skill — a task-level behavioral specification with trigger conditions and prescriptions? If the patterns are project-contextual (codebase descriptions, project conventions) rather than task-level, say:
"These patterns describe the project, not a reusable task behavior. They may belong in the project's persistent agent instructions: [specific suggestions]. No skill to extract."
Stop. Do not write project-level instruction files as part of this workflow.
Elicitation. In most cases, the conversation contains enough. Only if trigger conditions are genuinely ambiguous or multiple conflicting patterns exist, ask up to 2-3 short-answer questions. Expected frequency: under 10% of invocations.
Resolve the skills root. Use the user-specified destination when provided. Otherwise use the current project's existing canonical skills directory. If the project has no established skills directory and the destination cannot be inferred safely, ask where the reusable skill should live.
Check existing skills. Read [skills-root]/distill-index.md if it exists. Read any listed skills with overlapping trigger conditions.
Mode detection:
When uncertain, default to CREATE.
Preview. Show the complete proposed skill (for CREATE) or a section-level diff with rationale for each change (for UPDATE). For updates, note: "The original will be backed up before modification."
Say: "Confirm to write, or tell me what to change. Say 'abort' to cancel."
For CREATE:
[skills-root]/[skill-name]/SKILL.md (kebab-case name derived from the friction description).[skills-root]/distill-index.md.For UPDATE:
SKILL.md to SKILL.backup.md in the same skill directory (overwrites any previous backup).SKILL.md.If the project uses git, note that the original is also recoverable from version control.
Skills you create use this structure. Not every section is required — omit sections that don't apply. Write in recipe-card style: terse, imperative, actionable.
---
name: [skill-name]
description: [One line in third person: what friction this addresses and when the skill should be used]
---
## When to Use This Skill
[Concrete, observable signals — not abstract domain tags. What is the user doing? What has gone wrong or is about to go wrong? Write conditions a future AI can match against conversation context.]
## Prescriptions
[What to do differently from default AI behavior. Imperative instructions. Each prescription is a delta — do not state what any AI would already do correctly.]
## Anti-Patterns
[Specific failed approaches. "DO NOT [action] — it fails because [reason]." Only include patterns that a future AI would plausibly attempt.]
## Context
[Optional. Brief domain context needed to understand the prescriptions. One paragraph maximum.]
<!-- distill-metadata
created: YYYY-MM-DD
last-updated: YYYY-MM-DD
origin: [brief description of source conversation]
-->
Quality standard. Before writing, check your produced skill against these criteria:
What BAD output looks like (do not produce skills like these):
The index at [skills-root]/distill-index.md:
# Distill Skill Index
| Skill | Path | Created | Updated | Trigger Summary |
|-------|------|---------|---------|-----------------|
| [name] | [skills-root]/[name]/SKILL.md | YYYY-MM-DD | YYYY-MM-DD | [1-line trigger] |
If the index does not exist, create it on first invocation. If it references a skill file that no longer exists, note the discrepancy and remove the stale entry. If a distill-created skill file exists but is not in the index, add it.
This is what a realistic produced skill looks like — use it as a quality reference:
---
name: csv-column-mapping
description: Prevents silent column misalignment. Use when parsing user-provided CSV files whose requested columns have not yet been verified against the actual headers.
---
## When to Use This Skill
When the user provides a CSV file and asks you to extract or transform specific columns by name, and the file has not been parsed yet.
## Prescriptions
- Read and display the actual column headers before writing any extraction code. Do not assume header names from the user's description — they frequently differ (e.g., user says "timestamp" but header is "Created_Date").
- If column names contain spaces or special characters, confirm the exact names with the user before proceeding.
## Anti-Patterns
- DO NOT write pandas code using column names from the user's verbal description without first reading the file headers — this produces silent KeyError or, worse, matches a wrong column.
<!-- distill-metadata
created: 2026-03-10
last-updated: 2026-03-10
origin: CSV parsing session where column name mismatch caused silent data corruption
-->
What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
npx claudepluginhub acumatica/acumatica-ai-resources --plugin agent-toolingOther plugins' skills for the same job