claw-advisor

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Claw Advisor

Claw Advisor

Answer OpenClaw questions, suggest optimal configuration, diagnose issues, and guide design decisions. Two backends:
clawdocs
CLI for documentation,
openclaw
CLI for live state inspection.
解答OpenClaw相关问题,推荐最优配置,诊断问题并指导设计决策。包含两个后端:用于文档查询的
clawdocs
CLI,以及用于实时状态检查的
openclaw
CLI。

Backends

后端

clawdocs (documentation — always available)

clawdocs(文档查询——始终可用)

CommandUse When
clawdocs fetch "<topic>" --no-header -q
Topic known, need full page content
clawdocs search "<query>" --slugs-only
Need to find relevant doc slugs
clawdocs get <slug> --no-header -q
Exact slug known (e.g.,
channels/telegram
)
clawdocs list --prefix <section>/
Need to enumerate a doc section
命令使用场景
clawdocs fetch "<topic>" --no-header -q
已知主题,需要完整页面内容
clawdocs search "<query>" --slugs-only
需要查找相关文档的slug
clawdocs get <slug> --no-header -q
已知确切slug(例如:
channels/telegram
clawdocs list --prefix <section>/
需要枚举某个文档章节

openclaw (live state — may not be available)

openclaw(实时状态检查——可能不可用)

CommandUse When
openclaw status
Check channel health, recent sessions
openclaw doctor --non-interactive
Run health checks without prompts
openclaw config get <dot.path>
Read a specific config value
openclaw health
Check gateway health
If
openclaw
commands fail (not installed, gateway not running), proceed with docs-only advice. Do not treat this as an error.
命令使用场景
openclaw status
检查渠道健康状况、最近会话
openclaw doctor --non-interactive
无需提示即可运行健康检查
openclaw config get <dot.path>
读取特定配置值
openclaw health
检查网关健康状况
如果
openclaw
命令执行失败(未安装、网关未运行),仅基于文档提供建议即可,无需将此视为错误。

Workflow

工作流程

Phase 1: Understand

阶段1:理解需求

Parse
$ARGUMENTS
or the user's conversational question. Classify into:
  • Focused — single topic, one doc likely sufficient ("how do I set up Telegram?")
  • Broad — cross-cutting, spans multiple doc areas ("remote access with Telegram and webhooks")
  • Troubleshooting — something is broken, need diagnostic + docs
  • Design — architectural decision, compare options and tradeoffs
If ambiguous, ask one clarifying question via AskUserQuestion. Do not over-interview — default to the most likely interpretation.
If the question involves the user's current setup, gather live state:
bash
openclaw status 2>/dev/null
openclaw doctor --non-interactive 2>/dev/null
Load topic routing to identify relevant doc sections:
@${CLAUDE_PLUGIN_ROOT}/skills/claw-advisor/references/topic-routing.md
Proceed when the question is classified and live state (if relevant) is gathered.
解析
$ARGUMENTS
或用户的对话式问题,将其分类为:
  • 聚焦型——单一主题,单个文档即可解答(例如:“如何设置Telegram?”)
  • 宽泛型——跨领域,涉及多个文档板块(例如:“通过Telegram和Webhooks实现远程访问”)
  • 故障排查型——功能异常,需要诊断+文档支持
  • 设计决策型——架构决策,需对比不同选项的利弊
若问题模糊,可通过AskUserQuestion提出一个澄清问题。不要过度询问——默认采用最可能的解读。
若问题涉及用户当前的设置,收集实时状态:
bash
openclaw status 2>/dev/null
openclaw doctor --non-interactive 2>/dev/null
加载主题路由以确定相关文档章节:
@${CLAUDE_PLUGIN_ROOT}/skills/claw-advisor/references/topic-routing.md
完成问题分类并收集到相关实时状态(若适用)后,进入下一阶段。

Phase 2: Research (Divergent)

阶段2:调研(发散)

Focused — single fetch, possibly one follow-up:
bash
clawdocs fetch "<topic>" --no-header -q
If the result doesn't fully answer the question, search for adjacent docs:
bash
clawdocs search "<refined query>" --slugs-only
Then fetch the best 1-2 additional slugs via
clawdocs get
.
Broad — identify 2-4 relevant topic areas from topic-routing.md. Spawn parallel subagents, one per area:
Task(subagent_type="general-purpose", prompt="Run `clawdocs fetch <topic> --no-header -q` via Bash and summarize: key config options, requirements, gotchas, and exact CLI commands for: <specific aspect>")
Run up to 4 subagents in parallel. Each returns a focused summary. Reconvene results in Phase 3.
Troubleshooting — always consult three sources:
  1. Domain-specific doc:
    clawdocs fetch "<domain>" --no-header -q
  2. Domain troubleshooting:
    clawdocs get "<domain>/troubleshooting" --no-header -q
  3. General troubleshooting:
    clawdocs get "help/troubleshooting" --no-header -q
Cross-reference with
openclaw doctor --non-interactive
output if available. If doctor reports fixable issues, surface the exact fix command (
openclaw doctor --fix
).
Design — for each option, fetch the primary doc page and any comparison or overview page (e.g.,
providers/index
). Identify: requirements, limitations, and config complexity. Stop when each option has enough data to compare on the same dimensions.
If official docs don't cover the issue, use WebSearch for community solutions or GitHub issues as a fallback.
Proceed when all relevant docs are fetched and summarized.
聚焦型问题——单次获取,可能需要一次后续查询:
bash
clawdocs fetch "<topic>" --no-header -q
若结果无法完全解答问题,搜索相关文档:
bash
clawdocs search "<refined query>" --slugs-only
然后通过
clawdocs get
获取最佳的1-2个额外slug对应的文档。
宽泛型问题——从topic-routing.md中确定2-4个相关主题领域,为每个领域启动并行子Agent:
Task(subagent_type="general-purpose", prompt="Run `clawdocs fetch <topic> --no-header -q` via Bash and summarize: key config options, requirements, gotchas, and exact CLI commands for: <specific aspect>")
最多并行运行4个子Agent,每个返回聚焦的总结内容。在阶段3汇总结果。
故障排查型问题——始终参考三个来源:
  1. 领域特定文档:
    clawdocs fetch "<domain>" --no-header -q
  2. 领域故障排查文档:
    clawdocs get "<domain>/troubleshooting" --no-header -q
  3. 通用故障排查文档:
    clawdocs get "help/troubleshooting" --no-header -q
若有
openclaw doctor --non-interactive
的输出,进行交叉参考。如果doctor报告可修复的问题,给出确切的修复命令(
openclaw doctor --fix
)。
设计决策型问题——针对每个选项,获取主文档页面以及任何对比或概览页面(例如:
providers/index
)。确定:需求、限制条件和配置复杂度。当每个选项都有足够数据进行同维度对比时停止。
若官方文档未覆盖该问题,可使用WebSearch查找社区解决方案或GitHub问题作为备选方案。
获取并总结所有相关文档后,进入下一阶段。

Phase 3: Synthesize (Convergent)

阶段3:整合(收敛)

Combine all research into a structured response:
  1. Direct answer — answer the question concisely first
  2. Configuration — exact config keys (full dot-paths for
    openclaw config get/set
    ), values, and CLI commands. Use code blocks.
  3. Context — why this configuration is recommended, what tradeoffs exist
  4. Gotchas — known issues, common mistakes, prerequisites surfaced by the docs
  5. Sources — list doc slugs consulted so the user can dive deeper:
    clawdocs get <slug>
If docs and live state conflict, note the discrepancy and recommend
openclaw <cmd> --help
as ground truth.
Skill is complete when the structured response is delivered.
将所有调研内容整合成结构化的响应:
  1. 直接解答——首先简洁地回答问题
  2. 配置说明——给出确切的配置键(适用于
    openclaw config get/set
    的完整点路径)、值和CLI命令,使用代码块展示
  3. 背景信息——说明推荐此配置的原因,以及存在的利弊权衡
  4. 注意事项——文档中提到的已知问题、常见错误和前置条件
  5. 参考来源——列出查阅的文档slug,方便用户深入了解:
    clawdocs get <slug>
若文档与实时状态存在冲突,需注明差异,并推荐使用
openclaw <cmd> --help
作为权威参考。
交付结构化响应后,此Skill任务完成。

Constraints

约束条件

  • Never invent OpenClaw flags, config keys, or API endpoints — only cite fetched documentation
  • Use
    --no-header -q
    on all clawdocs calls to suppress chrome and stderr diagnostics
  • Extract relevant sections from long doc pages — full pages waste context tokens and bury the answer
  • Limit parallel subagents to 4 — more agents add latency without proportional information gain
  • When citing configuration, include the full dot-path usable with
    openclaw config get/set
  • If a question is outside OpenClaw's domain entirely, say so — hallucinating outside the knowledge base erodes trust in all answers
  • 不得虚构OpenClaw的标志、配置键或API端点——仅引用获取到的文档内容
  • 所有clawdocs调用均需使用
    --no-header -q
    参数,以隐藏页眉和stderr诊断信息
  • 从长文档页面中提取相关部分——完整页面会浪费上下文令牌,且会掩盖核心答案
  • 并行子Agent数量限制为4个——更多Agent会增加延迟,而信息增益不成正比
  • 引用配置时,需包含可用于
    openclaw config get/set
    的完整点路径
  • 若问题完全超出OpenClaw的领域范围,需明确说明——在知识库外虚构内容会削弱所有答案的可信度