Develop project from group chat — by Claude Code
接 AI 进群里开发项目 — 飞书(Lark)/ Slack
IM group → Monitor → Intent → Claude acts → Chat reply
one plugin, any project, zero backend.
Problem — Team members want to query and trigger project actions from the group chat ("what's the progress?" / "run tests" / "deploy staging" / "why did build fail?") without switching to terminals, dashboards, or ticket systems. Existing chat bots need bespoke backends per project and rarely integrate with an AI coding agent.
Solution — CC-BOT is a Claude Code plugin that listens to IM group messages, routes natural-language intents to per-project actions (you define them), runs them through Claude, and replies back. One plugin, any number of projects — each project's own profile.intents dict (intent → action description).
问题 —— 团队希望在群里就能查询和触发项目操作(「进度怎么样?」「跑测试」「部署灰度」「构建为什么失败?」),而不用切到终端 / 仪表盘 / 工单系统。现有聊天机器人通常需要为每个项目定制后端,且很少与 AI 编程助手打通。
方案 —— CC-BOT 是 Claude Code 插件:监听 IM 群消息,把自然语言意图路由到项目特定动作(由你定义),通过 Claude 执行,结果回到群里。一份插件、任意项目 —— 每个项目自己的 profile.intents 字典(意图 → 动作描述)。
Tip
Windows users: Use npm i -g @anthropic-ai/claude-code instead of the native installer to avoid Bun memory crashes (oven-sh/bun#25082). cc-bot's Monitor runs long-lived, amplifying Bun's memory pressure.
Windows 用户: 建议用 npm i -g @anthropic-ai/claude-code 代替原生安装器,规避 Bun 内存崩溃;cc-bot 的 Monitor 是长驻进程,会放大 Bun 的内存问题。
Note
Sibling project: SintBot, the standalone-daemon edition. cc-bot runs inside the Claude Code session you already have open, on that session's model. SintBot runs on its own: no one has to keep a terminal open, it drives headless Claude Code or Codex, and each group gets its own project, model and permissions (Feishu, Slack, WeCom). PolyForm Shield · npm i -g sintbot · sintbot.com
姊妹项目:SintBot(独立守护进程版)。 cc-bot 跑在你已经打开的 Claude Code 会话里,用的就是这个会话的模型;SintBot 自己常驻:不用有人守着终端,无头驱动 Claude Code 或 Codex,每个群各有项目、模型和权限(飞书、Slack、企业微信)。PolyForm Shield · npm i -g sintbot · sintbot.com
| Streaming Cards Lark CardKit v2 typewriter 三态 header(蓝→绿/红) 实时打字 + 耗时收尾 |
Interactive Setup guided wizard · auto-detect IDs profile schema 自动 backfill |
IM-agnostic Lark · Slack capability-based adapter |
Per-project Intents JSON 自定义动作 含 permission 分级 |
| Auto Redact token / 真名 / 飞书 ID / 邮箱 / 手机号 发群前强制 scrub |
Crash-resistant 3-layer defense PID lock · EPIPE · state heal |
Code-driven permission / intent / dispatch / redact 全代码化,prose 不膨胀 |
HUD-aware statusline shim · tees cc-hud 5h 额度快满自动预警群里 |
Inside Claude Code in your target project, run these in order:
/plugin marketplace add WaterTian/cc-bot
/plugin install cc-bot@cc-bot
/reload-plugins
/cc-bot:setup
-
Line 1 — register the plugin source (GitHub repo). The same files are also published to npm as
cc-botfor mirrors andnpm view; the marketplace remains the install path (there is nonpm i -gsetup) -
Line 2 — download to
~/.claude/plugins/cache/. CC will pop a scope selector; pick one:Option When to use Recommendation Install for you(user scope)You plan to use cc-bot across many projects ✅ Daily use Install for all collaborators(project scope)Team project, want teammates to auto-get cc-bot on clone ✅ Team projects Install for you, in this repo only(local scope)First-time try, don't pollute other projects ✅ Quick try -
Line 3 — hot-reload plugin list without restarting CC (new since CC 2.1.x; faster than
/exit+ re-open) -
Line 4 — enter the interactive setup wizard (lark-cli auto-install, OAuth login, chat picker via AskUserQuestion cards, config auto-fill)
Note
If /reload-plugins is unavailable or /cc-bot:* commands still don't appear, fall back to /exit and relaunch Claude Code.
v0.1.40+ 升级流程(推荐,逐条执行):
/cc-bot:stop # 若 bot 在跑
/plugin marketplace update cc-bot # 打开插件面板并刷新 marketplace,从它装的插件会一并更新到新版(看到新版关闭面板即可)
/reload-plugins # 热加载新版到当前会话
/cc-bot:start # 内含 self-heal:profile schema backfill + Bash 权限补齐,老用户无感升级
Important
CC 的 /plugin ... 是交互式命令(会打开 Plugin Marketplace 面板),不支持 shell && 串联,必须逐条等执行完再下一条。没有 /plugin update xxx 这个斜杠命令(未知子命令只会打开面板):若面板 Installed 页里 cc-bot 仍是旧版,就在那里点 Update now,或在终端跑 claude plugin update cc-bot@cc-bot 后重启 CC。想真正 1 步省心 → 用下面 > [!TIP] 块里的 autoUpdate opt-in。
/cc-bot:start 启动前会自动跑 profile-migrate.js apply(v0.1.29+)+ Bash 权限完备度补齐(v0.1.38+ 同 setup §9 逻辑),都是幂等纯加法:无字段缺 / 无权限缺 = 静默;有补 = ℹ self-heal: 补全 N 个字段 + M 条权限 报告后正常启动。失败不阻塞 start。
完全省略了老的 /cc-bot:setup + /cc-bot:doctor 中间两步。
Tip
真正一键升级 — autoUpdate(可选 opt-in) (v0.1.41+)
首次运行 /cc-bot:setup 时 wizard 会用 AskUserQuestion 卡问 "Enable autoUpdate?",默认 No 保守;选 Yes 自动把以下片段 merge 进 ~/.claude/settings.json:
{
"extraKnownMarketplaces": {
"cc-bot": {
"source": { "source": "github", "repo": "WaterTian/cc-bot" },
"autoUpdate": true
}
}
}配上 /cc-bot:start 的 self-heal,升级不再需要打开插件面板:
- 新会话发出第一条消息后,CC 会在 10 分钟内自动把 cc-bot 拉到最新版并提示
Plugin updated: cc-bot · Run /reload-plugins to apply→ 跑/reload-plugins(不跑也行,下次重启 CC 就是新版) /cc-bot:start→ self-heal + 启动
后悔了想关 / 没装时想开 → 手工把 autoUpdate 改 true/false 即可,无需重跑 setup。
/cc-bot:setup # 显式跑 profile-migrate + Bash 权限注册 + hooks 注册
/cc-bot:doctor # 只读健康检查 — 版本漂移 / profile / 权限完备度 / lark-cli scope / agents.json schema
- lark-cli scope 漂移(v0.1.22+ 流式卡片要求
cardkit:card:write+cardkit:card:read)—— 升级 lark-cli 后必须lark-cli auth login --scope "cardkit:card:write cardkit:card:read"重新拿 token,否则 streaming card 调不动。/cc-bot:doctor会显式检查这两个 scope。 - Switching a project to Slack (v0.1.12+) — install the SDK (
npm i -g @slack/socket-mode @slack/web-api; cc-bot resolves it from npm's global directory, ornpm installit inside the plugin folder), setim.type: "slack"in.cc-bot/profiles/active.json(or delete that file), then re-run/cc-bot:setup— the wizard only shows the IM picker when the profile has noim.type. One project = one IM.
From source (development / contributors)
git clone https://github.com/WaterTian/cc-bot.gitIn your target project, launch Claude Code with the local plugin dir:
cd /your/project
claude --plugin-dir /absolute/path/to/cc-botThen /cc-bot:setup. Skips marketplace install — loads straight from the local repo. Ideal for iterating on cc-bot itself.
Setup prints a version banner (cc-bot v<X.Y.Z> setup — <project>), then runs through these steps — guided by AskUserQuestion cards, with IDs auto-detected wherever possible:
- Pick IM · 选 IM —
larkorslack. One project = one IM (switching needs profile rewrite). - Detect tooling · 检测工具 — lark: auto-install
lark-clivianpm i -g @larksuite/cli. slack:runtime/slack-send.js checkverifies@slack/socket-mode+@slack/web-apican be loaded (npm i -g @slack/socket-mode @slack/web-apiif missing — global installs are found automatically). - Authenticate · 认证 — lark: OAuth Device Flow login (with app-creation checklist). slack: paste
templates/slack-manifest.yamlinto App's "From a manifest" form, then pastexoxb-Bot +xapp-App-Level tokens (scopeconnections:write). - Pick target chat · 选目标群 — lark: list bot's chats via
AskUserQuestioncard or one-click create. slack: paste channel IDC0xxx; wizard probes + reminds/invite @cc-bot. - Auto-detect IDs · 自动探测 — lark:
bot_app_id/admin_open_idfromlark-cli auth list. slack:bot_user_idfromauth.test. Zero manual entry. One optional field stays empty: larkim.bot_open_id— leave it empty and any @-mention (including @bot) is ignored (conservative mode; plain messages still work); to make@botwork, have someone mention the bot once and copymentions[].id.open_idfromlark-cli im +chat-messages-listinto the profile (setup prints the exact command). - Write config · 写配置 —
.cc-bot/profiles/active.json(IM-branched fields) +state.json+.gitignore. Locale defaults:zh-CN(lark) /en-US(slack); override viaim.locale. - Register statusline shim · 注册 shim — tees stdin JSON to
hud-stdin.json(for bot's HUD intent, quota alert and stall alert) + cc-hud rendering if installed. 6b. Register hooks · 注册 hooks — merges three hook sets into the global~/.claude/settings.json(never overwrites other keys):UserPromptSubmit/Stop→main-busy.js(terminal-first lock),PreToolUse→todo-bridge.js(todo progress mirrored to the streaming card),PermissionRequest→permission-bridge.js(permission prompts to the group, inert untilpermission_bridge.enabled). Also asks once whether to enable marketplaceautoUpdate(default No). - Register permission set · 注册权限集 (v0.1.38+) — append IM-specific wildcards (
runtime/*.js· plugin-cacheRead/Edit/Write·lark-cli *·npm install -g @larksuite/cli*/@slack/*·curl api.github.com) to<project>/.claude/settings.local.json. Strictly additive + idempotent — never overwrites existing rules.
Every step is idempotent — rerun safely. Then /cc-bot:start — bot online in ≤ 5s.
Main session ── Monitor(persistent) ── node poll.js ── lark: every 60s IMAdapter.listRecentMessages() (default)
lark: `lark-cli event consume` long-connection push + 5min reconcile (im.transport='push', v0.1.49+)
slack: Socket Mode WebSocket push (event-driven)
├─ dedupe via state.last_processed_time + poll.emitted
└─ stdout: NEW_MSG|msg_id|sender|text|ts[|FLAGS=…][|CHAT=<chat_id>]
↓ Monitor → notification
main session → permission.js check → intent.js resolve
→ dispatch.js register(slot/tags/serial)
→ spawn worker subagent
↓
worker → streaming-card.js report(lark)
→ slack-send.js send-text(slack)
→ redact.js 自动脱敏(两路径强制)
| Polling or event push (lark) 60s HTTP polling default · opt-in long-connection push (quota-free, auto-fallback) |
Socket Mode push (slack) WebSocket event-driven mainBusy still emits |
3-layer defense PID lockfile · EPIPE self-kill state future-value heal |
Per-project isolation .cc-bot/ per project zero cross-contamination |
| 工具 | 用途 |
|---|---|
runtime/streaming-card.js |
Lark CardKit v2 流式卡片 driver — 单一 report 入口,CLI 内部按 profile + 内容形态自动选 卡片 / 文本 / 降级 reply,自动脱敏。v0.1.36+ state.lastContentHash sha1 dedup 跳过同 content 重复 patch |
runtime/streaming-card-policy.js |
v0.1.35+ canUseStreamingCard(profile) 单一事实源,被 streaming-card / dispatch / todo-bridge 共用,去重 3 处 inline im.type + enabled 判断漂移 |
runtime/atomic-write.js |
v0.1.36+ 原子写 helper(tmp + fsync + rename + cleanup)— 全 runtime 状态文件(agents.json / stream-*.json / poll.busy-held / profile / 等 8 处)crash-safe |
runtime/permission.js |
角色判定 + intent level 映射(public / admin / admin-confirm / group-rejected),含高危名字防御启发式 |
runtime/intent.js |
intent 解析:占位符替换(<project.root> / <paths.bot_temp_abs> 等)+ 动态可用清单(doc_progress 文件存在校验) |
runtime/redact.js |
文本脱敏(slack token / Bearer / JWT / app_secret=* / 飞书 cli_/ou_/om_ ID / 邮箱 / 手机号 / blocklist 真名)—— lark + slack 发群入口强制调 |
runtime/slack-send.js |
v0.1.12+ Slack Web API 跨平台 helper,规避 Win curl GBK 乱码 + token 暴露;自动 redact |
runtime/ack-detect.js |
短消息 ACK 语义判定(yes / continue / ok / thanks + 停止词否决)+ 推荐回复 |
runtime/dispatch.js |
agents.json 调度生命周期(evaluate / register / complete / sweep)— tags 冲突 + slot + 同 user 串行全代码化。v0.1.33+ register 同步预热流式卡片(首帧 6-10s → 1-2s);v0.1.35+ register 响应带 preheated:bool 让 SKILL.md 一行判要不要回群占位;v0.1.37+ sweep 子命令按 profile.dispatch.max_turn_time_mins(默认 0=不启用)回收超时 running + 释放 slot + agents.json version 字段 CAS 防 lost update |
runtime/profile-migrate.js |
版本化 profile schema migration — 升级时自动 backfill 历史新增字段,不覆盖用户已设值 |
runtime/quota-alert.js |
v0.1.47+ Claude 5h 额度预警 — 读 HUD 的 rate_limits.five_hour,跨 85 / 95 / 耗尽 三档各发群一条 ≤2 行提示(resets_at 当窗口键去重,窗口滚动自动清零 + 补发「已恢复」)。耗尽期群消息走 busy-held 暂存不 emit,恢复后补推。判定放 poll.js 是因为它是独立进程不吃额度,额度耗尽时唯一还能开口的组件。开关 / 阈值见 profile.quota_alert(默认开,85 / 95) |
runtime/permission-bridge.js |
v0.1.49+ CC PermissionRequest hook — 主会话弹「允许 / 拒绝」权限框时转发到群:notify(单向提示)或 approve(members.admin_open_ids 回「允许 」/「拒绝 」代答 CC,超时交回终端 = fail-closed)。默认关;远端只能本次允许、不写 always-allow;每次决策写 events.log 审计;管理员回复 id 写入 poll.emitted 不会被当新任务 |
runtime/stall-alert.js |
v0.1.50+ 主会话假死告警 — emit 后 heartbeat.stall_mins 内 HUD 心跳 / agents.json / 群内 bot 发言 三路本地信号都没动 → 发群「似乎卡住了」+ 终端 BOT_WARN,恢复补「已恢复」;默认关,零额外 API |
adapters/factory.js |
v0.1.49+ createAdapter(profile) 单一入口,poll.js / permission-bridge.js 共用字段校验 + 实例化 |
runtime/todo-bridge.js |
v0.1.32+ CC PreToolUse hook bridge — 主会话调 TodoWrite / TaskCreate / TaskUpdate 时自动 diff todos 变化 → spawn streaming-card.js 把进度(▸ 进行中 / ✓ 完成)推到当前 running 任务的卡片,worker 端零负担(hook 异步 detached 不阻塞主会话) |
设计原则:决策、转换、状态管理代码化,prose(SKILL.md / worker.md)只描述"调哪个命令、按返回 action 走",LLM 推理负担和文档膨胀双降。
| Command | What it does |
|---|---|
/cc-bot:setup |
First-run interactive wizard (idempotent, safe to re-run) |
/cc-bot:start · 开bot / start bot |
Start Monitor + send online notification to chat |
/cc-bot:stop · 关bot / stop bot |
Stop Monitor + send offline notification |
/cc-bot:new-profile <name> |
Create new profile from template |
/cc-bot:switch <name> |
Switch active profile (auto-stops running bot first) |
/cc-bot:doctor |
Read-only health check — version drift, profile validity, runtime state, zombie permissions, shim registration |
/cc-bot:poll-once |
One polling round (poll.js --once), driven by /loop — only for polling_mode = self-poll endpoints that cannot host Monitor |
Main session also accepts natural-language triggers (开bot / 关bot / switch to xxx).
Each project has its own .cc-bot/profiles/active.json. The intents dict maps natural-language intents to action descriptions Claude executes when the group triggers them. Typical examples (you pick the keys and describe the actions freely):
{
"intents": {
"deploy": "Run `bash scripts/deploy.sh production`, report stdout tail",
"run_tests": "Run `npm test`, report pass/fail counts + first failure trace",
"query_logs": "Use mcp__cloudbase__logs to fetch last 20 error logs, summarize",
"build_preview": "Run `npm run build:preview`, upload artifact to <paths.bot_temp_abs>, reply with link"
},
"intent_permissions": {
"deploy": "admin",
"drop_data": "admin-confirm"
}
}intent_permissions(v0.1.23+,可选)声明每个 intent 的权限级别:
public— 任何群成员可触发(默认)admin— 仅members.admin_open_ids白名单可执行admin-confirm— 即使 admin 也需口头确认一次(破坏性操作)group-rejected— 群里发一律拒(bot 开关类)
未声明的项目 intent,名字含 deploy / publish / release / drop_* / delete_* / reset_* / restart_* / prod* 等高危词时自动默认 admin(防 legacy profile 把生产操作意外公开),其他默认 public。
Works for any project type — Web / mini-program / Node service / Python data pipeline / mobile app. If you can script it, you can intent-route it.
- Claude Code — uses
Skill/Monitor/TaskStop/AskUserQuestiontools - For lark:
npm i -g @larksuite/cli+lark-cli auth login(setup wizard will guide this) - For slack:
npm i -g @slack/socket-mode @slack/web-api(cc-bot finds global installs; ornpm installthem inside the plugin folder) + create an App at api.slack.com/apps via thetemplates/slack-manifest.yaml(setup wizard will guide token paste-in) - Shell — Windows: Git Bash required (cmd.exe / PowerShell mangle special characters in argv); macOS / Linux: system bash works out of the box
- Optional: cc-hud — prettier status bar:
/plugin marketplace add WaterTian/cc-hudthen/plugin install cc-hud@cc-hud; cc-bot's statusline shim tees it automatically
| Component | Location | Distribution |
|---|---|---|
| SKILL · adapter · poll.js · commands · templates | ${CLAUDE_PLUGIN_ROOT}/ |
plugin version |
| Chat IDs · project root · members · intents | <project>/.cc-bot/profiles/active.json |
per-project (gitignored) |
| state · cache · pid · dedupe · bot_temp | <project>/.cc-bot/runtime/ + .cc-bot/bot_temp/ |
per-project (gitignored) |
One plugin, many projects in parallel — zero cross-contamination.
cc-bot ships with Lark + Slack. Adding WeCom / DingTalk / Discord / Telegram / etc:
- Add
adapters/<im>.jsextendingIMAdapter(seeadapters/base.js) — implementlistRecentMessages / sendText / sendImage / downloadResource / getUser / addReaction; for push-based IMs also implementstartListening / stopListening(seeadapters/slack.jsfor Socket Mode reference) - Add a branch in
adapters/factory.js(createAdapter) — poll.js and permission-bridge.js both instantiate through it; inruntime/poll.jspickIM_MODE = 'polling'(HTTP fetch loop) or'push'(WebSocket / callback) — push-mode messages must emit even during mainBusy (errors are permanent, no retry tick). Every normalized message must carrychatId - Set
im.typeinprofile.active.jsonto the new IM name; optionally extendDEFAULT_LOCALE_BY_IMinadapters/factory.js(resolveLocale) for system-message i18n - Add
skills/<im>-bot/SKILL.mdor extend existing one
One project can serve several groups (issue #24). Keep im.chat_id as the primary group and list the others in im.chat_ids:
"im": { "chat_id": "oc_primary…", "chat_ids": ["oc_second…", "oc_third…"] }| Behaviour | Multi-group rule |
|---|---|
| Polling | poll.js fetches every group each tick (≈1 billed call per group per tick); one group failing only logs `BOT_WARN |
| Cursors | one cursor per group in .cc-bot/runtime/poll.cursors.json, advanced by poll.js on emit. A single global cursor would drop a message from group B that was sent earlier than, but fetched after, a message from group A — exactly the silent loss reported in #24. New groups start from the global last_processed_time so history is not replayed |
| Envelope | every NEW_MSG ends with |CHAT=<chat_id>; the main session replies and does its fetch-before-reply check in that group. Single-group envelopes are unchanged |
Push (im.transport: "push" / Slack) |
one event stream, filtered by the configured set; lark events without a chat_id are dropped (fail-closed) and warned once; a Slack event without channel falls back to the primary group |
| Proactive messages | busy placeholder and stall alert go to the group that triggered them; quota alerts are broadcast to all groups; /cc-bot:start / stop notify every group; the permission bridge stays on the primary group |
| Upgrade safety | the array lives in the profile, not in a patched plugin file, so a plugin update can no longer silently turn the second group off; /cc-bot:doctor §2 validates the list |
Add the field, then /cc-bot:stop + /cc-bot:start. im.chat_ids: [] (the default) keeps the old single-group behaviour byte-for-byte.
Feishu's free tier meters tenant-wide API calls (1M / month, shared by every self-built app). Polling bills ≥1 call per tick even when nobody talks; event subscriptions are not metered.
im.transport |
How messages arrive | Idle cost | When to use |
|---|---|---|---|
"" / "polling" (default) |
lark-cli im +chat-messages-list every polling_interval_ms (60s) |
≈1440 calls/day | Works everywhere, including behind VPN proxies |
"push" |
lark-cli event consume im.message.receive_v1 long connection, real-time, plus a push_reconcile_interval_ms (5min) catch-up poll |
≈288 calls/day | Lower quota + lower latency; one event bus per app globally |
Enable: set im.transport: "push" in .cc-bot/profiles/active.json, then /cc-bot:stop + /cc-bot:start. If the long connection cannot start (another host already holds this app's event bus, missing scope, not logged in) or drops for good, poll.js falls back to polling automatically and prints BOT_INFO|poll.js|push-fallback|<reason> — service never stops. /cc-bot:doctor §3.6 shows which transport is live.
Note
Feishu allows one event bus per app. If the same bot app runs cc-bot on several machines, only one of them may use push; the others stay on polling (the conflict is detected and reported, not silently split).
When the main session hits a tool that is not in the allow list, Claude Code shows an Allow / Deny dialog and waits for someone at the terminal. With a remote team that means the bot just goes quiet. The permission bridge is a CC PermissionRequest hook (runtime/permission-bridge.js, registered by /cc-bot:setup) that forwards the prompt to the chat:
"permission_bridge": { "enabled": true, "mode": "approve", "wait_secs": 90 }mode |
Behaviour |
|---|---|
notify |
One-way: posts 🔐 需要授权 #ab12 · 工具 · 内容, the terminal dialog still decides |
approve |
Two-way: an admin (members.admin_open_ids) replies 允许 ab12 / 拒绝 ab12 (or allow / deny) and the hook answers CC; no reply within wait_secs → hands back to the terminal (fail-closed). Generic acks (ok / yes / 1 / 好) only count when the #id is included, so a casual "ok" to a colleague never approves a tool call |
Guard rails: default off; only admins are honoured; remote approval is this call only (never writes an always-allow rule); every decision is audited in .cc-bot/runtime/events.log; the prompt text is redacted before posting (unknown / MCP tools show only whitelisted fields); the admin's reply is consumed by the hook and recognised by poll.js itself, so it is never treated as a new task even in push mode. With multiple groups the bridge uses the primary im.chat_id only. Live test without CC (it really posts one prompt to the group and waits for a reply): node <plugin>/runtime/permission-bridge.js probe --project <root> --mode approve --wait 60.
/cc-bot:doctor and events.log are passive: when the main session hangs, nobody is at the terminal to run them, and the group only sees a bot that stopped talking (issue #4). The stall alert lives in poll.js, a separate process that keeps running when the main session does not:
"heartbeat": { "stall_mins": 10, "notify_recovered": true }After poll.js hands a group message to the main session it watches three local signals: the statusline heartbeat (hud-stdin.json mtime), the dispatch ledger (agents.json mtime) and the bot's own replies in the chat. If none of them moves for stall_mins, it posts ⚠️ 主会话似乎卡住了:N 分钟前收到的群消息还没被处理… to the group, prints BOT_WARN|poll.js|stall-suspected in the terminal and logs it; once the session moves again it posts ✅ 主会话已恢复响应. Zero extra API calls. Off by default (stall_mins: 0); silent while a terminal user holds the main-busy lock (the busy placeholder already covers that); re-reminds at most every 30 min; needs the statusline shim (/cc-bot:setup installs it, doctor §3.8 / §5 check it).
两层防御:
① Runtime auto-redact(v0.1.24+) — runtime/redact.js 在所有发群路径(streaming-card.js report / slack-send.js send-text)入口自动过一遍 scrub:
| 敏感串类型 | 替换为 |
|---|---|
Slack token (xoxb-* / xapp-*) |
<redacted:slack_xoxb> / <redacted:slack_xapp> |
Bearer / JWT / app_secret=* / api_key=* |
<redacted:bearer> / <redacted:jwt> / <redacted:secret_kv> |
飞书 ID (cli_* / ou_* / om_*) |
<redacted:lark_app_id> / <redacted:lark_open_id> / <redacted:lark_msg_id> |
| 邮箱 / 中国手机号 | <redacted:email> / <redacted:phone_cn> |
profile.privacy.blocklist 自定义真名 |
<同事>(可改 blocklist_replace) |
worker 不需要手动调;所有携带用户内容的代码发群路径(worker 卡片 / 文本、slack-send、权限桥摘要)强制脱敏;额度 / 假死告警只发固定模板文案,不含用户内容。主会话 inline 用 lark-cli im +messages-reply 直接回的短消息由 LLM 按 SKILL 规则自律,不经代码脱敏。
② Pre-commit hook(开发本仓库时装) — 阻塞真实 IM ID / 黑名单真名 / api-secret 进 git commit。一次性 setup 见 CLAUDE.md §Git 提交隐私防护.
MIT License © Water
