← ClaudeAtlas

slack-to-speclisted

把某个 Slack 频道一段时间内的讨论收敛成一份"可落地需求"spec 文档。用户以 `/slack-to-spec <频道> <时间范围>` 调用时触发。读频道+决策密集的 thread+关联 canvas doc,抽取「需求点 / 决策(含撤销轨迹) / 待定问题」,按固定模板产出结构化、可追溯、能直接喂开发的 markdown。Use when the user wants to turn Slack discussion into a landable requirement/spec.
YuAICode/ai-skills · ★ 1 · AI & Automation · score 74
Install: claude install-skill YuAICode/ai-skills
# Slack → 可落地需求 (slack-to-spec) 把零散的 Slack 讨论收敛成开发能照着干、三个月后还能回溯"为啥这么定"的需求文档。 核心价值不是"总结",是**抓住决策(尤其被推翻/取代的方案)+ 拎出隐藏的开发需求 + 划清开工红线**。 ## 用法 ``` /slack-to-spec <频道> [时间范围] ``` - `<频道>`:频道 ID(如 `C0XXXXXXX`)或频道名(如 `#example-channel`)。给名字就先用 `slack_search_channels` 解析成 ID。 - `[时间范围]`(可选,缺省 `7d`): - 相对:`24h` / `3d` / `7d` / `2w`(从现在往前) - 绝对区间:`2026-06-01..2026-06-05` - 单个起点:`2026-06-01`(到现在) 示例: - `/slack-to-spec C0XXXXXXX 3d` - `/slack-to-spec #example-channel 2026-06-01..2026-06-05` ## 依赖工具 Slack MCP(按需 `ToolSearch` 加载):`slack_search_channels` / `slack_read_channel` / `slack_read_thread` / `slack_read_canvas`。 ## 流程 ### 1. 解析 args - 拆出 `<频道>` 和 `[时间范围]`。频道是名字 → `slack_search_channels` 拿 ID。 - 把时间范围算成 Unix epoch 的 `oldest` / `latest`(`slack_read_channel` 的入参是 epoch ts 字符串)。用 Bash `date` 算,例: ```bash # 相对 7d oldest=$(date -v-7d +%s) # macOS;Linux: date -d '7 days ago' +%s # 绝对区间 A..B oldest=$(date -j -f '%Y-%m-%d' 2026-06-01 +%s) # macOS latest=$(date -j -f '%Y-%m-%d' 2026-06-05 +%s) ``` 缺省 7d。latest 缺省 = now(不传)。 ### 2. 读频道 - `slack_read_channel(channel_id, oldest, latest, limit=100)`。窗口大就翻页(用返回的 cursor)。 - 扫一遍消息,标出 **决策密集 / 需求相关**的 thread(reply 多、@ 多人、带方案 doc、出现"定了/改成/取消/不做了/共识"等词)。忽略纯寒暄、抱团通知、机器人巡检告警。 ### 3. 读关键 thread - 对 step 2 选中的 thread 逐个 `slack_read_thread(channel_id, message_ts)`。 - 重点抓:谁拍的板、依据、有没有"先定 X 后又推翻改 Y"的**反转**(这是决策日志最值钱的部分)。 ### 4. 读关联 doc(很重要,别漏) - 消息里贴的 Slack doc(`application/vnd.slack-docs`,文件 ID 形如 `F0XXXXXXXXX`)**