Files
tech/.claude/commands/arno-util-lark-delegate.md
T
arno 911503d997 功能(ClaudeCode): 新增飞书联动工具链与会话管理增强
- 新增命令: lark-delegate(跨项目委派)、lark-inbox(收件箱)、lark-me(自发送)、stop(任务收尾)
- 新增工具: lark-consumer/consumer-ensure/inbox-check(飞书事件实时消费与会话隔离)、tmux-monitor(监控面板)
- runcc.sh 增加 --list/--kill/--send 操作模式与多会话自增命名
- CLAUDE.md 增加强制要求(汇报格式、收尾通知、上下文压缩)
2026-07-03 14:49:44 +08:00

71 lines
2.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: arno-util-lark-delegate
description: 以金鹏身份向 SZIS bot 或 DIT bot 发飞书消息指派任务。目标 bot 侧的 Claude Code 通过 lark-consumer 实时收到并自动执行。当用户要让另一个项目的 CC 干活、跨项目委派、给 szis/dit 下任务时使用。触发词:委派、delegate、让szis、让dit、给szis发、给dit发、跨项目指派。
argument-hint: '<szis|dit> <任务指令>'
allowed-tools: Bash
---
# arno-util-lark-delegate
以金鹏(user)身份向 SZIS 或 DIT bot 的 P2P 会话发消息指派任务。目标 bot 侧的 Claude Codelark-consumer 监听)会实时收到该消息,并自动 send-keys 到对端 CC 输入框执行。
## 用户输入
```
$ARGUMENTS
```
格式:`<目标> <任务指令>`,目标取第一个词,仅接受 `szis``dit`;其余整体作为任务指令文本。
## 执行流程
### 第1步:解析目标与任务
-`$ARGUMENTS` 取首词为 `TARGET`szis|dit),其余为 `TASK`
- `TARGET` 非 szis/dit 时,提示正确用法并退出,不要猜测发送。
### 第2步:按目标选择 profile 与 chat_id 发送
**向 SZIS bot 指派**szis profile,金鹏已在 szis 授权 user 身份):
```bash
lark-cli --profile szis im +messages-send --as user \
--chat-id oc_xxx \
--text "<TASK>"
```
**向 DIT bot 指派**dit profile,需金鹏已在 dit 授权 user 身份):
```bash
lark-cli --profile dit im +messages-send --as user \
--chat-id oc_xxx \
--text "<TASK>"
```
### 第3步:输出结果
展示 `ok``message_id``create_time`;失败时输出完整错误码与信息。
## 关键约束
- **必须 `--as user`(金鹏身份)**:目标 bot 的 consumer sender 白名单是金鹏;若用 bot 身份发,sender 是 app,会被对端 consumer 直接过滤,任务不会被执行。
- **profile 与目标一一对应**:向 SZIS 发用 `--profile szis`,向 DIT 发用 `--profile dit`。open_id 与 chat_id 按 app 隔离,跨用会报 `99992361 open_id cross app`
- **写操作可见性**:发出的消息会真实进入对端项目的 Claude Code 并执行,指令内容需明确、自洽、可独立理解(对端没有本轮上下文)。
## 固定参数
| 目标 | profile | P2P chat_id | 对端 Claude Code |
|------|---------|-------------|------------------|
| szis | szis | oc_xxx | arno/szistmux ds-ds |
| dit | dit | oc_xxx | allmed/dit |
## 示例
```
# 让 SZIS 整理本周对话捕捉
/arno-util-lark-delegate szis 整理 01-输入/对话捕捉.md 本周新增条目,归类到对应清单
# 让 DIT 更新项目推进报告
/arno-util-lark-delegate dit 用 arno-prj-upd 更新项目推进报告与项目推进分析判断
```