一個 Claude Code Skill 的長期自我進化系統 (Skill Gardener)

原始來源與檔名:20260512_2026-04-28T092743+0800-一个Claude Code Skill 的长期自我进化系统!.md

來源:[[@binghe]] / X (Twitter) — 2026-04-23 原始檔名:2026-04-28T092743+0800-一个Claude Code Skill 的长期自我进化系统!.md


NAPKIN | 餐巾紙

餐巾紙公式

Skill Gardener System = Pairwise Preference Voting (Not Absolute Scoring) + Passive Usage Logs (Not Synthetic Prompts) + Arena Protocol (Survival of the fittest 6 candidates) + Style Anchors (Preserving user taste). Result = A Skill that organically evolves and self-corrects over time based on real usage.

這是一款專門用來「優化其他 Skill」的 Claude Code 工具:skill-gardener。它摒棄了傳統 LLM 不精準的絕對打分制,改用符合人類直覺的「偏好投票(A 還是 B 更好)」。系統會在後台默默記錄你日常真實使用的日誌作為訓練素材。優化時,它會一次生成 6 種不同方向的改進版本(精簡冗餘、增加邊界等),讓它們在「競技場」中兩兩對決,並透過與你預設的「風格錨點」比對,確保 Skill 在變聰明的同時,依然保留你獨特的審美與說話語氣。

一句話

這是一篇介紹進階 Prompt / Skill 工程架構的技術分享。作者開發了 skill-gardener,一個能讓 Claude Code Skill 自我迭代的元系統 (Meta-Skill)。其核心設計理念包含:將 LLM 評估從「分數」改為「二元分類檢測與成對比較」、強制使用真實的被動日誌代替人造測試集、實施多向變異與淘汰的演化機制,並首創「風格錨點 (Style Anchor)」來守護創作者的個人品味。這套系統讓 Skill 的成長不再是靠運氣微調,而是數據驅動的長期進化。

餐巾紙草圖

[ Skill Gardener Evolution Loop ]

1. Passive Logging: Records real usage of "Skill X" in `usage.jsonl`.
2. Mutation: Generates 6 diverse candidates for the new Prompt:
   [A. Concise] [B. More edge cases] [C. Workflow fixed] ...
3. Style Check: Does Candidate B match my "Style Anchor"? (If No -> Reject).
4. Arena Battle: Remaining candidates compete via LLM Pairwise Voting.
5. Survival: Winner becomes the new "Skill X" prompt.

ROUND 1: SKELETON | 骨架掃描

“這篇文章在說什麼”

ROUND 2: DISSECTION | 血肉解剖

“憑什麼這麼說”

核心論證鏈

  1. LLM 評估的相對性原理: 業界公認(如 Chatbot Arena 的 ELO 機制),LLM 在擔任裁判時,絕對分數的可靠性極低(容易受提示詞微小變動影響),但 Pairwise Comparison (成對比較) 的一致性極高。Skill Gardener 的底層邏輯完全符合當前模型評測的科學共識。
  2. 多樣性與選擇壓力的演化論: 如果只讓 LLM 進行單線程的「修改自己」,往往會陷入局部最佳解(Local Optima),甚至越改越差。一次生成 6 個變異分支並放入競技場廝殺,是將遺傳演算法 (Genetic Algorithm) 的思想應用在 Prompt 優化上。

關鍵證據

邊界條件

ROUND 3: SOUL | 靈魂提取

“還能怎么用”