$npx -y skills add puppyfront-web/work-by-roles --skill knowledge_distillationDistills iteration lessons, categorizes them, and injects them into the most relevant Skill.md files with deduplication.
| 1 | # Knowledge Distillation |
| 2 | |
| 3 | ## 概述 |
| 4 | |
| 5 | Analyze iteration data to extract reusable lessons, categorize them into the most relevant skills, and perform idempotent updates to Skill.md files. |
| 6 | |
| 7 | ## 能力维度 |
| 8 | |
| 9 | ### Classification |
| 10 | |
| 11 | Determine which specific skill (e.g., `python_engineering`, `schema_design`) a lesson most accurately belongs to. |
| 12 | |
| 13 | ### Deduplication |
| 14 | |
| 15 | Analyze existing "Lessons Learned" sections in target skills to ensure new entries provide unique value and don't replicate existing knowledge. |
| 16 | |
| 17 | ### Skill Injection |
| 18 | |
| 19 | Precisely inject or merge structured lessons into the target Skill.md files while preserving the overall file structure. |
| 20 | |
| 21 | ## 工具支持 |
| 22 | |
| 23 | - **markdown**: Parse and generate formatted Markdown for Skill sections. |
| 24 | - **file_read**: Load existing Skill.md files for context and deduplication checks. |
| 25 | - **file_write**: Apply targeted updates to Skill.md files. |
| 26 | - **code_search**: Cross-reference lessons with actual code implementation for validation. |
| 27 | |
| 28 | ## 约束条件 |
| 29 | |
| 30 | - must_identify_target_skill_accurately |
| 31 | - must_check_existing_lessons_to_prevent_duplicates |
| 32 | - must_maintain_consistent_lesson_format |
| 33 | - must_only_modify_lessons_learned_section |
| 34 | |
| 35 | ## 能力等级 |
| 36 | |
| 37 | ### Level 1 |
| 38 | Identifies obvious lessons and adds them to a generic "General" skill or log. |
| 39 | |
| 40 | ### Level 2 |
| 41 | Correctly categorizes lessons into specific functional skills and avoids exact duplicates. |
| 42 | |
| 43 | ### Level 3 |
| 44 | Performs semantic deduplication, merges related lessons into more powerful generalized rules, and maintains a highly optimized Skill library. |