# Zhengliu Skill

> 通用蒸馏协议，用于把任何人、关系、主题、方法、流程、系统、产品、作品、风格或资料集合蒸馏成可复用的 AI skill、blueprint 或 operating manual。 Use when Claude needs to read mixed materials, classify the distillation target, extract stable structure, separate evidence from inference, and generate a reusable folder instead of a one-off summary. 当用户说「蒸馏」「distill」「帮我提炼」「做成 skill」「做成 pack」时触发。 即使用户只是说「帮我把 XX 整理成可复用的东西」「把这些材料变成一个 skill」也应触发。

- Skill: `magician-jackson/zhengliu-skill` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add magician-jackson/zhengliu-skill`
- Raw SKILL.md: https://api.skillmd.com/api/skills/magician-jackson/zhengliu-skill/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: magician-jackson (https://skillmd.com/u/magician-jackson)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/magician-jackson/zhengliu-skill

---


> **Language / 语言**: This skill supports both English and Chinese. Detect the user's language from their first message and respond in the same language throughout.
>
> 本 Skill 支持中英文。根据用户第一条消息的语言，全程使用同一语言回复。

# 蒸馏.skill — 通用蒸馏协议

> *"不是把材料总结得更好看，而是把它压成另一个模型还能调用的结构。"*

## Core Idea

- Distill reusable structure, not pretty summary.
- Capture `HOW` and `WHY`, not only `WHAT`.
- Separate evidence, inference, and uncertainty.
- Keep stable cores, mark variable surfaces.
- Always write boundaries, anti-patterns, and failure modes.
- Default to creating a reusable folder, not a single answer blob.
- A good distillation produces an **operating system**, not a **costume**.

## Trigger Conditions

Activate when the user says:
- `/zhengliu-skill` or `/distill`
- "帮我蒸馏" / "蒸馏一下" / "做成 skill" / "做成 pack"
- "distill this" / "make a skill from"
- "帮我把 XX 提炼成可复用的东西"

---

## Tool Usage Rules

| Task | Tool |
|------|------|
| Read files (MD/TXT/PDF/images) | `Read` |
| Search for files | `Glob` / `Grep` |
| Research current facts about living targets | `WebSearch` / `WebFetch` |
| Create directories | `Bash` → `mkdir -p` |
| Write/update skill files | `Write` / `Edit` |
| Scaffold a new pack | `Bash` → `python scripts/init_distill_pack.py` |

---

## Routing

1. Classify the target. If classification is unclear, read [references/distillation-taxonomy.md](references/distillation-taxonomy.md).
2. Choose the smallest sufficient archetype:
   - `persona`: a person, role, mentor, creator, colleague, customer segment
   - `framework`: a thinker, book, course, worldview, decision method
   - `workflow`: a task, SOP, craft, operating procedure, review routine
   - `system`: a team, product, organization, platform, community
   - `style`: writing, design, interface, media, brand, expression pattern
   - `hybrid`: two or more archetypes are necessary for faithful reuse
3. Choose the output depth:
   - `brief`: distill brief only
   - `pack`: reusable folder with `SKILL.md` and support files
   - `shielded`: public/private split for sensitive material

## Clarify The Task

Ask only if the ambiguity meaningfully changes the distillation:

- What exactly is being distilled?
- What should the result help the user do?
- What materials are available, and what boundaries must be respected?

Default to two or fewer targeted questions. If the materials already make the goal obvious, do not stall the workflow.

## Evidence Rules

- Prefer first-party materials over commentary.
- Prefer repeated behavior over isolated slogans.
- Prefer decision records over polished self-description.
- Prefer recent material when the target is living, active, or rapidly changing.
- Mark every strong claim as one of:
  - `Observed`: directly supported by the materials
  - `Inferred`: synthesis from multiple signals
  - `Unknown`: plausible but not supported enough to encode

Read [references/extraction-framework.md](references/extraction-framework.md) when extracting signals.

---

## Main Workflow

### Step 1: Define The Distillation Contract

Write a one-line contract before doing heavy synthesis:

`Distill [target] as a [archetype] pack so it can help with [use case], using [source scope], while respecting [boundaries].`

If the user has not specified the archetype, infer it and state the inference in the preview.

### Step 2: Receive And Map Sources

#### Source Types

Accept materials in any of these forms:

| Input Type | How To Handle |
|------------|---------------|
| File path(s) | `Read` the file(s) directly |
| Directory path | `Glob` to discover files, then `Read` key ones |
| Pasted text | Use directly as primary source |
| URL(s) | `WebFetch` to extract content |
| User memory/description | Treat as low-confidence hints until corroborated |
| Chat logs (WeChat/QQ/etc.) | Parse with scripts if available, otherwise `Read` raw export |
| Images/screenshots | `Read` to extract visual content |
| PDF documents | `Read` with page ranges for large files |

#### Build A Source Map

Create a compact source map:

- primary sources (first-party writings, speeches, interviews, code, records)
- behavior traces (decisions made, patterns repeated, things refused)
- secondary analysis (biographies, reviews, commentary by credible observers)
- user summaries or memory-based input
- missing but high-value sources (what would most improve the distillation)

Tag weak or biased inputs early. If the target is current or living, use `WebSearch` to verify time-sensitive facts before crystallizing them.

### Step 3: Build A Signal Ledger

For the target, extract:

- repeated statements (said more than once across different contexts)
- repeated actions (behavioral patterns, not one-off events)
- decision examples (concrete choices with visible reasoning)
- tensions or contradictions (where the target seems inconsistent)
- edge cases (unusual situations that reveal deeper logic)
- refusals, taboos, or hard boundaries (what the target explicitly rejects)

Turn observations into reusable structure only after support from either:

- two or more independent signals, or
- one explicit statement plus one behavioral example

Read [references/extraction-framework.md](references/extraction-framework.md) for the full inference ladder.

### Step 4: Choose The Pack Shape

Read [references/output-blueprints.md](references/output-blueprints.md) and select the default file set for the archetype.

Use the smallest pack that preserves utility:

- do not generate memory files for a pure workflow
- do not generate metrics files for a pure persona
- do combine packs when the use case truly spans multiple archetypes

### Step 5: Synthesize The Core

Reduce the source map and signal ledger into:

- **stable invariants**: rules that hold across contexts
- **operating rules**: actionable heuristics for downstream use
- **anti-patterns**: what reliably causes failure or breaks the core logic
- **boundaries**: what the pack must never pretend to know
- **honest limitations**: where the distillation is thin, biased, or time-bound

Good distillation keeps contradictions as productive tensions instead of forcing fake consistency.

#### For Persona/Framework Archetypes: Build The Agentic Protocol

If the distillation target is a person or thinker whose perspective will be used interactively, build an **agentic protocol** that defines how the distilled skill should behave when activated:

**Role-Play Rules:**
- Use first person ("I") not third person ("XX would think...")
- Enter character directly; disclaimer only on first activation
- Handle out-of-scope questions in-character (admit ignorance, use analogies)
- Define exit trigger (user says "exit" / "switch back" / "stop role-playing")

**Response Workflow:**
1. Classify incoming question: needs facts → research first; pure framework → apply models directly; mixed → research then analyze
2. If research needed: use `WebSearch`/`WebFetch` to get current facts before responding
3. Apply mental models and heuristics to generate response
4. Use the target's expression DNA for output style

**Expression DNA** (extract from materials, not invented):
- Sentence patterns (short anchor + long expansion? question-driven? story-first?)
- Vocabulary preferences (colloquial vs formal? specific word substitutions?)
- Rhythm (how does the target open, develop, and close a point?)
- Humor style (self-deprecating? absurdist? provocative? none?)
- Attitude spectrum (how does the target react to different situations?)
- Language adaptation rules (if outputting in a different language than the source)

**Verification Dialogue:**
Include 2-3 example dialogues that demonstrate the distilled skill in action. These serve as both quality check and usage guide.

### Step 6: Preview Before Writing

Before creating files, show a concise preview:

- inferred archetype
- target and intended use
- strongest extracted patterns (top 5-8)
- files that will be created
- key risks, gaps, or assumptions
- confidence level (high / medium / low) with reasoning

If the user corrects the framing, update the contract before writing.

### Step 7: Scaffold And Write

When the user wants a new reusable folder, scaffold first:

```bash
python scripts/init_distill_pack.py <archetype> <slug> --path <output-dir>
```

Then fill the generated files with distilled content.

Always create:

- `meta.json`
- `SKILL.md`

Then add or complete the archetype files chosen from the blueprint.

#### SKILL.md Structure Requirements

The top-level `SKILL.md` must be **operational and self-contained**. Another model should be able to use it without reading the supporting files. It should include:

1. **Frontmatter** with name, description, trigger conditions
2. **Usage instructions** (what it's good at, what it's not)
3. **Role-play rules** (for persona/framework types)
4. **Agentic protocol** (response workflow with research steps)
5. **Identity card** (concise background)
6. **Core content** (mental models / workflow steps / style rules / etc.)
7. **Decision heuristics** (actionable rules)
8. **Expression DNA** (how to sound like the target)
9. **Honest boundaries** (what the distillation cannot do)
10. **Quick reference** (cheat sheet for fast lookup)

Not all sections apply to all archetypes. Use only what the archetype needs.

### Step 8: Verify

Read [references/quality-rubric.md](references/quality-rubric.md) and check:

- another model can actually use the pack without the original sources
- the pack encodes mechanisms, not only vibes
- uncertainty is visible
- the target's limits are explicit
- the result matches the intended use case
- example dialogues or usage scenarios are included
- anti-patterns and failure modes are documented

---

## Writing Rules

- Distill mechanics, not cosplay.
- Prefer named rules over adjective piles.
- Prefer reusable questions over one-off anecdotes.
- Convert memorable quotes into operating rules unless the quote itself is the behavior.
- Keep direct quotes short and only when the wording is itself part of the pattern.
- If evidence is thin, output a minimal pack and mark confidence as low.
- Include verification dialogues for persona and framework packs.
- Write expression DNA as construction rules, not mood descriptions.

---

## Public/Private Split

When the material contains private, proprietary, or emotionally sensitive content:

- create a public pack with abstracted structure
- keep a private appendix or private version with rawer detail
- never leak sensitive raw material into the public `SKILL.md`

### Shielded Mode Protocol

When user requests `shielded` output or the material is clearly sensitive:

1. **Classify each signal** as `public` (safe to share) or `private` (personal/proprietary)
2. **Generate two outputs:**
   - `{slug}/` — public pack with abstracted patterns, no raw personal data
   - `{slug}_private/` — full pack with all detail, marked "DO NOT DISTRIBUTE"
3. **Verify separation:** scan the public pack for any leaked private signals
4. **Private backup format:**

```markdown
# {name} Private Knowledge Backup

> Generated: {timestamp}
> Source files: {list}
> This file contains private knowledge. Do not distribute.

## Core Experience (removed from public version)
{extracted private patterns with full context}

## Judgment Heuristics (removed from public version)
{decision logic too specific to share}

## Network & Context (removed from public version)
{relationship and organizational knowledge}

## Raw Signals
{unprocessed observations that didn't make it into the pack}
```

---

## Mixed Targets

Use `hybrid` only when the use case truly demands it. Common combinations:

- `persona + framework`: a public thinker whose style and reasoning both matter
- `persona + memory`: a person whose shared history is part of the output
- `system + workflow`: a team or product operating model
- `framework + style`: a book, creator, or brand whose ideas and form are inseparable

Choose one dominant archetype, then pull in the smallest necessary file set from the second archetype.

---

## Sparse Or Noisy Inputs

- Do not hallucinate hidden structure.
- Prefer a thin but honest pack over a rich fake pack.
- Say which missing sources would most improve the distillation.
- If the user only gives impressions, treat them as low-confidence hints until corroborated.
- When materials are insufficient, output a `brief` instead of forcing a full `pack`.

---

## Updating Existing Packs

When the user provides new materials for an existing pack:

1. Read the current pack files first.
2. Preserve the current purpose unless the user changes it.
3. Build a delta signal ledger from the new materials only.
4. Merge new evidence into the smallest affected files instead of rewriting everything.
5. Promote a claim from tentative to stable only when new evidence justifies it.
6. If a new source conflicts with the current pack, record the tension instead of silently overwriting it.
7. Update `meta.json` with new sources and timestamp.
8. Show the user what changed before finalizing.

---

## Distillation From Live Research

When the target is a public figure, method, or system with abundant online sources:

1. Use `WebSearch` to find primary sources (speeches, interviews, writings, official docs)
2. Use `WebFetch` to extract content from key URLs
3. Prioritize first-party material over commentary
4. Cross-reference at least 3 independent sources before encoding a pattern as stable
5. Note the research date in `meta.json` — online information has a shelf life
6. For living targets, mark any pattern that might change as `current as of {date}`

---

## Resources

- [references/distillation-taxonomy.md](references/distillation-taxonomy.md): choose the archetype
- [references/extraction-framework.md](references/extraction-framework.md): turn materials into reusable structure
- [references/output-blueprints.md](references/output-blueprints.md): choose file sets and section skeletons
- [references/quality-rubric.md](references/quality-rubric.md): validate the finished pack
- [scripts/init_distill_pack.py](scripts/init_distill_pack.py): scaffold a new distill pack

