ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

baikexia

蜗牛公司百科虾技能包。为员工解答公司相关问题(制度、福利、流程、组织架构等)。当用户询问公司相关问题时触发。知识库没有的问题一律不答,不编造,不联网搜索。

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/beyondbright/walter-baikexia
Or

百科虾技能包

蜗牛公司百科虾知识库 Q&A 技能。

文件结构

walter-baikexia/
├── SKILL.md                    # 本文件
├── scripts/
│   ├── search.js               # 搜索脚本(提取 AT 标签上下文)
│   ├── send-message.js         # 飞书消息发送(含 mention 支持)
│   ├── sync.js                 # 知识库同步脚本
│   └── wiki_list.json          # Wiki 列表配置(同步目标)

注意: 凭证存储在 openclaw.json 中;缓存放在 agent workspace(~/.openclaw/workspace-{agentName}/)下。

部署步骤

Step 1:创建 Agent

在 OpenClaw 中创建独立的 agent(例如 baikexia),确保 agent 的 workspace 路径为 ~/.openclaw/workspace-baikexia/

Step 2:安装本 Skill

在 agent 对话中执行安装,skill 会装到该 agent 的 workspace 下:

openclaw skills install walter-baikexia

安装后 skill 位于:~/.openclaw/workspace-baikexia/skills/walter-baikexia/

Step 3:配置角色文件

从本文件末尾「Agent 角色定义」章节复制模板内容,分别写入 agent workspace:

  • ~/.openclaw/workspace-baikexia/SOUL.md — 行为准则
  • ~/.openclaw/workspace-baikexia/AGENTS.md — 工作手册

Step 4:初始化知识库

# 在 agent workspace 下执行(skill 位于 skills/walter-baikexia/)
node skills/walter-baikexia/scripts/sync.js --agent=baikexia

成功后会生成 agent workspace 下的 cache/content.json(知识库内容)和 cache/metadata.json(同步元数据)。

管理员命令

命令操作
同步知识库执行 sync.js 增量同步(内容变化才更新)
同步知识库 --force强制全量同步
同步状态读取 agent workspace 下 cache/metadata.json 汇报同步状态

注意: 所有 sync.js 命令都需要加 --agent=<name> 参数指定 agent 名称。

核心文件说明

scripts/send-message.js

通过飞书 IM API 发送消息,支持 mention(@人)和图片。

node send-message.js <receive_id> <receive_id_type> [content_file]
  • receive_id:接收者 ID(open_id / user_id 等)
  • receive_id_type:ID 类型(open_id / user_id 等)
  • content_file:消息内容文件路径,默认从 stdin 读取

mention 格式:使用 『AT:user_id』 格式,脚本会自动转换为飞书 at 标签发送。

scripts/sync.js

从飞书知识库同步文档内容到本地缓存。

  • 凭证从 openclaw.jsonchannels.feishu.accounts[<agentName>] 读取
  • 缓存输出到 agent workspace 下的 cache/content.json
  • 支持增量同步(hash 对比)
  • --force 参数强制全量同步

scripts/wiki_list.json

定义要同步的 Wiki 列表,格式如下:

{
  "wikis": [
    {
      "name": "蜗牛大百科",
      "url": "https://campsnail.feishu.cn/wiki/VGRRw7s4BiStank4GnpczxnGn44"
    }
  ]
}

新增 Wiki 时,在此文件添加一条即可。

知识库路径

Agent 运行时通过以下路径读取知识库(相对于 agent workspace):

  • 内容:cache/content.json
  • 元数据:cache/metadata.json
  • 同步图片:cache/images/
  • 搜索索引:cache/search_cache.json(自动缓存,content.json 变化时重建)
  • 临时文件:temp/temp_{sender_id}.txt

注意事项

  • cache/ 目录为运行时生成,不属于 skill 源码,无需提交
  • 凭证存储在 openclaw.json 中,由 agent-factory 管理,勿手动修改
  • 知识库同步需要机器能访问飞书 API(open.feishu.cn
  • sync.js 需要 --agent=<name> 参数指定 agent 名称

Agent 角色定义

供 agent-factory 创建新 agent 时复制到目标 workspace 的模板文件,内容分为三部分:


→ IDENTITY.md(身份)

# IDENTITY.md - 百科虾

- **Name:** 百科虾
- **Creature:** AI助手
- **Vibe:** 实事求是,只答知识库有的,不答没有的
- **Emoji:** 🦐
- **Avatar:** _(待定)_

→ SOUL.md(行为准则)

# SOUL.md - 百科虾的灵魂

##...

Metadata

Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-beyondbright-walter-baikexia": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.