← Back to Skills Marketplace
dagangtj

AI Customer Service KB Builder

by dagangtj · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
533
Downloads
0
Stars
3
Active Installs
1
Versions
Install in OpenClaw
/install ai-customer-service
Description
Build AI-powered customer service knowledge bases by extracting FAQs from documents or websites, enabling automated replies and multi-format exports.
README (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, 客服, 知识库

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ai-customer-service
  3. After installation, invoke the skill by name or use /ai-customer-service
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug ai-customer-service
Version 1.0.0
License
All-time Installs 3
Active Installs 3
Total Versions 1
Frequently Asked Questions

What is 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. It is an AI Agent Skill for Claude Code / OpenClaw, with 533 downloads so far.

How do I install AI Customer Service KB Builder?

Run "/install ai-customer-service" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is AI Customer Service KB Builder free?

Yes, AI Customer Service KB Builder is completely free (open-source). You can download, install and use it at no cost.

Which platforms does AI Customer Service KB Builder support?

AI Customer Service KB Builder is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created AI Customer Service KB Builder?

It is built and maintained by dagangtj (@dagangtj); the current version is v1.0.0.

💬 Comments