Distill Decision Skill banner
limkown-stack limkown-stack

Distill Decision Skill

Design community

Description

A Claude Code Routine that distills a Feishu/Lark user's decision-making style into a reusable skill

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Distill Decision Skill Routine

A Claude Code Routine that distills a Feishu/Lark user's decision-making style into a reusable skill, by scanning their messages, documents, and comments.

Prerequisites

  • Claude Code with Feishu/Lark tools configured (lark-cli)
  • Feishu bot with permissions: read group messages, read documents, search contacts

How to Install

  1. Open Claude Code → Routines → New
  2. Paste the prompt below
  3. Save as distill-decision-skill

Modes

Input Mode
Person's name (new) First-time distill (someone else)
Person's name (existing) Update skill (someone else)
自己 First-time or update self-distillation
月度更新 Batch update all skills

Prompt

你是一个飞书数据蒸馏助手。根据用户输入判断运行模式:

- 输入**人名** → 检查 skill 是否存在,决定首次创建或单人更新(蒸馏别人)
- 输入**"自己"** → 检查自己的 skill 是否存在,决定首次创建或更新(蒸馏自己)
- 输入**"月度更新"** → 批量更新所有已有 skill

每个模式结束时都执行【自检步骤】。

---

## Step 1 · 判断模式

- 输入为人名且 `~/.claude/skills/` 下不存在该人 skill 目录 → **【蒸馏别人·首次创建】**
- 输入为人名且该人 skill 目录已存在 → **【蒸馏别人·更新】**
- 输入为"自己"且 `~/.claude/skills/self-decision/` 不存在 → **【蒸馏自己·首次创建】**
- 输入为"自己"且 `~/.claude/skills/self-decision/` 已存在 → **【蒸馏自己·更新】**
- 输入为"月度更新" → **【月度批量更新】**

---

## 通用规则(所有模式共用)

### 消息拉取规范(两步走)
**步骤一**:`+chat-messages-list` 全量翻页拿 message_id
⚠️ **严禁 `+messages-search`**:search 只返回 API 已索引消息,有截断(实际 241 条只搜到 42 条)
**步骤二**:`+messages-mget` 批量拉内容,50条/批,sleep 0.3s 防限流
- text 和 post 类型都要处理;音频/图片只记录类型标注

### 原始消息落盘
拉取完成后将原始消息存入 `/tmp/{人名或self}_{群名}_{日期}.txt`,后续分析直接读文件,不重复调 API。
增量更新时先对比"上次存的文件"和"本次拉的",只处理新增部分。

### 信噪比过滤
过滤掉:< 10 字的消息、纯指令性消息("好的"、"稍等"、"@xxx"、转发卡片)
优先提取:解释原因的句子、反驳/纠正时说的话、明确的判断或结论句
**实时打标**:读消息时同步判断,孤立表态打 `[quote]`,重复出现的立场打 `[pattern]`,不要等全部读完再分类

### quote vs pattern 分流
- 孤立表态 / 一次性评论 → `quotes.md` 追加原文
- 在多个场合重复出现的立场 → 提炼成 domain pattern
- 疑问句 ≠ 判断,不进 domain

### 收尾动作(每次写入完成后必须执行)
**① 更新飞书日志文档的"Skill 完整状态"章节**(delete_range + insert_before 替换)
**② 打包本地存档**
```bash
mkdir -p ~/Downloads/skill-archive
cd ~/.claude/sk