Xpersona
B

BIC-QA

CLAWHUB · Unverified

BIC-QA 数据库与操作系统知识库问答(支持多轮上下文)。当用户提出数据库(Oracle/MySQL/PostgreSQL/达梦/金仓/GaussDB/Redis/MongoDB 等)或操作系统相关的原理、运维、故障排查、性能优化问题,或需要基于 BIC-QA 知识库检索权威资料时使用。同一话题的连续追问必须复用会话。 Skill: BIC-QA Owner: bbsyd2 Summary: BIC-QA 数据库与操作系统知识库问答(支持多轮上下文)。当用户提出数据库(Oracle/MySQL/PostgreSQL/达梦/金仓/GaussDB/Redis/MongoDB 等)或操作系统相关的原理、运维、故障排查、性能优化问题,或需要基于 BIC-QA 知识库检索权威资料时使用。同一话题的连续追问必须复用会话。 Tags: latest:2.0.1 Version history: v2.0.1 | 2026-09-12T16:43:12.264Z | user 移除 thinking 输出以避免推理内容暴露 v2.0.0 | 2026-09-12T16:16:33.043Z | user 切换到 Open API,新增多轮上下文、会话管理、总时限与流完整性保护 v1.0.2 | 2026-03-27T08:21:53.601Z | auto -

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K 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

Install and run

Setup complexity: low.

clawhub skill install s172dhc0ar4cd8vj3qkfvd17xh83g2d5:bic-qa
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. 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-bbsyd2-bic-qa/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

36,302 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: bic-qa
description: BIC-QA 数据库与操作系统知识库问答(支持多轮上下文)。当用户提出数据库(Oracle/MySQL/PostgreSQL/达梦/金仓/GaussDB/Redis/MongoDB 等)或操作系统相关的原理、运维、故障排查、性能优化问题,或需要基于 BIC-QA 知识库检索权威资料时使用。同一话题的连续追问必须复用会话。
metadata:
  openclaw:
    requires:
      anyBins:
        - python3
        - python
        - py
      config:
        - ~/.bic/config/api_key
        - ~/.bic/openapi/api_key
    primaryEnv: BIC_API_KEY
    envVars:
      - name: BIC_API_KEY
        required: false
        description: BIC-QA API Key。不设置时,脚本从 ~/.bic/config/api_key 读取(推荐,避免 Key 进入环境)。
      - name: BICQA_API_KEY
        required: false
        description: BIC_API_KEY 的兼容别名。
      - name: BIC_QA_API_KEY
        required: false
        description: BIC_API_KEY 的兼容别名。
      - name: BICQA_KEY_FILE
        required: false
        description: 自定义 API Key 文件路径。
      - name: BICQA_BASE_URL
        required: false
        description: 测试或受控代理使用的自定义 API 地址;必须同时显式启用 BICQA_ALLOW_CUSTOM_BASE_URL。
      - name: BICQA_ALLOW_CUSTOM_BASE_URL
        required: false
        description: 设为 1 才允许把 API Key 发往非官方地址;远程地址必须使用 HTTPS。
      - name: BICQA_STATE_FILE
        required: false
        description: 自定义会话状态文件路径。
      - name: BICQA_STATE_DIR
        required: false
        description: 覆盖会话状态目录,默认 ~/.bic/openapi/。
      - name: BICQA_TTL_ACTIVE
        required: false
        description: 会话空闲超时秒数,默认 7200。
      - name: BICQA_TTL_HARD
        required: false
        description: 会话硬过期秒数,默认 86400。
      - name: BICQA_MAX_TURNS
        required: false
        description: 单个会话最大轮数,默认 20。
    emoji: "🐘"
    homepage: https://www.bic-qa.com
---

# BIC-QA 知识问答(Open API)

基于 BIC-QA 官方 Open API 的**有状态**多轮问答。服务端保存上下文:先创建会话拿到 `conversationId`,之后同一话题的每一轮都复用这个 id。

需要 Python 3.8+(仅标准库)和有效的 BIC-QA API Key。默认只向 `https://api.bic-qa.com` 发送请求。

## 会话协议(强制,不可绕过)

所有提问必须走 `scripts/bicqa.py`。脚本负责建会话、判定复用/重建、状态落盘。

**禁止**自己构造或猜测 `conversationId`、**禁止**直接 curl、**禁止**把会话 id 暴露给用户(只在结尾用短号标注)。

Unix、macOS 与 WSL 优先使用 `python3`;Windows 使用 `py -3`。若命令不可用,从 frontmatter 的 `requires.anyBins` 中选择本机存在的解释器。

```bash
# <SKILL_DIR> = 本 SKILL.md 所在目录
python3 <SKILL_DIR>/scripts/bicqa.py ask -q "用户的问题原文"
python3 <SKILL_DIR>/scripts/bicqa.py ask -n -q "..." -t "索引失效排查"
python3 <SKILL_DIR>/scripts/bicqa.py list                 # 列出本地会话
python3 <SKILL_DIR>/scripts/bicqa.py resume 3f1a          # 切回某个旧会话
python3 <SKILL_DIR>/scripts/bicqa.py check                # 排障自检,不消耗 token
```

`ask` 参数:`-q/--question` 问题(必填)、`-n/--new` 强制新会话、`-t/--title` 新建会话时的标题、`--timeout` 流式问答总时限秒数(默认 600)。
`new` 参数:`-t/--title`。简写与全写等价。
找不到脚本时用 `--help` 自检,或按常见安装位置查找:`~/.agents/skills/bic-qa/`、`~/.workbuddy/skills/bic-qa/`、`~/.claude/skills/bic-qa/`、`~/.codex/skills/bic-qa/`。

运行 `ask` 的外层命令执行器也应允许至少 `--timeout` 加 30 秒;若工具支持 yield/poll,应等待原进程完成,不要因暂时没有 stdout 就重复发起同一问题。

### 必须加 `--new`(简写 `-n`)的四种情况

1. 用户明确说「新会话 / 换个话题 / 重新开始 / new session」。
2. **换了数据库种类、版本或实例**——即使问题类型相同(例如从 PG 15 切到 Oracle 19c)。这条最容易漏,也最容易串味。
3. 你判断新问题与当前会话主题无关(例如从「索引失效」跳到「备份恢复」)。
4. 脚本输出 `[b

_meta.json

{
  "ownerId": "kn7fstc5pc8zcxcs9h8dy0wyxn83hbhx",
  "slug": "bic-qa",
  "version": "2.0.1",
  "publishedAt": 1789231392264
}

references/api.md

# BIC-QA Open API 速查(仅创建会话 + 流式聊天)

Base URL:`https://api.bic-qa.com`。仅测试或受控代理场景可用 `BICQA_BASE_URL` 覆盖,且必须同时设置 `BICQA_ALLOW_CUSTOM_BASE_URL=1`;远程自定义地址必须使用 HTTPS。
鉴权:请求头 `Authorization: Bearer <API_KEY>`,Key 不得出现在 URL / 参数 / Body 中。

## 1. 创建会话

`POST /open-api/v1/session/create`,`Content-Type: application/json`

请求:`{"title": "数据库巡检咨询"}`(`title` 必填,不能是空白字符串)

响应:

```json
{"status":"success","data":{"conversationId":"eaf05aa6-...","chatTitle":"数据库巡检咨询"},"message":"会话创建成功"}
```

`data.conversationId` 是后续所有接口的会话标识。

## 2. 流式聊天

`POST /open-api/v1/chat`,`Accept: text/event-stream`(curl 必须加 `-N`)

请求:

```json
{"question":"请总结这次数据库巡检的主要风险。","conversationId":"eaf05aa6-...","model":"optional-model-id"}
```

- `question` 必填,最大 5000 字符
- `conversationId` 必填,必须属于当前 API Key 用户
- `batchId` 可选(已上传附件的批次 UUID)
- `model` 可选,留空用默认模型

响应为标准 SSE,每个事件一行 `data:` + JSON + 空行,没有 `event:` / `id:` / `retry:` 字段。

| type | 含义 | 关键字段 |
| --- | --- | --- |
| `meta` | 会话元数据 | `chatSessionId`(上游会话 id,≠ conversationId)、`chatTitle` |
| `delta` | 增量内容 | `delta.content` 正文;`delta.role`;`delta.tool_calls[]` |
| `file` | 生成文件 | `filename`、`file`(**不能**直接用于下载接口)、`toolUseId` |
| `error` | 流内错误 | `errorCode`、`content`,`done=true` |
| `done` | 流结束 | `totalTokens`、`questionId`、`summary` |

注意:

- **双错误通道**——建流前失败是 HTTP 非 200 + 普通 JSON;建流后失败是 HTTP 200 + `type=error`。只看 HTTP 状态不够。
- 客户端只累计 `delta.content` 正文,其他增量字段不进入输出。
- 出现 `error` 后应停止追加正文,随后通常还会再收到一个 `done`。
- 正常完成必须收到 `done`。连接在 `done` 前超时、中断或结束时,应丢弃已累计的残缺正文并保留会话,不得当作成功回答。
- `--timeout` 是流式问答的总时限(默认 600 秒),不是每次 socket 读取都重新计时。超时请求可能已被服务端部分处理,不应自动重试。

## 错误码

| HTTP | code | 处理 |
| --- | --- | --- |
| 400 | `OPEN_API_PARAMETER_INVALID` | 修正参数,不原样重试 |
| 400 | `OPEN_API_SESSION_NOT_FOUND` | 重建会话(脚本已自动处理一次) |
| 400 | `OPEN_API_TOKEN_INSUFFICIENT` | 账号余额不足,联系平台 |
| 401 | `OPEN_API_KEY_MISSING` / `OPEN_API_KEY_INVALID` | 更换 Key,不高频重试 |
| 429 | `OPEN_API_RATE_LIMITED` | 按 `Retry-After` 退避 |
| 503 | `OPEN_API_UPSTREAM_UNAVAILABLE` | 可安全重试,指数退避 |
| 500 | `OPEN_API_INTERNAL_ERROR` | 记录标识,联系平台 |

客户端本地错误:`OPEN_API_TIMEOUT` / `OPEN_API_STREAM_TIMEOUT` 表示连接或总时限超时;`OPEN_API_STREAM_INTERRUPTED` / `OPEN_API_STREAM_INCOMPLETE` 表示传输中断或缺少最终 `done`。这些错误均不自动重试聊天请求。

限流:创建会话 60 秒 60 次,流式聊天 60 秒 20 次(用户维度)。

skill-card.md

## Description:

BIC-QA answers database and operating-system questions through the BIC-QA knowledge base with stateful multi-turn context.

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

## Publisher:

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

### License/Terms of Use:

MIT-0

## Use Case:

Developers, DBAs, and operations engineers use this skill to ask BIC-QA knowledge-base questions about database systems and operating-system troubleshooting. The skill is designed for follow-up questions where preserving the same BIC-QA conversation context improves answer continuity.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Questions and API credentials are sent to the BIC-QA API when the skill is used.

Mitigation: Use the skill only for questions appropriate to share with BIC-QA, keep API key files private, and avoid exposing keys in commands, files, or responses.

Risk: Local session state may contain conversation metadata and recent question text.

Mitigation: Keep BICQA_STATE_DIR and BICQA_STATE_FILE in private, non-shared locations and do not place them under version control.

Risk: A custom API base URL can receive the API key and question content if explicitly enabled.

Mitigation: Do not enable BICQA_ALLOW_CUSTOM_BASE_URL unless the endpoint is trusted and controlled; remote custom endpoints should use HTTPS.

## Reference(s):

- [BIC-QA Open API Quick Reference](artifact/references/api.md)
- [BIC-QA Homepage](https://www.bic-qa.com)
- [ClawHub Skill Page](https://clawhub.ai/bbsyd2/skills/bic-qa)

## Skill Output:

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

**Output Format:** [Markdown responses with optional shell command examples and BIC-QA session annotations]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May include generated filenames returned by the BIC-QA API; local session metadata is maintained between related questions.]

## Skill Version(s):

2.0.1 (source: server release evidence)

## 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.

Sponsored

Ads related to BIC-QA and adjacent AI workflows.