# Knowledge Distillation

> Distills iteration lessons, categorizes them, and injects them into the most relevant Skill.md files with deduplication.

- Skill: `viewway/knowledge-distillation` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add viewway/knowledge-distillation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/viewway/knowledge-distillation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: viewway (https://skillmd.com/u/viewway)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/viewway/knowledge-distillation

---

# Knowledge Distillation

## 概述

Analyze iteration data to extract reusable lessons, categorize them into the most relevant skills, and perform idempotent updates to Skill.md files.

## 能力维度

### Classification

Determine which specific skill (e.g., `python_engineering`, `schema_design`) a lesson most accurately belongs to.

### Deduplication

Analyze existing "Lessons Learned" sections in target skills to ensure new entries provide unique value and don't replicate existing knowledge.

### Skill Injection

Precisely inject or merge structured lessons into the target Skill.md files while preserving the overall file structure.

## 工具支持

- **markdown**: Parse and generate formatted Markdown for Skill sections.
- **file_read**: Load existing Skill.md files for context and deduplication checks.
- **file_write**: Apply targeted updates to Skill.md files.
- **code_search**: Cross-reference lessons with actual code implementation for validation.

## 约束条件

- must_identify_target_skill_accurately
- must_check_existing_lessons_to_prevent_duplicates
- must_maintain_consistent_lesson_format
- must_only_modify_lessons_learned_section

## 能力等级

### Level 1
Identifies obvious lessons and adds them to a generic "General" skill or log.

### Level 2
Correctly categorizes lessons into specific functional skills and avoids exact duplicates.

### Level 3
Performs semantic deduplication, merges related lessons into more powerful generalized rules, and maintains a highly optimized Skill library.

