project-distill
Original:🇺🇸 English
Translated
Distill session insights into reusable knowledge: Claude rules, skill improvements, and justfile recipes. Use at the end of a session to capture learnings, update existing artifacts, and avoid reinventing solutions. Prioritizes updating over adding.
5installs
Added on
NPX Install
npx skill4agent add laurigates/claude-plugins project-distillTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →/project:distill
Distill session insights into reusable project knowledge. Reviews what was done during a session and proposes targeted updates to Claude rules, skills, and justfile recipes.
When to Use This Skill
| Use this skill when... | Use alternative when... |
|---|---|
| End of session, want to capture learnings | Need to write a blog post about work done -> |
| Discovered a pattern worth reusing | Need to analyze git history for docs gaps -> |
| Found a CLI workflow worth saving as a recipe | Need to configure a justfile from scratch -> |
| Want to update rules based on session experience | Need to check project infrastructure -> |
| Avoiding reinventing solutions next session | Need to resume work where you left off -> |
Core Principle: Update Over Add
Adding is not always better. Before proposing any new artifact, evaluate:
| Question | If yes... |
|---|---|
| Does this replace an existing rule/recipe/skill? | Remove the old one, add the new |
| Does this improve an existing one? | Update in place |
| Does an existing one already cover this? | Skip it |
| Is this genuinely new and reusable? | Add it |
| Is this a one-off that won't be needed again? | Skip it |
Context
The primary context source is the current conversation history — all messages, tool calls, and results from this session are available. Git history is supplemental and may be unavailable (e.g., in non-git directories or multi-repo workspaces).
- Git repo detected: !
find . -maxdepth 1 -name '.git' -type d - Justfile: !
find . -maxdepth 1 \( -name 'justfile' -o -name 'Justfile' \) -print -quit - Rules directory: !
find .claude/rules -name '*.md' -type f
Parameters
| Parameter | Description |
|---|---|
| Only analyze potential rule updates |
| Only analyze potential skill updates |
| Only analyze potential justfile recipe updates |
| Analyze all three categories (default) |
| Show proposals without applying changes |
Execution
Execute this session distillation workflow:
Step 1: Analyze session activity
Understand what happened during this session using all available context:
- Review the conversation history — tool calls, file edits, commands run, agent dispatches, and results
- If in a git repo, supplement with: and
git log --oneline --max-count=20git log --stat --oneline --max-count=10 - Identify patterns: repeated operations, workarounds, discoveries
- Catalog tools used: effective commands, flags, workflows
- Note pain points: where time was spent figuring things out
Note: Conversation history is the primary source. Git history is supplemental — it may be empty (non-git directory, multi-repo workspace, or no commits this session).
Step 2: Evaluate against existing knowledge
For each potential insight, check existing artifacts:
Rules ():
.claude/rules/*.md- Does it update, contradict, or duplicate an existing rule?
- Prefer updating existing rules over creating new files
Skills (relevant plugin skills):
- Does this improve existing skill commands/examples?
- Does this suggest missing guidance?
Justfile recipes:
- Is there a repeated command that should become a recipe?
- Should an existing recipe be updated with better flags?
- Is an existing recipe now redundant?
Step 3: Check redundancy
For each proposed change, answer:
- Does this make an existing artifact redundant? → Propose removal
- Does this overlap with existing artifacts? → Propose merging
- Is the existing version still better? → Skip the proposal
- Will this be used more than once? → Skip if one-off
Step 4: Present proposals
Categorize findings as:
- [UPDATE] - Reason for update (description of change)
.claude/rules/X.md - [SKIP] Considered rule Y, but Z already covers it
- [UPDATE] - Pattern discovered
plugin/skills/skill-name/SKILL.md - [NEW] Genuinely new and reusable artifact (only if justified)
- [UPDATE] - Better flags discovered (before/after)
recipe-name - [REDUNDANT] - Superseded by new approach
old-recipe
Step 5: Apply changes
If not :
--dry-run- Use AskUserQuestion to confirm each category before applying
- Edit existing files for updates (preferred)
- Create new files only for genuinely new artifacts
- Remove redundant artifacts
Step 6: Report summary
Output concise summary of what was changed (rules updated, recipes added, insights skipped)
Evaluation Criteria for Each Category
Rules Worth Capturing
| Capture when... | Skip when... |
|---|---|
| Pattern applies across sessions | One-time fix |
| Convention that prevents mistakes | Obvious best practice |
| Project-specific constraint discovered | Generic advice |
| Tool behavior that's non-obvious | Well-documented behavior |
Recipes Worth Capturing
| Capture when... | Skip when... |
|---|---|
| Command was run 3+ times with same flags | One-off command |
| Multi-step workflow that should be atomic | Single simple command |
| Flags that are hard to remember | Common well-known flags |
| Project-specific pipeline step | Standard |
Skill Improvements Worth Proposing
| Propose when... | Skip when... |
|---|---|
| Discovered better command flags | Minor style preference |
| Found a pattern the skill doesn't cover | Edge case unlikely to recur |
| Existing guidance was misleading | Niche use case |
| New tool version changed behavior | Temporary workaround |
Agentic Optimizations
| Context | Command |
|---|---|
| Session diff summary | |
| Recent commits | |
| Files changed | |
| List justfile recipes | |
| Dump justfile as JSON | |
| Dry run recipe | |
| Find rules | |
Quick Reference
| Flag | Description |
|---|---|
| Scope to rules only |
| Scope to skills only |
| Scope to justfile recipes only |
| All categories (default) |
| Propose without applying |