Vault Crystallize
This skill is the behavior authority for crystallize and distill in a knowledge vault. Vault protocols are data contracts:
AGENTS.md defines workspace boundaries, startup tiers, and write ownership.
global/agent-rules/handoff-protocol.md defines the Handoff.md format.
global/agent-rules/llm-wiki-protocol.md defines llm-wiki/ page schema, evidence, contradictions, integration, and health checks.
global/agent-rules/llm-wiki-format.md defines page templates when present.
Do not look for a ## Crystallize section in the protocol. If one exists in an old vault, prefer this skill for behavior and use the protocol only for data contracts.
Boundary
Dedicated triggers:
结晶, 结晶一下, crystallize -> checkpoint recovery state and stable long-term knowledge only when they changed.
蒸馏, distill -> turn a concrete source into cited, confidence-rated evidence entries.
Do not use this skill for neat-freak, deep audits, broad doc cleanup, memory sync, or a polished "结晶版" summary unless the user explicitly asks for that separate task. Bare 收尾, "wrap up", "整理一下", and "sync my notes" are not crystallize triggers.
Vault wrap-up rules (the vault's handoff protocol ## Write Timing) may propose crystallize when a non-trivial task ends; that proposal path lives in the protocol, while promotion behavior stays in this skill.
Agents that have not installed this skill are an installation/update concern, not a reason to duplicate crystallize behavior back into vault protocols. Do not create .claude/skills, .agents/skills, junctions, or per-agent install paths unless the user explicitly asks for installation work.
Native command wrappers live in commands/ and commands/<agent>/. Treat them as explicit invocation adapters and keep SKILL.md as the behavior authority when updating them. Do not add alias skills for crystallize or distill; the main skill metadata already handles those triggers.
Language Defaults
Write Handoff.md and llm-wiki/ content in Chinese by default. Keep stable technical identifiers in English, including code, commands, variable names, paths, API names, package names, and source titles when preserving the original title matters.
Use another language only when the user explicitly asks for it, when quoting source material, or when an existing project rule is more specific for that unit.
Command: crystallize
- Identify the current unit:
- Work under
projects/<name>/ -> that project.
- Work under
research/<name>/ -> that research domain, unless a submodule has its own Handoff.md.
- Vault governance or cross-vault rules -> root
Handoff.md and global/llm-wiki/.
- Read the current unit
Handoff.md before claiming current project state. If the unit is unclear, read root Handoff.md as the active-project index; if still unclear, ask one concise question.
- Decide whether anything actually changed:
- Recovery point changed -> update the current unit
Handoff.md.
- Stable conclusion another thread should know long-term -> update the matching existing
llm-wiki/ page.
- No recovery or long-term change -> write nothing and say why.
- Route each stable conclusion by reuse scope before writing:
- Ask: would this conclusion stay true and useful in a different project doing a similar task tomorrow? Yes -> write the general fact to the matching
global/llm-wiki/<topic>.md page and keep only project-specific application details plus a wikilink pointer in the project wiki. Unsure -> keep it project-level (default down).
- Rule of two: if this session used or rewrote a conclusion that lives in another project's wiki, promote it to a global topic page now. This rule fires only when the session actually read or explicitly cited that other project's wiki entry; it does not claim coverage of private agent memory, model recall, or sources never read this session — those cases route by the reuse-scope question above.
- Read before write: read the target topic page first and merge into an existing same-subject entry when one exists; never blind-append. Create a new topic page only when no existing topic fits, and update
## Triggers in global/llm-wiki/index.md in the same pass.
- Write only the right layer:
Handoff.md gets current status, active files, open questions, next actions, and resume context.
llm-wiki/ gets stable decisions, methods, pitfalls, memory, entity/concept, or evidence entries.
log.md is only for genuinely major knowledge operations, not routine crystallize.
- Tool-private memory, process replay, and agent caches never become vault authority.
- If
Handoff.md has ## Tracks, sweep all live tracks before finalizing. Preserve non-focus tracks unless the work explicitly closed them.
- Run the review checklist below before reporting completion.
Command: distill
Use only when the user explicitly says distill, 蒸馏, or asks to turn a concrete source into traced evidence.
Inputs:
- Source: a file path, pasted text, fetched URL content, note, PDF, or conversation excerpt.
- Target unit: infer from source path or current task; if ambiguous, ask one concise question.
- Destination: target unit
llm-wiki/evidence-log.md.
Workflow:
- Read the target unit
Handoff.md.
- Read
global/agent-rules/llm-wiki-protocol.md sections ## Evidence Log and ## Pending Contradictions.
- Split the source into numbered blocks
B1, B2, B3, ... in source order. Keep raw long sources in sources/ or notes/; put only pointers and concise evidence in llm-wiki/.
- Separate evidence from inference. Evidence claims cite
(src: Bn). Inferences name the source blocks they depend on.
- Assign confidence per conclusion:
high, medium, low, or unverified.
- If new evidence contradicts existing
llm-wiki/, follow ## Pending Contradictions; do not silently overwrite.
Evidence entry shape:
### YYYY-MM-DD · <source title>
- **来源:** [[relative/source-or-note]]
- **原文块:**
- B1: <short source locator or excerpt summary>
- B2: <short source locator or excerpt summary>
- **证据结论:**
- <claim> (src: B1) - confidence: <high|medium|low|unverified>
- **推断:**
- <inference> (from: B1+B2) - confidence: <high|medium|low|unverified>
- **待验证:** <specific verification need, or `无`>
Review Checklist
Handoff review:
- Exactly the required sections from
handoff-protocol.md; ## Tracks is optional only for parallel live tracks.
- If
## Tracks exists, exactly one track has [focus].
## Last Done has at most 4 entries, reverse chronological, each ending with a date.
## Next Actions has at most 3 concrete checkbox items.
## Active Files explains why each file is active now, not what the file is.
## Decisions contains a wikilink to [[llm-wiki/decisions]] or a decision block ID, or says None.
## Resume tells the next agent what to read and what mental model to keep.
LLM wiki review:
- New or significantly changed pages have frontmatter required by
llm-wiki-protocol.md.
- The page type matches the content: decision, method, pitfall, memory, evidence, entity, concept, glossary, or operation log.
- New pages are linked from the local
llm-wiki/index.md.
- Claims have confidence; evidence claims point to sources.
- Unresolved contradictions are recorded in the designated place instead of hidden.
- Cross-project reusable conclusions are routed to
global/llm-wiki/ topic pages; no fact is duplicated across layers (project keeps application details plus a pointer).
- Entry headings and field sets match the
llm-wiki-format.md template for the page type: claim pages (method / pitfall / topic) key by stable subject name, event pages (decisions / evidence / log) key by date.
- No aliased wikilinks appear inside Markdown tables.
Behavior review:
- Do not run or invoke
neat-freak unless explicitly requested.
- Do not broaden into doc cleanup, memory sync, or formatting churn.
- Do not manage agent-local skill installation unless explicitly requested.
- Do not write if nothing changed; reporting "nothing changed" is a valid outcome.
Validation
When files were created, moved, renamed, or the user is switching threads/agents, run the read-only health suite from the vault root:
pwsh -NoProfile -File global/tools/vault-health.ps1
pwsh -NoProfile -File global/tools/vault-meta.ps1 -Audit
pwsh -NoProfile -File global/tools/vault-links.ps1
For content-only edits, run the smallest relevant check and report what was skipped.
Common Failure Modes
| Failure |
Correction |
| "Other agents without the skill will not crystallize." |
Install/update distribution solves that. Do not duplicate behavior into protocols. |
Reads llm-wiki-protocol.md ## Crystallize. |
Stop; this skill owns crystallize behavior. Protocols define formats and health checks only. |
Treats 收尾 or "cleanup docs" as crystallize. |
Do not trigger unless dedicated words or explicit evidence intent appear. |
Writes process logs to llm-wiki/. |
Only stable conclusions belong there. |
| Appends to stale Handoff lists. |
Rewrite sliding windows within the documented caps. |
| Appends a new dated entry to a claim page (methods / pitfalls / topic) instead of merging. |
Claim pages key by subject: locate the existing entry, rewrite it in place, bump updated / 验证于. |
| Claims rule of two covers private memory or unread sources. |
Rule of two needs an other-project wiki entry actually read or explicitly cited this session; otherwise route by the reuse-scope question. |
1---2name: vault-crystallize3description: Use when working in an agent-managed knowledge vault and the user says "结晶", "结晶一下", "crystallize", "蒸馏", or "distill"; also use for explicit checkpointing of vault recovery state or source-to-evidence extraction. Do not use for generic cleanup, deep audit, doc sync, memory sync, or polished-summary requests unless those trigger words or explicit evidence intent appear.4---56# Vault Crystallize78This skill is the behavior authority for `crystallize` and `distill` in a knowledge vault. Vault protocols are data contracts:910- `AGENTS.md` defines workspace boundaries, startup tiers, and write ownership.11- `global/agent-rules/handoff-protocol.md` defines the `Handoff.md` format.12- `global/agent-rules/llm-wiki-protocol.md` defines `llm-wiki/` page schema, evidence, contradictions, integration, and health checks.13- `global/agent-rules/llm-wiki-format.md` defines page templates when present.1415Do not look for a `## Crystallize` section in the protocol. If one exists in an old vault, prefer this skill for behavior and use the protocol only for data contracts.1617## Boundary1819Dedicated triggers:2021- `结晶`, `结晶一下`, `crystallize` -> checkpoint recovery state and stable long-term knowledge only when they changed.22- `蒸馏`, `distill` -> turn a concrete source into cited, confidence-rated evidence entries.2324Do not use this skill for `neat-freak`, deep audits, broad doc cleanup, memory sync, or a polished "结晶版" summary unless the user explicitly asks for that separate task. Bare `收尾`, "wrap up", "整理一下", and "sync my notes" are not crystallize triggers.2526Vault wrap-up rules (the vault's handoff protocol `## Write Timing`) may propose crystallize when a non-trivial task ends; that proposal path lives in the protocol, while promotion behavior stays in this skill.2728Agents that have not installed this skill are an installation/update concern, not a reason to duplicate crystallize behavior back into vault protocols. Do not create `.claude/skills`, `.agents/skills`, junctions, or per-agent install paths unless the user explicitly asks for installation work.2930Native command wrappers live in `commands/` and `commands/<agent>/`. Treat them as explicit invocation adapters and keep `SKILL.md` as the behavior authority when updating them. Do not add alias skills for `crystallize` or `distill`; the main skill metadata already handles those triggers.3132## Language Defaults3334Write `Handoff.md` and `llm-wiki/` content in Chinese by default. Keep stable technical identifiers in English, including code, commands, variable names, paths, API names, package names, and source titles when preserving the original title matters.3536Use another language only when the user explicitly asks for it, when quoting source material, or when an existing project rule is more specific for that unit.3738## Command: crystallize39401. Identify the current unit:41 - Work under `projects/<name>/` -> that project.42 - Work under `research/<name>/` -> that research domain, unless a submodule has its own `Handoff.md`.43 - Vault governance or cross-vault rules -> root `Handoff.md` and `global/llm-wiki/`.442. Read the current unit `Handoff.md` before claiming current project state. If the unit is unclear, read root `Handoff.md` as the active-project index; if still unclear, ask one concise question.453. Decide whether anything actually changed:46 - Recovery point changed -> update the current unit `Handoff.md`.47 - Stable conclusion another thread should know long-term -> update the matching existing `llm-wiki/` page.48 - No recovery or long-term change -> write nothing and say why.494. Route each stable conclusion by reuse scope before writing:50 - Ask: would this conclusion stay true and useful in a different project doing a similar task tomorrow? Yes -> write the general fact to the matching `global/llm-wiki/<topic>.md` page and keep only project-specific application details plus a wikilink pointer in the project wiki. Unsure -> keep it project-level (default down).51 - Rule of two: if this session used or rewrote a conclusion that lives in another project's wiki, promote it to a global topic page now. This rule fires only when the session actually read or explicitly cited that other project's wiki entry; it does not claim coverage of private agent memory, model recall, or sources never read this session — those cases route by the reuse-scope question above.52 - Read before write: read the target topic page first and merge into an existing same-subject entry when one exists; never blind-append. Create a new topic page only when no existing topic fits, and update `## Triggers` in `global/llm-wiki/index.md` in the same pass.535. Write only the right layer:54 - `Handoff.md` gets current status, active files, open questions, next actions, and resume context.55 - `llm-wiki/` gets stable decisions, methods, pitfalls, memory, entity/concept, or evidence entries.56 - `log.md` is only for genuinely major knowledge operations, not routine crystallize.57 - Tool-private memory, process replay, and agent caches never become vault authority.586. If `Handoff.md` has `## Tracks`, sweep all live tracks before finalizing. Preserve non-focus tracks unless the work explicitly closed them.597. Run the review checklist below before reporting completion.6061## Command: distill6263Use only when the user explicitly says `distill`, `蒸馏`, or asks to turn a concrete source into traced evidence.6465Inputs:6667- Source: a file path, pasted text, fetched URL content, note, PDF, or conversation excerpt.68- Target unit: infer from source path or current task; if ambiguous, ask one concise question.69- Destination: target unit `llm-wiki/evidence-log.md`.7071Workflow:72731. Read the target unit `Handoff.md`.742. Read `global/agent-rules/llm-wiki-protocol.md` sections `## Evidence Log` and `## Pending Contradictions`.753. Split the source into numbered blocks `B1`, `B2`, `B3`, ... in source order. Keep raw long sources in `sources/` or `notes/`; put only pointers and concise evidence in `llm-wiki/`.764. Separate evidence from inference. Evidence claims cite `(src: Bn)`. Inferences name the source blocks they depend on.775. Assign confidence per conclusion: `high`, `medium`, `low`, or `unverified`.786. If new evidence contradicts existing `llm-wiki/`, follow `## Pending Contradictions`; do not silently overwrite.7980Evidence entry shape:8182```markdown83### YYYY-MM-DD · <source title>84- **来源:** [[relative/source-or-note]]85- **原文块:**86 - B1: <short source locator or excerpt summary>87 - B2: <short source locator or excerpt summary>88- **证据结论:**89 - <claim> (src: B1) - confidence: <high|medium|low|unverified>90- **推断:**91 - <inference> (from: B1+B2) - confidence: <high|medium|low|unverified>92- **待验证:** <specific verification need, or `无`>93```9495## Review Checklist9697Handoff review:9899- Exactly the required sections from `handoff-protocol.md`; `## Tracks` is optional only for parallel live tracks.100- If `## Tracks` exists, exactly one track has `[focus]`.101- `## Last Done` has at most 4 entries, reverse chronological, each ending with a date.102- `## Next Actions` has at most 3 concrete checkbox items.103- `## Active Files` explains why each file is active now, not what the file is.104- `## Decisions` contains a wikilink to `[[llm-wiki/decisions]]` or a decision block ID, or says `None`.105- `## Resume` tells the next agent what to read and what mental model to keep.106107LLM wiki review:108109- New or significantly changed pages have frontmatter required by `llm-wiki-protocol.md`.110- The page type matches the content: decision, method, pitfall, memory, evidence, entity, concept, glossary, or operation log.111- New pages are linked from the local `llm-wiki/index.md`.112- Claims have confidence; evidence claims point to sources.113- Unresolved contradictions are recorded in the designated place instead of hidden.114- Cross-project reusable conclusions are routed to `global/llm-wiki/` topic pages; no fact is duplicated across layers (project keeps application details plus a pointer).115- Entry headings and field sets match the `llm-wiki-format.md` template for the page type: claim pages (method / pitfall / topic) key by stable subject name, event pages (decisions / evidence / log) key by date.116- No aliased wikilinks appear inside Markdown tables.117118Behavior review:119120- Do not run or invoke `neat-freak` unless explicitly requested.121- Do not broaden into doc cleanup, memory sync, or formatting churn.122- Do not manage agent-local skill installation unless explicitly requested.123- Do not write if nothing changed; reporting "nothing changed" is a valid outcome.124125## Validation126127When files were created, moved, renamed, or the user is switching threads/agents, run the read-only health suite from the vault root:128129```powershell130pwsh -NoProfile -File global/tools/vault-health.ps1131pwsh -NoProfile -File global/tools/vault-meta.ps1 -Audit132pwsh -NoProfile -File global/tools/vault-links.ps1133```134135For content-only edits, run the smallest relevant check and report what was skipped.136137## Common Failure Modes138139| Failure | Correction |140|---|---|141| "Other agents without the skill will not crystallize." | Install/update distribution solves that. Do not duplicate behavior into protocols. |142| Reads `llm-wiki-protocol.md ## Crystallize`. | Stop; this skill owns crystallize behavior. Protocols define formats and health checks only. |143| Treats `收尾` or "cleanup docs" as crystallize. | Do not trigger unless dedicated words or explicit evidence intent appear. |144| Writes process logs to `llm-wiki/`. | Only stable conclusions belong there. |145| Appends to stale Handoff lists. | Rewrite sliding windows within the documented caps. |146| Appends a new dated entry to a claim page (methods / pitfalls / topic) instead of merging. | Claim pages key by subject: locate the existing entry, rewrite it in place, bump `updated` / `验证于`. |147| Claims rule of two covers private memory or unread sources. | Rule of two needs an other-project wiki entry actually read or explicitly cited this session; otherwise route by the reuse-scope question. |