Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/lee-w/maigo/crystallizegit clone --depth 1 https://github.com/Lee-W/maigoWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00072 | $0.03531 |
| Opus 5 | $0.00036 | $0.01766 |
| Sonnet 5 | $0.00014 | $0.00706 |
| Haiku 4.5 | $0.00007 | $0.00353 |
Grade B, and why
crystallize scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
讀 cross-project index 全文,再 `cat ~/.claude/projects/<current-project>/memory/MEMORY.md` How it starts
The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/maigo:crystallize
🌙 Doloris:「請讓散落的記憶在今夜結晶;往後的路,不必再由偶然照亮。」
記憶層是扁平、relevance-ranked、capped 10 筆的事實儲存(見
skills/memory-loading)。
但有些條目其實不是「一次性事實」,而是反覆出現的慣例 / workflow / 規則——
塞在 memory 裡每次只被當事實載入,相關條目一多還會被擠出前 10 筆。
crystallize 把這類條目「畢業」成常駐 skill:trigger 命中就一定在 context、 結構化、可被 command / agent 直接引用。這是 maigo 知識成熟度階梯往上爬一階的動作:
memory(單一事實,relevance-ranked、capped 10)
↓ 反覆出現、夠結構化、有明確 consumer ← crystallize 走這一步
skill(共用 convention / workflow,trigger 命中就常駐)
↓ 失敗該整個 turn 擋下
hook(機器強制)
分工:互動的「挑候選 → 逐筆 propose → 使用者拍板」由 orchestrator + 旁白主持
(這段需要對話 context,不下放);確認的畢業攢成一批,寫 skill + 驗證那段委派
🎀 愛音,照 /maigo:quick
的輕量模式(愛音實作 + 輕量 🟡 爽世 4 項 review + 顯式驗證)。
為什麼這樣切:挑候選 / 確認天生是 orchestrator 的活;但「寫 SKILL.md + shim + mkdocs + catalog 再跑 validator」是一個該被 review、被 verify 的 code change,不該 orchestrator 自己 偷雞。批次委派(不 per-entry spawn)是為了攤平冷啟動成本——一次 run 畢業幾條都只 spawn 愛音一次。
使用
/maigo:crystallize
(無參數——掃整個記憶層找畢業候選)
流程
1. 載入記憶層(全讀,不做 relevance 排序)
cat ~/.config/maigo/memory/MEMORY.md
讀 cross-project index 全文,再 cat ~/.claude/projects/<current-project>/memory/MEMORY.md
(若存在)讀 per-project index。
跟 skills/memory-loading
的差別:那個 skill 為「當前 task」按相關性取前 10 筆;crystallize 要掃全部,
因為畢業候選跟當前 task 無關。Read 每個 index 行指向的 entry 全文。
Fallback:記憶目錄 / index 不存在或為空 → 印「記憶層是空的,沒有可畢業的條目」,結束。
2. 挑畢業候選(criteria)
對每筆 entry 套一組準則,全中才是候選:形狀是 convention / workflow / 規則(非一次性事實)、
有明確 consumer、有反覆性 signal;額外強訊號與排除規則見
skills/maigo-self-check/references/skill-graduation.md「Step 2 — 挑畢業候選:criteria 細節」。
掃完印一段 ## 畢業候選,列出 N 個候選 + 每個的一句畢業理由。候選為 0 → 跳到步驟 7 的空結算。
3. 世界觀隔離 gate
每個候選 propose 前,先判斷它屬於哪個 plugin 的世界觀。
- maigo 記憶只能畢業進 maigo skill。 若候選描述的是 mujica(寫作 / 部落格審稿 / daily-plan 等)世界觀的慣例 → 不在此命令處理,標記「跳過(mujica 世界觀, 請在 mujica 端處理)」,不 propose。
- 共用底層(記憶層路徑、frontmatter schema)不算特定世界觀,可畢業進 maigo skill。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 202 lines · 72 tokens per session scan B 1a7ae26e8b6d
crystallize is a command published in the GitHub repository Lee-W/maigo (14 stars, last pushed 8d ago), licensed MIT. It adds 72 tokens to every session and 3,531 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.