ZSXQ Fetch
Use this skill to query the local OpenClaw ZSXQ database for summarization and grounded Q&A.
When to use
- - The user wants summaries of recent ZSXQ posts by time window or by group.
- The user asks questions that should be answered from synced ZSXQ posts or downloaded documents.
- The user wants to inspect downloaded attachments or search document text.
- The user wants to check sync status or manually trigger a sync.
Preconditions
- - The API server is running. Check with:
CODEBLOCK0
If it is not running, start it from the project root:
CODEBLOCK1
The server automatically syncs all subscribed groups in the background every hour (configurable via SYNC_INTERVAL_SECONDS).
Core workflow
- 1. Query the database directly — do NOT sync before every request. Data is kept fresh by the background auto-sync.
- Pull only the smallest relevant slice of data.
- Use
/api/v1/topics, /api/v1/documents, and /api/v1/search_documents to answer questions. - Summarize with explicit scope: group, time range, or topic.
When to trigger a manual sync
Only trigger a manual sync if:
- - The user explicitly asks for the "latest" or "most recent" content AND
- INLINECODE4 shows the last sync was more than 1 hour ago.
Otherwise, trust the database content.
Useful endpoints
- - Check sync status (always check this first for time-sensitive requests):
CODEBLOCK2
- - Trigger a manual sync (only if data is stale):
CODEBLOCK3
CODEBLOCK4
CODEBLOCK5
- - List downloaded documents:
CODEBLOCK6
CODEBLOCK7
Summarization pattern
- - Pull recent topics for the requested group or across relevant groups.
- If documents may contain the answer, search them with keywords from the user question.
- Build the answer from retrieved records only. State when the answer is inferred from partial evidence.
Output guidance
- - For update summaries, group findings by topic or theme, not by raw post order.
- For question answering, cite the specific topic text or document match preview used.
- If the database has no relevant records, say so. Only recommend a manual sync if the last sync was more than 1 hour ago.
ZSXQ Fetch
使用此技能查询本地 OpenClaw ZSXQ 数据库,用于内容总结和基于事实的问答。
使用时机
- - 用户需要按时间窗口或按群组获取近期 ZSXQ 帖子的摘要。
- 用户提出的问题应通过已同步的 ZSXQ 帖子或下载的文档来回答。
- 用户想要查看已下载的附件或搜索文档文本。
- 用户想要检查同步状态或手动触发同步。
前置条件
bash
curl http://127.0.0.1:8000/health
如果服务器未运行,在项目根目录启动:
bash
uvicorn app.main:app --host 0.0.0.0 --port 8000
服务器每小时自动同步所有已订阅群组(可通过 SYNCINTERVALSECONDS 配置)。
核心工作流程
- 1. 直接查询数据库 — 不要在每次请求前都进行同步。后台自动同步会保持数据更新。
- 仅提取最小相关数据片段。
- 使用 /api/v1/topics、/api/v1/documents 和 /api/v1/search_documents 来回答问题。
- 明确范围进行总结:群组、时间范围或主题。
何时触发手动同步
仅在以下情况触发手动同步:
- - 用户明确要求获取最新或最近的内容,且
- /api/v1/sync_status 显示上次同步时间超过 1 小时。
否则,信任数据库内容。
常用接口
- - 检查同步状态(对时效性要求高的请求始终先检查此项):
bash
curl http://127.0.0.1:8000/api/v1/sync_status
bash
curl -X POST http://127.0.0.1:8000/api/v1/trigger_sync
bash
curl http://127.0.0.1:8000/api/v1/topics?groupid=GROUPID&limit=50&offset=0
bash
curl http://127.0.0.1:8000/api/v1/groups/all
bash
curl http://127.0.0.1:8000/api/v1/documents?groupid=GROUPID&limit=50
bash
curl http://127.0.0.1:8000/api/v1/searchdocuments?q=KEYWORD&groupid=GROUP_ID
总结模式
- - 提取请求群组或相关群组的近期主题。
- 如果文档可能包含答案,使用用户问题中的关键词进行搜索。
- 仅基于检索到的记录构建答案。当答案是从部分证据推断时,需明确说明。
输出指导
- - 对于更新摘要,按主题或话题分组,而非按原始帖子顺序。
- 对于问答,引用具体的主题文本或匹配的文档预览。
- 如果数据库中没有相关记录,如实说明。仅在上次同步超过 1 小时时,才建议手动同步。