plugins/feishu-channel/skills/feishu-channel-doctor/SKILL.md
诊断飞书频道健康状态 — 排查多进程冲突、WebSocket 连接问题、日志分析。当用户报告"没有回复""消息丢失""连接异常"或想查看飞书频道运行状态时使用。
npx skillsauth add pangcheng1849/g-claude-code-plugins feishu-channel-doctorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
诊断飞书 MCP channel 的运行状态。只读取本地文件和进程信息,不调用飞书 API。
传入参数:$ARGUMENTS
无参数或 status — 运行完整诊断(见下方)。
ps aux | grep 'bun.*server.ts' | grep -v grep
列出所有 feishu server 进程。正常情况下只有 1 个。
如果有多个:
ps -p <pid> -o pid,ppid,command 查看每个进程的父进程claude 说明是某个 Claude Code 会话启动的修复建议:关闭旧的 Claude Code 窗口,或手动 kill 旧进程。
读取 ~/.claude/channels/feishu/logs/latest(软链接,指向当前会话日志)。如果 latest 不存在,回退查找 logs/ 目录下最新的 .log 文件。日志按会话隔离,每次服务器启动创建新文件,最多保留 10 个。
分析当前会话日志最近 100 行:
WebSocket connecting / WebSocket start failed 等关键词,判断 WS 是否成功建立message from 条目,显示最后收到消息的时间gate: dropped / gate: pairing / gate: delivering,判断是否有消息被拦截sandbox-bash: BLOCK / sandbox-file: BLOCK,显示被沙盒拦截的操作ERROR / failed / error 关键词,摘要显示最近的错误输出示例:
连接:✅ WebSocket 已连接(进程 PID 9496)
最近消息:3 分钟前收到(ou_xxx in oc_xxx)
Gate 统计:今日 12 条投递,0 条拦截
错误:无
读取 ~/.claude/channels/feishu/access.json:
/feishu-channel-access pair <code> 批准根据以上信息给出结论:
| 症状 | 原因 | 修复 |
|------|------|------|
| 消息发出但无回复 | 多个 bun 进程抢 WS | kill 旧进程,关闭多余 Claude 窗口 |
| gate: dropped | 发送者不在白名单 | /feishu-channel-access pair <code> 或 /feishu-channel-access allow <id> |
| WebSocket start failed | 凭证错误或网络问题 | /feishu-channel-configure 检查凭证 |
| 日志文件不存在 | 服务器版本不支持文件日志 | 重启 Claude Code 后再试 |
| 消息延迟高 | 正常,WS 长连接偶有延迟 | 无需处理 |
development
Design failing tests for complex features using Independent Evaluation — dispatches a context-free agent that sees only the requirement spec and code paths (not the implementation approach), then returns executable failing tests. Use when starting TDD for a non-trivial feature, when the requirement is ambiguous enough that biased tests are a risk, or when the user asks for independent test design.
tools
Plan how to slice a non-trivial coding task across parallel subagents. Returns a dispatch plan (file assignments, dependencies, output-format contracts) — the main Agent then executes it with the Agent tool + `isolation: "worktree"`. Invoke only when work justifies multi-agent overhead: (a) greenfield 0→1 across multiple independent modules, (b) change touches ≥3 modules, or (c) ≥5 files each with >50 lines of diff. Small changes write inline.
development
在 macOS + Chrome 上排查公网 IPv4/IPv6 出口、国家/地区、ASN/组织、DNS、默认路由、utun 状态,以及浏览器侧 Server Response 与 WebRTC 暴露情况。适用于用户要求检查 IP、地区一致性、VPN/代理接管情况、IPv6 问题或浏览器网络暴露,并输出详细运维报告与复查链接。
tools
通过 Gemini CLI 将编码、审查、诊断、规划和结构化输出任务委派给独立的 Gemini 会话。使用场景包括 `gemini -p` 非交互执行、`gemini -r latest` 续接最近会话、`gemini -r "<session-id>"` 指定会话恢复,以及需要 `--output-format json` / `stream-json`、`--approval-mode plan` 只读审查、`--sandbox` 隔离执行,或 `--worktree` 在独立 git worktree 中跑任务的 scripted / CI 调用。