project-distill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/project:distill
/project:会话见解提炼
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.
将会话见解提炼为可复用的项目知识。回顾会话期间完成的工作,并针对性地提出对Claude规则、Skills以及justfile配方的更新建议。
When to Use This Skill
该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 -> |
| 适用该Skill的场景... | 适用替代工具的场景... |
|---|---|
| 会话结束时,想要捕获学习成果 | 需要撰写关于已完成工作的博客文章 -> |
| 发现了值得复用的模式 | 需要分析git历史以查找文档缺口 -> |
| 找到了值得保存为配方的CLI工作流 | 需要从头配置justfile -> |
| 想要根据会话经验更新规则 | 需要检查项目基础设施 -> |
| 避免在下一次会话中重复造轮子 | 需要从上次中断的地方继续工作 -> |
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 |
新增并非总是更好。 在提出任何新工件之前,请先评估:
| 问题 | 如果是... |
|---|---|
| 这是否会替代现有的规则/配方/Skill? | 删除旧的,添加新的 |
| 这是否能改进现有的工件? | 原地更新 |
| 现有的工件是否已经覆盖了这个内容? | 跳过 |
| 这是否是真正全新且可复用的内容? | 添加它 |
| 这只是一次性需求,后续不会再用到? | 跳过 |
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
主要的上下文来源是当前对话历史 —— 本次会话中的所有消息、工具调用和结果均可用。Git历史作为补充信息,可能无法获取(例如在非git目录或多仓库工作区中)。
- Git仓库检测:!
find . -maxdepth 1 -name '.git' -type d - Justfile:!
find . -maxdepth 1 \( -name 'justfile' -o -name 'Justfile' \) -print -quit - 规则目录:!
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 |
| 参数 | 描述 |
|---|---|
| 仅分析潜在的规则更新 |
| 仅分析潜在的Skill更新 |
| 仅分析潜在的justfile配方更新 |
| 分析所有三类内容(默认选项) |
| 仅显示建议,不应用更改 |
Execution
执行流程
Execute this session distillation workflow:
执行以下会话见解提炼工作流:
Step 1: Analyze session activity
步骤1:分析会话活动
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).
利用所有可用上下文了解会话期间的工作内容:
- 回顾对话历史 —— 工具调用、文件编辑、执行的命令、Agent调度及结果
- 如果在Git仓库中,补充执行:和
git log --oneline --max-count=20git log --stat --oneline --max-count=10 - 识别模式:重复操作、解决方案、新发现
- 记录使用的工具:高效的命令、参数、工作流
- 标记痛点:花费时间摸索的环节
注意: 对话历史是主要来源。Git历史仅作为补充 —— 可能为空(非Git目录、多仓库工作区或本次会话无提交)。
Step 2: Evaluate against existing knowledge
步骤2:与现有知识对比评估
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?
针对每个潜在的见解,检查现有工件:
规则():
.claude/rules/*.md- 它是否会更新、矛盾或重复现有规则?
- 优先更新现有规则,而非创建新文件
Skills(相关插件Skills):
- 这是否能改进现有的Skill命令/示例?
- 这是否暗示了缺失的指导内容?
Justfile配方:
- 是否有重复执行的命令应该保存为配方?
- 是否应该用更优的参数更新现有配方?
- 现有配方是否已冗余?
Step 3: Check redundancy
步骤3:检查冗余性
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
步骤4:呈现建议
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
将发现的内容分类为:
- [UPDATE] - 更新原因(更改描述)
.claude/rules/X.md - [SKIP] 考虑过规则Y,但Z已覆盖该内容
- [UPDATE] - 发现的模式
plugin/skills/skill-name/SKILL.md - [NEW] 真正全新且可复用的工件(仅在合理情况下添加)
- [UPDATE] - 发现更优参数(前后对比)
recipe-name - [REDUNDANT] - 被新方法取代
old-recipe
Step 5: Apply changes
步骤5:应用更改
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
如果未使用参数:
--dry-run- 使用AskUserQuestion在应用前确认每个分类的更改
- 编辑现有文件进行更新(优先选择)
- 仅为真正全新的工件创建新文件
- 删除冗余工件
Step 6: Report summary
步骤6:报告总结
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 |
| 捕获场景... | 跳过场景... |
|---|---|
| 同一命令带相同参数被执行3次以上 | 一次性命令 |
| 应原子化的多步骤工作流 | 单个简单命令 |
| 难以记忆的参数 | 常见且广为人知的参数 |
| 项目特定的流水线步骤 | 标准 |
Skill Improvements Worth Proposing
值得提出的Skill改进建议
| 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 |
| 提出建议的场景... | 跳过场景... |
|---|---|
| 发现更优的命令参数 | 微小的风格偏好 |
| 发现Skill未覆盖的模式 | 不太可能再次出现的边缘情况 |
| 现有指导内容存在误导性 | 小众使用场景 |
| 工具新版本更改了行为 | 临时解决方案 |
Agentic Optimizations
Agent优化命令
| Context | Command |
|---|---|
| Session diff summary | |
| Recent commits | |
| Files changed | |
| List justfile recipes | |
| Dump justfile as JSON | |
| Dry run recipe | |
| Find rules | |
| 场景 | 命令 |
|---|---|
| 会话差异总结 | |
| 最近提交记录 | |
| 已更改文件 | |
| 列出justfile配方 | |
| 以JSON格式导出justfile | |
| 试运行配方 | |
| 查找规则文件 | |
Quick Reference
快速参考
| Flag | Description |
|---|---|
| Scope to rules only |
| Scope to skills only |
| Scope to justfile recipes only |
| All categories (default) |
| Propose without applying |
| 参数 | 说明 |
|---|---|
| 仅聚焦规则 |
| 仅聚焦Skills |
| 仅聚焦justfile配方 |
| 所有分类(默认) |
| 仅提出建议,不应用更改 |