agentCLAWHUBUnverified

Kb Query

Answer Research KB questions from the team Gitea-backed knowledge base with OpenClaw reasoning, optional reference attachments, stable citations, OpenClaw-led evidence selection, and optional high-value Q&A persistence. Skill: Kb Query Owner: myd2002 Summary: Answer Research KB questions from the team Gitea-backed knowledge base with OpenClaw reasoning, optional reference attachments, stable citations, OpenClaw-led evidence selection, and optional high-value Q&A persistence. Tags: latest:1.0.8 Version history: v1.0.8 | 2026-07-09T14:33:17.833Z | user No functional changes. Documentation improved for implementation details and usage

OpenClaw

Rank

62

Safety

84

Downloads

1.2k

Updated

Oct 11, 2026

Version

1.0.8

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 11, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 11, 2026
Adoption signal
1.2K downloadsadoption · observed Oct 11, 2026
Latest release
1.0.8release · observed Jul 9, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: medium.

clawhub skill install s175zrvz5m28epr76c6rt4dtex8474t6:kb-query
  1. Python environment detected. Create a strict virtual environment (`python -m venv .venv`) before installing dependencies to prevent system-level package conflicts.
  2. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  3. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-myd2002-kb-query/snapshot"

Documentation

CLAWHUB

85,097 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: kb_query
description: Answer Research KB questions from the team Gitea-backed knowledge base with OpenClaw reasoning, optional reference attachments, stable citations, OpenClaw-led evidence selection, and optional high-value Q&A persistence.
---

# kb_query

## 职责边界

`kb_query` 只负责“对话”页面的知识库查询。用户输入可以是纯文字,也可以带附件;附件一律是本轮参考材料,用于辅助理解问题、补充上下文或做临时对比,稳定来源仍以知识库证据页为准。

本 skill 不负责登录、权限、会话历史、文件上传、任务调度或资料源入库。Java 后端负责这些系统动作。OpenClaw 负责理解用户问题、判断需要参考哪些 KB 页面、综合证据、生成回答、判断证据是否充分,以及判断是否值得沉淀为 `qa/` 页面。Python 脚本只做确定性动作:读取 catalog/index 和探索卡片、按 OpenClaw 选择读取证据页面、抽取附件文本预览、校验 OpenClaw 输出、可选写入 `qa/`、维护 `catalog.json`/`index.md`、写出后端 result JSON。

不要提供脚本兜底的抽取式简化回答。没有真实 OpenClaw 理解时,任务应失败或返回明确错误,而不是用脚本假装完成问答。

## 输入约定

后端 payload 通常包含:

- `taskId`: 后端生成的查询任务 ID,当前格式为 `query-<conversationId>-<messageId>`,用于共享 payload/result 文件和 OpenClaw session key。
- `skill`: `kb_query`。
- `question`: 用户问题。
- `conversationId`: 当前会话 ID。
- `messageId`: 用户消息 ID。
- `attachments[]`: 本轮参考附件,字段包括 `attachmentId`、`fileName`、`mimeType`、`storagePath`、`sha256`、`size`、`temporary=true`。
- `answerPolicy.scopeSelection`: `auto_by_openclaw`。
- `answerPolicy.knowledgeBaseFirst`: `true`,表示事实性回答必须优先基于团队 KB。`answerPolicy.allowNonKbSupplementWhenInsufficient=true` 时,知识库证据不足可以在明确说明后补充非 KB 或附件分析。
- `answerPolicy.writeHighValueAnswerToQa`: 是否允许高价值问答写入 `qa/`。
- `payloadFile`、`resultFile`、`sharedDir`: 后端共享目录路径。

环境变量包括 `GITEA_URL`、`GITEA_BOT_TOKEN`、`GITEA_BOT_USERNAME`、`GITEA_ORG`、`TEAM_KB_REPO`、`OPENCLAW_SHARED_DIR`。

## 执行流程

必须使用四段式流程,让“选哪些页面作为参考”由 OpenClaw 完成,而不是由脚本用关键词配对决定。

上下文预算必须保守执行。`prepare`/`fetch` 命令会把完整 JSON 写入文件,终端只输出摘要;OpenClaw 应阅读文件路径指向的 JSON,不要把完整 context/evidence 粘贴回聊天。页面选择应坚持“够用即可”:通常选择 1-4 个最关键 KB 页面,最多不得超过 `context.analysisLimits.maxSelectedPages`。如果 OpenClaw 判断问题本身不适合由 KB 回答,或者没有任何相关 KB 页面,可以写出合法的空选择 `{"selectedPages":[],"rationale":"...","unresolvedQuestions":[]}`,继续运行 fetch/apply,并在答案中按证据不足规则说明。不要因为证据不足而停止在 selection 阶段;如果少量证据已经能回答,不要扩大读取范围;如果证据不足,按不足规则回答,而不是继续尝试读取大量页面。

所有中间 JSON 文件必须是严格合法 JSON。写 `page-selection.json` 和 `answer.json` 时不要加入 Markdown 代码围栏、注释、尾随逗号或半截文本;文件写好后再运行下一步脚本。`answer` 正文通常包含 Markdown、双引号和表格,优先用 `python3` 的 `json.dump`/`json.dumps` 写出整个 `answer.json`,不要手写长 JSON 字符串。

1. 运行准备脚本:

```bash
python3 scripts/run_task.py prepare --input <payload.json> --context-output <context.json>
```

准备脚本会读取 `catalog.json`、`index.md`、页面元数据、少量探索卡片和附件文本预览,输出 OpenClaw 可读的查询规划上下文。命令行只返回摘要,完整内容在 `<context.json>` 中。`starterPageCards` 只是帮助 OpenClaw 快速了解可能相关的页面,不是最终证据,也不能直接作为引用依据。脚本不会生成答案,也不会决定最终参考页面。

2. OpenClaw 阅读 `<context.json>`,根据用户问题、目录、索引、页面卡片、预算限制和附件上下文,思考并生成 `<page-selection.json>`。OpenClaw 可以选择任意可见 catalog 页面,不限于 `starterPageCards`,但应选择最小充分集合。

`page-selection.json` 示例:

```json
{
  "rationale": "为什么这些页面需要被读取作为证据",
  "selectedPages": [
    {
      "path": "projects/example.md",
      "reason": "用于确认项目边界和当前实现",
      "expectedUse": "回答功能进度和边界"
    }
  ],
  "unresolvedQuestions": []
}
```

3. 按 OpenClaw 选择读取证据页:

```bash

_meta.json

{
  "ownerId": "kn7cp7eb6ymqv898hke0ersmc1847fed",
  "slug": "kb-query",
  "version": "1.0.8",
  "publishedAt": 1783607597833
}

skill-card.md

## Description:

Answer Research KB questions from the team Gitea-backed knowledge base with OpenClaw reasoning, optional reference attachments, stable citations, OpenClaw-led evidence selection, and optional high-value Q&A persistence.

This skill is ready for commercial/non-commercial use.

## Publisher:

[myd2002](https://clawhub.ai/user/myd2002)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and research-team KB users use this skill to answer questions against a team Gitea-backed knowledge base, optionally using temporary attachments for context and persisting reusable high-value Q&A entries when policy allows.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill uses a bot token to read and write a Gitea-backed knowledge base.

Mitigation: Run it only with trusted backend payloads and a tightly scoped bot account limited to the intended KB repository.

Risk: Payload or environment configuration can select the Gitea host used by the helper scripts.

Mitigation: Require an allowlisted HTTPS Gitea host before production use.

Risk: The skill reads attachment paths and writes result paths supplied through backend payloads.

Mitigation: Constrain attachment and result paths to trusted directories and reject symlinks or path traversal.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/myd2002/skills/kb-query)

## Skill Output:

**Output Type(s):** [text, markdown, JSON, shell commands, configuration, guidance]

**Output Format:** [Markdown answer text with JSON result files and cited KB sources]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May create or update high-value Q&A pages, catalog entries, and index entries when policy and evidence gates allow.]

## Skill Version(s):

1.0.8 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

env-example.txt

GITEA_URL=http://127.0.0.1:3000
GITEA_BOT_TOKEN=
GITEA_BOT_USERNAME=research-kb-bot
GITEA_ORG=
TEAM_KB_REPO=team-kb
OPENCLAW_SHARED_DIR=/srv/research-kb/shared

requirements.txt

# kb_query uses only the Python 3 standard library for deterministic prepare/apply helpers.
Github ReposUpdated 1d agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/myd2002/skills/kb-query",
      "sourceUrl": "https://clawhub.ai/myd2002/skills/kb-query",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T04:10:06.085Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-myd2002-kb-query/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-myd2002-kb-query/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-11T04:10:06.085Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.2K downloads",
      "href": "https://clawhub.ai/myd2002/kb-query",
      "sourceUrl": "https://clawhub.ai/myd2002/kb-query",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T04:10:06.085Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.0.8",
      "href": "https://clawhub.ai/myd2002/kb-query",
      "sourceUrl": "https://clawhub.ai/myd2002/kb-query",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-07-09T14:33:17.833Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-myd2002-kb-query/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-myd2002-kb-query/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.0.8",
      "description": "No functional changes. Documentation improved for implementation details and usage clarity. - Clarified that answer.json should usually be written using python3's json.dump/json.dumps; discourages manual construction for complex answers. - Added note that Markdown, tables, and double quotes in answers are acceptable—focus is on using robust JSON output. - No code or behavioral changes in this version.",
      "href": "https://clawhub.ai/myd2002/kb-query",
      "sourceUrl": "https://clawhub.ai/myd2002/kb-query",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-07-09T14:33:17.833Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 11, 2026.

Sponsored

Ads related to Kb Query and adjacent AI workflows.