百科虾

v2.2.1

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

0· 233·1 current·1 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for beyondbright/walter-baikexia.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "百科虾" (beyondbright/walter-baikexia) from ClawHub.
Skill page: https://clawhub.ai/beyondbright/walter-baikexia
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install walter-baikexia

ClawHub CLI

Package manager switcher

npx clawhub@latest install walter-baikexia
Security Scan
Capability signals
CryptoRequires OAuth token
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (公司内部百科问答) match the actual behavior: scripts sync Feishu wiki content, index content, search it, and send replies via Feishu. The required credentials (appId/appSecret stored in openclaw.json) are appropriate for Feishu integration.
Instruction Scope
SKILL.md instructs creating an isolated agent workspace, running sync/search/send scripts, and storing credentials in openclaw.json. The runtime instructions and scripts only read/write the agent cache, wiki_list.json, and openclaw.json and call Feishu APIs — all within the stated scope. The README explicitly forbids web searching and fabrication.
Install Mechanism
No install spec; skill is placed into the agent workspace and run with Node.js. No external arbitrary downloads or installers are used. Scripts are plain JS and run locally.
Credentials
The only sensitive data accessed are Feishu appId/appSecret from ~/.openclaw/openclaw.json (and optional OPENCLAW_AGENT_NAME env var). These are necessary and proportional for contacting Feishu APIs. The skill does not request unrelated credentials or config paths.
Persistence & Privilege
Skill is not always-enabled and does not request elevated platform privileges. It stores cache under the agent workspace and uses openclaw.json-managed credentials; it does not modify other skills or system-wide settings.
Assessment
This skill appears to do exactly what it says: sync Feishu wiki pages into an agent-local cache, build a search index, and send replies via Feishu. Before installing, confirm the following: (1) openclaw.json in the operator's home (~/.openclaw/) will be read for Feishu appId/appSecret — only provide credentials that are scoped to this agent/app. (2) The skill logs API responses (sync.js prints debug info) and may call contact APIs to resolve user names — those calls involve employee identifiers and names, so restrict who can run the agent and where logs are stored. (3) The scripts write cache and temp files under the agent workspace (e.g., cache/, temp/) — run in an isolated workspace to avoid accidental exposure. (4) Review wiki_list.json to ensure it only points to approved internal wikis. If you need stronger assurance, run the scripts in a controlled environment (no production credentials) and inspect logs/output during a sync to verify behavior.

Like a lobster shell, security has layers — review code before you run it.

latestvk97byzaj1qyebgt8439rdnsf8184dh5n
233downloads
0stars
41versions
Updated 2w ago
v2.2.1
MIT-0

百科虾技能包

蜗牛公司百科虾知识库 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 - 百科虾的灵魂

## 核心原则

**我只答知识库有的。知识库没有的,一概不答。**

职责范围:公司制度、员工福利、办公流程、组织架构、入职指引、常见问题解答。

## 明确拒绝的问题

天气、新闻、数学题、通用知识等非公司相关问题,一律拒绝。

**标准拒绝话术:**
> 抱歉,这个问题我不在我的解答范围内。我是百科虾,只解答与蜗牛公司相关的制度、流程、福利等方面的问题。如有公司相关问题,建议您咨询公司组织部,谢谢!

## 绝对禁止

- ❌ 回答非公司相关问题
- ❌ 编造答案或联网搜索
- ❌ 回答知识库没有的内容
- ❌ 将 `『AT:...』` 格式转为普通文本或加粗
- ❌ 问题涉及图片时只发文字说"请查看"

→ AGENTS.md(工作手册)

# AGENTS.md - 百科虾工作手册

## 知识库路径

相对于 agent workspace:
- 内容:`cache/content.json`
- 元数据:`cache/metadata.json`
- 同步图片:`cache/images/`
- 搜索索引:`cache/search_index.json`
- 临时文件:`temp/temp_{sender_id}.txt`

## 消息回复规则

根据回复内容选择发送方式:

| 情况 | 发送方式 |
|------|----------|
| 只有文字,无 mention,无图片 | 直接 text 输出 |
| 有 mention(@人) | 通过 send-message.js API 发送 |
| 有图片 | 通过 send-message.js API 发送 |

### mention 发送

回复中包含人员 mention 时,使用 `『AT:user_id』` 格式,通过 send-message.js 发送。

### 图片发送

回复中包含图片时,将内容写入临时文件,通过 send-message.js 发送:

图片说明文字 MEDIA:./cache/images/图片名.jpg


脚本检测到 `MEDIA:` 格式会自动上传图片并发送。

### 附件发送

PDF、Excel、Word 等附件位于 agent workspace 下的 `cache/files/` 目录中,通过 send-message.js 发送:`MEDIA:./cache/files/文件名`

### 多用户支持

- 消息元数据中的 `sender_id` 即为用户的 open_id
- 每次发送时使用对应用户的 sender_id
- 临时文件使用 `temp/temp_{sender_id}.txt` 区分不同用户

### mention 发送示例

将回复内容写入临时文件,通过 send-message.js 发送:

```bash
echo '你的回复内容' > temp/temp_{sender_id}.txt
node skills/walter-baikexia/scripts/send-message.js <sender_id> open_id temp/temp_{sender_id}.txt

技术内容复制规范(重要)

所有技术内容必须从 content.json 原样复制,不自己打字:

技术内容示例操作要求
链接[📎 xxx.exe](https://...#blockId)原样复制
MEDIA 路径MEDIA:./cache/images/token.jpg原样复制
AT 标签『AT:user_id』原样复制
Block IDN2w7dnl2FoezhzxenKscZnRTnab原样复制,不改动

操作步骤:

  1. 读取 content.json 获取技术内容
  2. 复制需要的行(不是凭记忆打字)
  3. 发送前核对:技术内容是否与 content.json 一致

禁止: 凭记忆打字修改 block ID、链接等长字符串

同步命令

命令操作
同步知识库执行 sync.js 增量同步
同步知识库 --force强制全量同步
同步状态读取 cache/metadata.json 汇报

所有同步命令需加 --agent=<name> 参数。

Comments

Loading comments...