claw-advisor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseClaw Advisor
Claw Advisor
Answer OpenClaw questions, suggest optimal configuration, diagnose issues, and guide design decisions. Two backends: CLI for documentation, CLI for live state inspection.
clawdocsopenclaw解答OpenClaw相关问题,推荐最优配置,诊断问题并指导设计决策。包含两个后端:用于文档查询的 CLI,以及用于实时状态检查的 CLI。
clawdocsopenclawBackends
后端
clawdocs (documentation — always available)
clawdocs(文档查询——始终可用)
| Command | Use When |
|---|---|
| Topic known, need full page content |
| Need to find relevant doc slugs |
| Exact slug known (e.g., |
| Need to enumerate a doc section |
| 命令 | 使用场景 |
|---|---|
| 已知主题,需要完整页面内容 |
| 需要查找相关文档的slug |
| 已知确切slug(例如: |
| 需要枚举某个文档章节 |
openclaw (live state — may not be available)
openclaw(实时状态检查——可能不可用)
| Command | Use When |
|---|---|
| Check channel health, recent sessions |
| Run health checks without prompts |
| Read a specific config value |
| Check gateway health |
If commands fail (not installed, gateway not running), proceed with docs-only advice. Do not treat this as an error.
openclaw| 命令 | 使用场景 |
|---|---|
| 检查渠道健康状况、最近会话 |
| 无需提示即可运行健康检查 |
| 读取特定配置值 |
| 检查网关健康状况 |
如果命令执行失败(未安装、网关未运行),仅基于文档提供建议即可,无需将此视为错误。
openclawWorkflow
工作流程
Phase 1: Understand
阶段1:理解需求
Parse or the user's conversational question. Classify into:
$ARGUMENTS- 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/nullLoad 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 -qIf the result doesn't fully answer the question, search for adjacent docs:
bash
clawdocs search "<refined query>" --slugs-onlyThen fetch the best 1-2 additional slugs via .
clawdocs getBroad — 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:
- Domain-specific doc:
clawdocs fetch "<domain>" --no-header -q - Domain troubleshooting:
clawdocs get "<domain>/troubleshooting" --no-header -q - General troubleshooting:
clawdocs get "help/troubleshooting" --no-header -q
Cross-reference with output if available. If doctor reports fixable issues, surface the exact fix command ().
openclaw doctor --non-interactiveopenclaw doctor --fixDesign — for each option, fetch the primary doc page and any comparison or overview page (e.g., ). Identify: requirements, limitations, and config complexity. Stop when each option has enough data to compare on the same dimensions.
providers/indexIf 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然后通过获取最佳的1-2个额外slug对应的文档。
clawdocs get宽泛型问题——从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汇总结果。
故障排查型问题——始终参考三个来源:
- 领域特定文档:
clawdocs fetch "<domain>" --no-header -q - 领域故障排查文档:
clawdocs get "<domain>/troubleshooting" --no-header -q - 通用故障排查文档:
clawdocs get "help/troubleshooting" --no-header -q
若有的输出,进行交叉参考。如果doctor报告可修复的问题,给出确切的修复命令()。
openclaw doctor --non-interactiveopenclaw doctor --fix设计决策型问题——针对每个选项,获取主文档页面以及任何对比或概览页面(例如:)。确定:需求、限制条件和配置复杂度。当每个选项都有足够数据进行同维度对比时停止。
providers/index若官方文档未覆盖该问题,可使用WebSearch查找社区解决方案或GitHub问题作为备选方案。
获取并总结所有相关文档后,进入下一阶段。
Phase 3: Synthesize (Convergent)
阶段3:整合(收敛)
Combine all research into a structured response:
- Direct answer — answer the question concisely first
- Configuration — exact config keys (full dot-paths for ), values, and CLI commands. Use code blocks.
openclaw config get/set - Context — why this configuration is recommended, what tradeoffs exist
- Gotchas — known issues, common mistakes, prerequisites surfaced by the docs
- 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 as ground truth.
openclaw <cmd> --helpSkill is complete when the structured response is delivered.
将所有调研内容整合成结构化的响应:
- 直接解答——首先简洁地回答问题
- 配置说明——给出确切的配置键(适用于的完整点路径)、值和CLI命令,使用代码块展示
openclaw config get/set - 背景信息——说明推荐此配置的原因,以及存在的利弊权衡
- 注意事项——文档中提到的已知问题、常见错误和前置条件
- 参考来源——列出查阅的文档slug,方便用户深入了解:
clawdocs get <slug>
若文档与实时状态存在冲突,需注明差异,并推荐使用作为权威参考。
openclaw <cmd> --help交付结构化响应后,此Skill任务完成。
Constraints
约束条件
- Never invent OpenClaw flags, config keys, or API endpoints — only cite fetched documentation
- Use on all clawdocs calls to suppress chrome and stderr diagnostics
--no-header -q - 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调用均需使用参数,以隐藏页眉和stderr诊断信息
--no-header -q - 从长文档页面中提取相关部分——完整页面会浪费上下文令牌,且会掩盖核心答案
- 并行子Agent数量限制为4个——更多Agent会增加延迟,而信息增益不成正比
- 引用配置时,需包含可用于的完整点路径
openclaw config get/set - 若问题完全超出OpenClaw的领域范围,需明确说明——在知识库外虚构内容会削弱所有答案的可信度