← 返回 Skills 市场
dagangtj

AI Customer Service KB Builder

作者 dagangtj · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
533
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install ai-customer-service
功能描述
Build AI-powered customer service knowledge bases by extracting FAQs from documents or websites, enabling automated replies and multi-format exports.
使用说明 (SKILL.md)

AI Customer Service Knowledge Base Builder

Description

Help SMBs quickly build AI-powered customer service systems. Input FAQ documents or website URLs to automatically generate a knowledge base and configure auto-reply capabilities.

帮助中小企业快速搭建AI客服系统。输入FAQ文档或网站URL,自动生成知识库并配置自动回复功能。

Use When

  • Setting up customer service automation
  • Building FAQ knowledge bases
  • Configuring auto-reply systems
  • Migrating customer service to AI

Capabilities

  • Extract FAQ from documents (PDF, TXT, MD, DOCX)
  • Scrape FAQ from website URLs
  • Generate structured knowledge base (JSON)
  • Test Q&A matching
  • Export to common formats (JSON, CSV, Markdown)

Usage

Basic Commands

# Extract from document
node kb-builder.js extract --file ./faq.pdf --output ./kb.json

# Extract from website
node kb-builder.js scrape --url https://example.com/faq --output ./kb.json

# Test knowledge base
node kb-builder.js test --kb ./kb.json --query "退货政策是什么?"

# Export to different formats
node kb-builder.js export --kb ./kb.json --format csv --output ./kb.csv

Configuration

Create config.json:

{
  "language": "zh-CN",
  "minConfidence": 0.7,
  "maxResults": 3,
  "fallbackMessage": "抱歉,我没有找到相关答案。请联系人工客服。"
}

Examples

Example 1: Build from PDF

node kb-builder.js extract --file ./company-faq.pdf --output ./kb.json
node kb-builder.js test --kb ./kb.json --query "如何退货?"

Example 2: Build from Website

node kb-builder.js scrape --url https://shop.example.com/help --output ./kb.json
node kb-builder.js export --kb ./kb.json --format markdown --output ./faq.md

Example 3: Interactive Mode

node kb-builder.js interactive --kb ./kb.json
# Then type questions to test responses

Output Format

Knowledge base JSON structure:

{
  "version": "1.0",
  "language": "zh-CN",
  "entries": [
    {
      "id": "q001",
      "question": "如何退货?",
      "answer": "您可以在收到商品后7天内申请退货...",
      "keywords": ["退货", "退款", "return"],
      "category": "售后服务"
    }
  ]
}

Requirements

  • Node.js 18+
  • No external API keys needed for basic features
  • Optional: OpenAI API key for enhanced matching

Security

  • All processing is local
  • No data sent to external services (unless using OpenAI enhancement)
  • Safe for sensitive business information

Limitations

  • PDF extraction requires readable text (not scanned images)
  • Website scraping respects robots.txt
  • Best results with structured FAQ pages

Author

Created for OpenClaw by Claude

License

MIT

Tags

customer-service, ai, knowledge-base, faq, automation, chatbot, 客服, 知识库

安全使用建议
This skill is broadly coherent for building local customer-service KBs, but do not install/run it blindly. Before use: (1) review and fix the kb-builder.js file — the interactive mode is truncated and may crash; (2) if you rely on the SKILL.md claim that scraping respects robots.txt, add explicit robots.txt checks in the code (currently missing); (3) if you expect OpenAI-enhanced matching, verify or implement safe optional integration rather than assuming the script will use your API key; (4) only scrape URLs you control or have permission to scrape, since the tool will fetch remote pages; and (5) run the script in a restricted environment or with non-sensitive sample data first. These issues look like sloppy implementation rather than intentional malice, but they are important to resolve before production use.
功能分析
Type: OpenClaw Skill Name: ai-customer-service Version: 1.0.0 The `ai-customer-service` skill, while appearing benign in its stated purpose, contains significant vulnerabilities in its `kb-builder.js` script. It is susceptible to path traversal due to direct use of user-provided file paths for read/write operations (e.g., `--file`, `--output`, `--kb` arguments to `fs.readFileSync` and `fs.writeFileSync`). Furthermore, the `scrapeFromURL` function fetches content from arbitrary URLs without validation, posing a Server-Side Request Forgery (SSRF) risk. These vulnerabilities could be exploited to access or modify local files outside the skill's intended scope or interact with internal network services, classifying the skill as suspicious.
能力评估
Purpose & Capability
Name, description, and included files align with a local KB builder: extract from files, scrape supplied URLs, build/search/export JSON knowledge bases. It does not request unrelated credentials or system access.
Instruction Scope
SKILL.md claims 'Website scraping respects robots.txt' and an 'Optional: OpenAI API key for enhanced matching', but the provided code (kb-builder.js) does not check robots.txt and contains no OpenAI integration. Additionally, the bundled script includes a truncated/possibly corrupted section in interactive mode (a partial 'console.lo...' line), which could cause runtime failures or undefined behavior. The skill will perform outbound HTTP(S) requests to any URL the user supplies (expected for a scraper), so users should be aware scraping is not sandboxed and will fetch remote content.
Install Mechanism
No install spec, no downloads, and the package is instruction + local Node.js script only. Nothing is written to disk by an installer; risk from install step is low.
Credentials
No required environment variables, credentials, or config paths declared. The code uses a local config.json by default and does not read secrets or external tokens as provided. The SKILL.md mention of an optional OpenAI API key is not reflected in the code, so no hidden credential use was found.
Persistence & Privilege
Skill is not always-enabled and does not request elevated/system-wide persistence or modify other skills. It runs as a normal CLI tool invoked by the user/agent.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ai-customer-service
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ai-customer-service 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the AI Customer Service Knowledge Base Builder. - Input FAQ documents (PDF, TXT, MD, DOCX) or website URLs to auto-generate a structured knowledge base. - Configure auto-reply and test Q&A matching locally. - Export the knowledge base to JSON, CSV, or Markdown formats. - All processing is local; no external API keys required for basic usage. - Supports both English and Chinese documentation.
元数据
Slug ai-customer-service
版本 1.0.0
许可证
累计安装 3
当前安装数 3
历史版本数 1
常见问题

AI Customer Service KB Builder 是什么?

Build AI-powered customer service knowledge bases by extracting FAQs from documents or websites, enabling automated replies and multi-format exports. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 533 次。

如何安装 AI Customer Service KB Builder?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-customer-service」即可一键安装,无需额外配置。

AI Customer Service KB Builder 是免费的吗?

是的,AI Customer Service KB Builder 完全免费(开源免费),可自由下载、安装和使用。

AI Customer Service KB Builder 支持哪些平台?

AI Customer Service KB Builder 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 AI Customer Service KB Builder?

由 dagangtj(@dagangtj)开发并维护,当前版本 v1.0.0。

💬 留言讨论