ck-rag-skillRAGFlow知识库问答与操作指导。调用RAGFlow知识库API进行智能问答,并基于知识库返回结果提供agent操作建议。支持流式输出,耐心等待完整响应生成。当用户提出技术问题、故障排查、操作指导或需要知识库检索时触发此技能。适用于容器/Docker问题、系统运维、开发相关问题等场景。
Install via ClawdBot CLI:
clawdbot install chenkun-nuaa/ck-rag-skill此skill通过调用RAGFlow知识库API,为用户提供智能问答和操作指导。API使用流式输出(Stream)方式返回结果,需要耐心等待完整响应生成(通常5-10秒)。
判断用户的问题是否适合通过知识库查询:
使用scripts/query_ragflow.py脚本查询知识库:
标准查询(适合正常使用):
python3 /home/onestack/.openclaw/workspace/ragflow-kb/scripts/query_ragflow.py "用户的问题"
调试模式(查看详细信息):
python3 /home/onestack/.openclaw/workspace/ragflow-kb/scripts/query_ragflow.py "用户的问题" -v
# 或
python3 /home/onestack/.openclaw/workspace/ragflow-kb/scripts/query_ragflow.py "用户的问题" --verbose
重要提示:
脚本会显示进度点(.)表示正在接收数据,请耐心等待。
API返回结果包含:
根据返回结果:
基本信息:
http://172.28.20.46:30001/v1/conversation/completion请求格式:
关键参数:
conversation_id: 会话ID(使用固定ID保持对话上下文)messages: 对话历史数组,每个消息包含:role: "user" 或 "assistant"content: 消息内容id: 消息唯一标识用户: 容器挂了怎么办
→ 调用API查询"容器挂了怎么办"
→ 等待约6秒,接收完整流式响应(94行数据)
→ 返回故障排查步骤并引用文档
→ 总结操作建议:直接删除容器,重新创建并加版本号
实际执行:
python3 /home/onestack/.openclaw/workspace/ragflow-kb/scripts/query_ragflow.py "容器挂了怎么办"
# 输出:
[查询] 容器挂了怎么办
.........................................................................
# 完整答案
如果容器挂了,你需要直接删除这个容器,然后重新创建一个新的容器,
并且给新容器的名字后缀加上一个版本号[ID:0]。
[引用文档]
- 运维测试文档.doc
--------------------------------------------------------------------------------
[成功] 查询完成 (耗时: 6.19秒)
用户: Docker网络模式有哪些?
→ 调用API查询"Docker网络模式"
→ 等待流式响应
→ 返回bridge、host、overlay等模式的说明
→ 总结并简要说明各模式特点
→ 如果知识库没相关内容,返回"知识库中未找到您要的答案!"
用户: 怎么查看容器日志?
→ 调用API查询"查看容器日志"
→ API返回使用docker logs命令的方法
→ 总结:使用`docker logs <container_name>`查看日志
→ 建议用户提供容器名称,使用exec工具执行命令
脚本已针对流式输出优化超时配置:
| 参数 | 值 | 说明 |
|------|-----|------|
| STREAM_NO_DATA_TIMEOUT | 15秒 | 无新数据则认为完成(给流式生成足够时间) |
| STREAM_MAX_TIMEOUT | 60秒 | 最大总等待时间(防止无限等待) |
| 请求超时 | 120秒 | HTTP连接超时 |
如果超时:
使用-v或--verbose参数获取详细调试信息:
python3 /home/onestack/.openclaw/workspace/ragflow-kb/scripts/query_ragflow.py "测试问题" -v
调试信息包括:
对于需要agent执行的命令:
对于需要多次查询的复杂问题:
# 测试连接
curl -I http://172.28.20.46:30001/v1/conversation/completion
# 查看详细错误
python3 scripts/query_ragflow.py "测试" -v
AI Usage Analysis
Analysis is being generated… refresh in a few seconds.
Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
Gemini CLI for one-shot Q&A, summaries, and generation.
Research any topic from the last 30 days on Reddit + X + Web, synthesize findings, and write copy-paste-ready prompts. Use when the user wants recent social/web research on a topic, asks "what are people saying about X", or wants to learn current best practices. Requires OPENAI_API_KEY and/or XAI_API_KEY for full Reddit+X access, falls back to web search.
Check Antigravity account quotas for Claude and Gemini models. Shows remaining quota and reset times with ban detection.
Manages free AI models from OpenRouter for OpenClaw. Automatically ranks models by quality, configures fallbacks for rate-limit handling, and updates opencla...
Manages free AI models from OpenRouter for OpenClaw. Automatically ranks models by quality, configures fallbacks for rate-limit handling, and updates openclaw.json. Use when the user mentions free AI, OpenRouter, model switching, rate limits, or wants to reduce AI costs.