skills-experimental/doctor/SKILL.md
Project diagnostics: installation type detection, dependency status, ripgrep check, multiple installations warning. Diagnose project environment and configuration issues. Use when [doctor] is needed.
npx skillsauth add bianhaifeng789-hue/openclaw-config 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.
诊断项目环境、安装类型、依赖状态,排查配置问题。
场景:
Claude Code 方案:DoctorDiagnostic.ts + 多检测项 OpenClaw 飞书适配:飞书卡片诊断报告
检测安装类型:
检测多个安装实例:
Warning: Multiple Claude Code installations detected:
• npm-global: /usr/local/bin/claude
• native: /usr/bin/claude
Recommendation: Remove duplicate installations
检测 ripgrep:
检测包管理器:
{
"config": {"wide_screen_mode": true},
"elements": [
{
"tag": "div",
"text": {
"tag": "lark_md",
"content": "**🏥 项目诊断报告**\n\n**安装类型**:npm-global ✅\n**版本**:v2026.4.10\n**路径**:/usr/local/bin/openclaw\n\n---\n\n**自动更新**:启用 ✅\n**更新权限**:有 ✅\n\n---\n\n**Ripgrep**:\n• 状态:正常 ✅\n• 模式:builtin\n\n---\n\n**警告**(1 个):\n\n⚠️ **多个安装实例**:\n• npm-global: /usr/local/bin/openclaw\n• local: ~/projects/openclaw\n\n**建议**:移除本地安装,保留全局安装\n\n---\n\n**总体状态**:✅ 正常(有警告)"
}
},
{
"tag": "action",
"actions": [
{
"tag": "button",
"text": {"tag": "plain_text", "content": "修复警告"},
"type": "primary",
"value": {"action": "fix_warnings"}
},
{
"tag": "button",
"text": {"tag": "plain_text", "content": "详细日志"},
"type": "default",
"value": {"action": "view_details"}
}
]
}
]
}
function detectInstallationType(): InstallationType {
// 检查 NODE_ENV
if (process.env.NODE_ENV === 'development') {
return 'development'
}
// 检查 bundled mode
if (isInBundledMode()) {
// 检测包管理器安装
if (detectHomebrew() || detectWinget()) {
return 'package-manager'
}
return 'native'
}
// 检查 npm 安装
const npmGlobal = which('npm')
if (npmGlobal) {
return 'npm-global'
}
return 'unknown'
}
async function checkRipgrep(): Promise<RipgrepStatus> {
// 检查系统 ripgrep
const systemRg = await which('rg')
if (systemRg) {
return { working: true, mode: 'system', systemPath: systemRg }
}
// 检查 builtin ripgrep
const builtinRg = path.join(__dirname, 'rg')
if (existsSync(builtinRg)) {
return { working: true, mode: 'builtin', systemPath: null }
}
return { working: false, mode: 'embedded', systemPath: null }
}
Doctor:
1. 检测所有诊断项
2. 收集警告和建议
3. 生成飞书卡片报告
// memory/doctor-state.json
{
"lastDiagnosis": {
"installationType": "npm-global",
"version": "v2026.4.10",
"warnings": [
{
"issue": "multiple_installations",
"fix": "Remove local installation"
}
],
"timestamp": "2026-04-11T23:00:00Z"
},
"stats": {
"diagnosesPerformed": 0,
"warningsFound": 0,
"warningsFixed": 0
}
}
| Claude Code | OpenClaw 飞书场景 | |-------------|------------------| | DoctorDiagnostic.ts | Skill 定义 | | getCurrentInstallationType | 同样检测 | | getRipgrepStatus | exec + which | | Terminal UI | 飞书卡片报告 | | /doctor 命令 | 飞书触发 |
此 Skill 在用户请求诊断或 setup check 时自动触发。
business
IAA 日报飞书输出能力。 支持把固定 CSV 模板一键转换成: - 中文运营结论 - 飞书卡片 JSON - 飞书发送载荷 Use when: - 需要把 IAA 日报直接发到飞书 - 需要从 CSV 一键生成运营日报
data-ai
IAA日报分析模型 功能: - 渠道日报自动分析 - 小时级+日级ROI联动判断 - 按地区输出加量/降量/停投建议 - 按产品类型输出阈值 - 自动识别利润区/观察区/止损区 Use when: - 分析每天投放数据 - 生成运营日报结论 - 判断是否加量/降量/停投 - 对比美加澳/日韩表现 Keywords: - 日报模型, 投放日报, 加量, 降量, 停投, ROI日报, 分地区分析
data-ai
IAA固定日报分析模板 功能: - 固定字段模板(可直接贴每天数据) - 自动输出总盘结论 - 自动输出美加澳/日韩结论 - 自动给出加量/降量/停投建议 - 适配文件修复/清理两类产品 Use when: - 需要固定日报格式 - 每天复盘渠道表现 - 给运营团队出统一结论 Keywords: - 固定模板, 日报模板, ROI模板, IAA日报, 运营模板
development
# HyperlinkPool Pattern Skill HyperlinkPool Pattern - HyperlinkPool class + strings array + stringMap + Index 0 no hyperlink + intern(hyperlink) + get(id) + undefined handling + 5-minute reset + OSC8 hyperlink interning。 ## 功能概述 从Claude Code的ink/screen.ts提取的HyperlinkPool模式,用于OpenClaw的OSC8超链接池管理。 ## 核心机制 ### HyperlinkPool Class ```typescript export class HyperlinkPool { private strings: string[] = [''] // Index 0 = no hyperlink private stringMap = new Map<string, number>() // strings