Token导航 LogoToken导航

Agent Skill · 研究检索

oc-doctor(医生)

oc-doctor 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 OpenClaw 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

oc-doctor 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为操作浏览器;许可证为 MIT-0,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 10,650。

总安装 12,290周安装 507GitHub Stars 1下载 4,015核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.1.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:oc-doctor(医生)
来源仓库:https://github.com/bryant24hao/oc-doctor
安装命令:
openclaw skills install oc-doctor
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install oc-doctor

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

全面诊断 OpenClaw 安装的 11 项健康指标。识别配置错误、会话膨胀与安全漏洞问题。提供修复建议与性能调优方向指引。oc-doctor 属于研究检索类 Skill,可作为该场景下的辅助能力补充。安装命令:openclaw skills install oc-doctor。

建议在离线或测试环境先行运行避免影响生产会话。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install oc-doctor;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

oc-doctor 怎么安装?

在终端执行 openclaw skills install oc-doctor。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

oc-doctor 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

oc-doctor 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

oc-doctor 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

oc-doctor 用的人多吗?

公开数据是累计安装 12,290 次,近一周安装 507 次,下载 4,015 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

oc-doctor 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
oc-doctor

医生 · 本页

12,2901操作浏览器MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
oc-doctor
description
>
version
1.0.0
metadata
openclaw
requires
bins
emoji
stethoscope
homepage
https://github.com/bryant24hao/oc-doctor
os

OpenClaw Doctor

Comprehensive health check for OpenClaw installations. Outputs a structured diagnostic report with severity levels and actionable fixes.

Language

Respond in the same language the user used to invoke this skill. If invoked via slash command with no additional text, infer the preferred language from context: check recent conversation history, workspace file content (e.g., CJK content in AGENTS.md or cron job payloads), and system locale. Fall back to English only if no language signal is found.

Prerequisites

command -v openclaw >/dev/null || echo "CRITICAL: openclaw not found in PATH"
command -v jq >/dev/null || echo "CRITICAL: jq not found — install with: brew install jq (macOS) or apt install jq (Linux)"

Paths

Auto-detect all paths at runtime. Do NOT hardcode platform-specific locations.

OPENCLAW_HOME="${OPENCLAW_HOME:-$HOME/.openclaw}"
OPENCLAW_CONFIG="$OPENCLAW_HOME/openclaw.json"
OPENCLAW_DIST=""
if command -v openclaw &>/dev/null; then
  OPENCLAW_DIST="$(dirname "$(readlink -f "$(command -v openclaw)")")/../lib/node_modules/openclaw/dist"
  [ -d "$OPENCLAW_DIST" ] || OPENCLAW_DIST=""
fi
SESSIONS_DIR="$OPENCLAW_HOME/agents/main/sessions"
SESSIONS_INDEX="$SESSIONS_DIR/sessions.json"
MODELS_JSON="$OPENCLAW_HOME/agents/main/agent/models.json"
WORKSPACE_GLOB="$OPENCLAW_HOME/workspace-*"
LOGS_DIR="$OPENCLAW_HOME/logs"
BROWSER_CACHE="$OPENCLAW_HOME/browser"
CRON_DIR="$OPENCLAW_HOME/cron"

If any path doesn't exist, note it and skip that check section.

Diagnostic Sections

Run ALL sections below sequentially. For each finding, assign a severity:

  • CRITICAL — broken functionality, data loss risk
  • WARNING — suboptimal config, potential issues
  • INFO — informational, optimization opportunity

1. Installation & Version

Use the built-in status command as the primary data source:

openclaw status --all 2>&1
openclaw --version 2>/dev/null

Report: version, gateway running status, LaunchAgent status, channel health.

2. Config Consistency

Read $OPENCLAW_CONFIG and check:

  1. Default model validity: Is agents.defaults.model.primary a known model? Cross-check with agents.defaults.models entries.
  2. Fallback models: Are all models in agents.defaults.model.fallbacks defined in the models list?
  3. Legacy config files: Check if clawdbot.json or other legacy files exist in $OPENCLAW_HOME/.
  4. Backup file accumulation: Count *.bak* files in $OPENCLAW_HOME/. More than 2 is WARNING.
  5. Channel config:

- Telegram: Check requireMention setting per group. false = WARNING (bot responds to all messages). - Feishu: Check groupPolicy. "open" = WARNING (any group can interact).

3. Session Maintenance Config

Check openclaw.json for session.maintenance settings:

  1. Maintenance mode: Missing or "warn" = WARNING (stale sessions accumulate without cleanup). Should be "enforce".
  2. pruneAfter: Missing or > 30d = INFO. Recommended: "7d" to "14d".
  3. maxEntries: Missing or > 200 = INFO. Default is 500, reasonable personal value is 50-100.
  4. maxDiskBytes: Missing = INFO. Recommended: set a cap like "100mb".

4. Compaction Config

Check agents.defaults.compaction in openclaw.json:

  1. mode: Should be "safeguard" (default, safe). Note if missing.
  2. reserveTokensFloor: Missing = WARNING. Without this buffer, context can overflow before compaction triggers. Recommended: 20000.
  3. keepRecentTokens: Missing = INFO. Controls how much recent conversation is preserved verbatim during compaction. Recommended: 8000.

5. Model Alignment

Use the built-in sessions list, then cross-reference with config:

openclaw sessions 2>&1

Also read sessions.json programmatically to check:

  1. Session model drift: List any sessions whose model field differs from the configured default. Particularly check channel sessions (telegram:*, feishu:*).
  2. contextTokens vs model contextWindow: Compare each session's contextTokens against its model's actual contextWindow (from models.json or built-in registry). Mismatch = WARNING (e.g., 272k contextTokens on a 200k model can cause overflow).
  3. Forward-compat patches: Check if dist files have been locally patched by searching for non-standard constants (e.g. model IDs not in the official XHIGH_MODEL_REFS or custom resolveForwardCompatModel additions) in $OPENCLAW_DIST/*.js.
  4. Thinking config: Read the thinking config file (find via grep -rl "XHIGH_MODEL_REFS" $OPENCLAW_DIST/) and verify the current default model is included in XHIGH_MODEL_REFS if it should support xhigh thinking.
  5. models.json override: Read $MODELS_JSON and check if inline model definitions are consistent with openclaw.json.

6. Session Health

Use the built-in cleanup dry-run as primary data source:

openclaw sessions cleanup --dry-run --fix-missing 2>&1

Then supplement with filesystem checks:

  1. Orphan JSONL files: Files in directory but not referenced in sessions.json. Calculate total size.
  2. Zombie session entries: Entries in sessions.json pointing to non-existent JSONL files.
  3. Empty JSONL files: Referenced files that are 0 bytes.
  4. Deleted file accumulation: *.deleted.* files that can be cleaned up. Calculate total size.
  5. Cron session accumulation: Count sessions with :cron: in their key. Separate parent jobs from :run: sub-sessions. Large numbers (>20) indicate cleanup isn't working.

7. Cron Health

Read $CRON_DIR/jobs.json and check:

  1. Duplicate enabled jobs: Jobs with identical name + schedule + enabled: true. Flag as WARNING with dedup suggestion.
  2. Disabled job accumulation: Count enabled: false jobs. More than 10 = INFO (suggest cleanup if user confirms they're not needed).
  3. Tmp file accumulation: Count jobs.json.*.tmp files in $CRON_DIR. These are abandoned atomic-write artifacts. Any count > 0 with no process holding them open (lsof) = safe to delete.
  4. Cron runs directory: Check $CRON_DIR/runs/ for accumulated run logs. Count and total size.
  5. Stale enabled jobs: Enabled jobs whose state.lastRunAtMs is older than expected based on their schedule (e.g., a daily job that hasn't run in 3+ days).

8. Security Audit

Check openclaw.json for:

  1. Feishu groupPolicy: "open" means any Feishu group can interact = CRITICAL.
  2. Feishu/Telegram allowFrom: ["*"] means no restriction = WARNING.
  3. Telegram requireMention: false on groups = WARNING (bot responds to every message).
  4. Gateway auth mode: Read gateway.auth.mode from config. "token" is good, "none" = CRITICAL.
  5. Exposed secrets in non-gitignored files: Check if $OPENCLAW_HOME/ contains any files that might be accidentally synced (e.g., check for .git directory in $OPENCLAW_HOME/).
  6. API keys in models.json: Note if API keys are stored in plaintext in models.json (this is expected but worth noting).

9. Resource Usage

du -sh $OPENCLAW_HOME/browser/ 2>/dev/null    # Browser cache
du -sh $OPENCLAW_HOME/logs/ 2>/dev/null       # Logs
du -sh $SESSIONS_DIR/ 2>/dev/null             # Sessions
du -sh $OPENCLAW_HOME/media/ 2>/dev/null      # Media files
du -sh $OPENCLAW_HOME/memory/ 2>/dev/null     # Memory files
du -sh $CRON_DIR/ 2>/dev/null                 # Cron data
du -sh $OPENCLAW_HOME/ 2>/dev/null            # Total

# Log file sizes
ls -lhS $LOGS_DIR/ 2>/dev/null

# Large JSONL sessions (top 5)
ls -lhS $SESSIONS_DIR/*.jsonl 2>/dev/null | head -5

Flag:

  • Browser cache > 200MB = WARNING
  • Logs > 50MB = WARNING
  • Any single JSONL > 10MB = INFO
  • Total $OPENCLAW_HOME/ > 1GB = WARNING

10. Gateway & Process Health

Read gateway.port from openclaw.json to determine the correct port (do NOT hardcode).

# Check for stuck/zombie openclaw processes
ps aux | grep -E "openclaw-gateway|openclaw " | grep -v grep

# Check gateway port binding (use port from config)
lsof -i :<port> 2>/dev/null | head -5

# Check gateway error log for recent errors
tail -20 $LOGS_DIR/gateway.err.log 2>/dev/null

Flag:

  • Multiple gateway processes = CRITICAL
  • Gateway not listening on configured port = CRITICAL
  • Recent errors in gateway.err.log = WARNING (show last 5 errors)

11. System Instruction Health

Measures static system instruction token footprint. Complements Section 5 (runtime session pressure) — together they form the Context Budget picture.

Step A: Data Collection (deterministic script)

Locate and run the bundled collector script from the skill directory:

# Find the skill directory (works whether installed via skills.sh, clawhub, or manually)
SKILL_DIR="$(find ~/.claude/skills ~/.agents/skills -maxdepth 3 -name 'sysinstruction-check.sh' -path '*/oc-doctor/*' 2>/dev/null | head -1 | xargs dirname)"
bash "$SKILL_DIR/sysinstruction-check.sh"

The script auto-detects workspace directories and outputs structured JSON. See scripts/sysinstruction-check.sh for details.

Output schema:

{
  "workspace_files": [
    {"file": "workspace-name/FILE.md", "chars": 0, "lines": 0, "est_tokens": 0, "is_empty_template": false}
  ],
  "total_est_tokens": 0,
  "largest_file": "AGENTS.md",
  "empty_template_files": [],
  "tool_bloat_files": [],
  "tool_bloat_est_tokens": 0,
  "bootstrap_still_present": false,
  "context_window": 200000,
  "context_window_source": "models.json | default_fallback",
  "pct_of_context": "0.0"
}
Step B: LLM Analysis

Analyze the JSON output along these dimensions:

  1. Context budget ratio (complements Section 5's runtime check):

- pct_of_context < 2% = INFO healthy - 2-5% = INFO acceptable but worth reviewing - 5-10% = WARNING consider trimming - 10-15% = WARNING (strong) actively optimize - > 15% = CRITICAL only if paired with runtime truncation evidence - If context_window_source is "default_fallback", note that thresholds may be inaccurate

  1. Tool description bloat:

- tool_bloat_files non-empty = WARNING, list files and estimated token cost - These are auto-injected by OpenClaw (e.g., Feishu bitable tools) — check if all are necessary

  1. Reclaimable space (read empty_template_files and bootstrap_still_present):

- bootstrap_still_present = true = INFO, can be deleted after initial setup - empty_template_files non-empty = INFO, list files and estimated token savings

  1. Per-file analysis:

- Single file > 40% of total tokens = WARNING, consider splitting - Single file > 2% of context window = WARNING, review individually - AGENTS.md is typically the largest (memory/group-chat/heartbeat rules), but > 5000 tokens warrants review

  1. Benchmarks (dynamic, based on actual context window):
   Healthy:        < 2% of context_window
   Needs review:   2-5% of context_window
   Needs optimization: > 5% of context_window
  1. Cross-reference integrity:

- Scan the largest workspace file (typically AGENTS.md) for references to other .md filenames (e.g., HEARTBEAT.md, BOOTSTRAP.md, MEMORY.md). - For each referenced file: check if it exists in any workspace-*/ directory and whether it is an empty template. - Referenced but missing = WARNING — the agent has instructions that depend on a file that doesn't exist. Offer to generate a practical version based on the user's actual config (cron jobs, channels, heartbeat rules in AGENTS.md). - Referenced but empty template = WARNING — the file exists but has no real content, so the agent's instructions referencing it are ineffective. Offer to populate it with useful content or remove the dead reference.

Output (integrated into main report)

Add a System Instruction section to Findings:

### [SEVERITY] System Instruction Token Usage

| File | Lines | Chars | ~Tokens | % of Context |
|------|-------|-------|---------|--------------|
| AGENTS.md | N | N | N | N% |
| SOUL.md | N | N | N | N% |
| ... | ... | ... | ... | ... |
| **Total** | **N** | **N** | **N** | **N%** |

- Status: Healthy / Elevated / Needs Optimization
- Suggestions: (specific optimization actions, if any)

Output Format

Present results as a structured diagnostic report:

# OpenClaw Doctor Report

## Summary
- Version: x.x.x
- Gateway: running/stopped
- Overall Health: HEALTHY / NEEDS ATTENTION / CRITICAL

## Findings

### [SEVERITY] Finding Title
- Description: ...
- Impact: ...
- Fix: (specific command or config change)

(repeat for each finding)

## Quick Stats
| Metric | Value |
|---|---|
| Active sessions | N |
| Cron jobs (enabled/disabled) | N / N |
| Orphan files | N (size) |
| Browser cache | size |
| Total disk usage | size |

## Recommended Actions
1. (prioritized list of suggested fixes)

Interactive Mode

After presenting the report, ask the user (in their language):

"Would you like me to fix these issues? I can address them one by one, or batch-fix all WARNING-level and below. CRITICAL issues will be confirmed individually."

For fixes:

  • Orphan/deleted files: Offer to delete with size summary.
  • Model drift / contextTokens mismatch: Offer to align all sessions to default model and correct contextWindow.
  • Config issues: Show the specific config change needed, confirm before applying.
  • Cron dedup / tmp cleanup: Show what will be removed, confirm before applying.
  • Maintenance config: Suggest optimal values, confirm before applying.
  • Resource cleanup: Offer to clear browser cache, rotate logs.
  • Security issues: Show the config change and explain the tradeoff before applying.
  • System instruction bloat: Offer to archive BOOTSTRAP.md (rename to .bak), clean empty template files, flag tool description injection.
  • Referenced but missing/empty workspace files: Generate a practical version based on the user's actual config. For HEARTBEAT.md specifically, analyze cron jobs, channels, and heartbeat rules in AGENTS.md to produce a useful checklist (not an empty template).

Secret Redaction (MANDATORY)

When displaying config excerpts in the report, always redact sensitive values:

  • API keys / tokens: show only first 8 chars + ... (e.g., 8263689670:A...)
  • Passwords / secrets: show ***REDACTED***
  • Never include full botToken, appSecret, auth token, or API key values in the report output.

Security & Privacy

This skill operates locally and makes no network requests. However, diagnostic output becomes part of the LLM conversation context.

Files read (read-only unless user approves a fix):

  • $OPENCLAW_HOME/openclaw.json — main config
  • $OPENCLAW_HOME/agents/main/agent/models.json — model definitions
  • $OPENCLAW_HOME/agents/main/sessions/sessions.json — session index
  • $OPENCLAW_HOME/workspace-*/*.md — system instruction files
  • $OPENCLAW_HOME/cron/jobs.json — cron job definitions
  • $OPENCLAW_HOME/logs/gateway.err.log — recent gateway errors
  • $OPENCLAW_DIST/*.js — installed dist files (for patch detection)

Files modified (only with explicit user confirmation):

  • Session JSONL files (orphan cleanup)
  • Config JSON files (optimization)
  • Workspace .md files (BOOTSTRAP.md archival)
  • Cron tmp files (cleanup)

Environment variables read: OPENCLAW_HOME (optional override).

No secrets are transmitted or logged. The skill may display config excerpts in the diagnostic report shown to the user.

平台分布

OpenClaw

97%
按下载量换算3,895

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills