← Back to Skills Marketplace
likem90is-cmd

inquiry analyzer

by likem90is-cmd · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
120
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install inquiry-analyzer
Description
阿里巴巴询盘分析技能 - 分析指定时间窗口内的询盘数据,提取产品分类、客户信息、国家等关键字段,生成结构化报告。当用户需要分析阿里巴巴询盘、生成询盘报告、运行询盘分析时使用。
README (SKILL.md)

阿里巴巴询盘分析技能

分析阿里巴巴国际站询盘数据,提取产品分类、客户信息、国家等关键字段,生成结构化 Markdown 和 CSV 报告。

安装配置

环境变量(可选)

skill 目录是自包含的,无需配置即可运行。如需指定外部路径,可设置环境变量:

# Windows
set INQUIRY_ANALYZER_PATH=E:\OpenClaw\inquiry-analyzer

# Linux/macOS
export INQUIRY_ANALYZER_PATH=/path/to/inquiry-analyzer

目录结构(自包含模式)

inquiry-analyzer-skill/
├── SKILL.md                    # 本文档
├── lib/                        # 核心库文件
│   ├── inquiry-analyzer.js         # 询盘分析主脚本
│   ├── okki-background.js          # OKKI 背调分析脚本
│   ├── product-groups.js           # 产品分组动态获取模块
│   └── product-mapping.js          # 产品分组配置向导模块
├── reports/                    # MD 报告输出(运行时创建)
├── csv-reports/                # CSV 报告输出(运行时创建)
├── okki-reports/               # OKKI 背调报告输出(运行时创建)
└── scripts/                    # 入口脚本
    ├── run-analysis.js         # 询盘分析入口
    ├── run-okki.js             # OKKI 背调入口
    └── merge-reports.js        # 报告合并入口

自包含说明: skill 目录包含所有必需文件,无需外部依赖即可运行。

路径查找机制

入口脚本按以下顺序查找主脚本:

  1. 自包含模式 — 上级目录的 lib/ 文件夹
  2. 环境变量 INQUIRY_ANALYZER_PATH
  3. 常见位置E:\OpenClaw\inquiry-analyzer、用户目录等

前提条件

1. 启动 OpenClaw 浏览器

步骤 1:查看可用浏览器配置文件

openclaw browser profiles

结果示例:

openclaw: stopped
  port: 18800, color: #FF4500  ← 专用浏览器
chrome: running (0 tabs) [default]
  port: 18792, color: #00AA00   ← Chrome 扩展模式

步骤 2:启动专用浏览器

openclaw browser start --browser-profile openclaw

步骤 3:确认浏览器状态

openclaw browser status --browser-profile openclaw

关键字段:

  • running: true — 浏览器已启动
  • cdpPort: 18800 — CDP 端口号
  • cdpUrl: http://127.0.0.1:18800 — 连接地址

2. 登录阿里巴巴

在 OpenClaw 浏览器中登录阿里巴巴账号,确保登录状态有效。

3. 常用命令速查

命令 说明
openclaw browser profiles 查看所有配置文件及端口
openclaw browser start --browser-profile openclaw 启动专用浏览器
openclaw browser status --browser-profile openclaw 查看浏览器状态
openclaw browser stop --browser-profile openclaw 停止浏览器
openclaw browser tabs --browser-profile openclaw 查看当前标签页

4. 故障排除

问题 1:Chrome 扩展模式连接失败

Chrome extension relay is running, but no tab is connected.

解决方案:改用专用浏览器模式

openclaw browser start --browser-profile openclaw

问题 2:Gateway 超时

Error: gateway timeout after 1500ms

解决方案:启动 Gateway

openclaw gateway --force

问题 3:端口被占用

openclaw browser stop --browser-profile openclaw
openclaw browser start --browser-profile openclaw

问题 4:找不到主脚本

错误: 无法找到 inquiry-analyzer.js

解决方案:设置环境变量 INQUIRY_ANALYZER_PATH 指向 inquiry-analyzer 目录

使用方法

询盘分析

# 基本用法:分析指定询盘单号
node run-analysis.js \x3C询盘单号>

# 指定时间窗口
node run-analysis.js \x3C询盘单号> \x3C开始时间> \x3C结束时间>

# 示例
node run-analysis.js 50000126101155
node run-analysis.js 50000126101155 "2026-03-26T15:00:00" "2026-03-27T15:00:00"

OKKI 背调分析

# 基本用法:对指定询盘进行背调分析
node run-okki.js \x3C询盘单号>

# 指定时间窗口
node run-okki.js \x3C询盘单号> \x3C开始时间> \x3C结束时间>

# 示例
node run-okki.js 50000126101155
node run-okki.js 50000126101155 "2026-03-26T15:00:00" "2026-03-27T15:00:00"

合并报告

# 将询盘报告和OKKI背调报告合并
node merge-reports.js \x3C询盘单号>

# 示例
node merge-reports.js 50000126101155

参数说明

参数 说明 示例
询盘单号 目标询盘的ID,分析该询盘及以上所有询盘 50000126101155
开始时间 时间窗口开始(可选) "2026-03-26T15:00:00"
结束时间 时间窗口结束(可选) "2026-03-27T15:00:00"

输出文件

询盘分析输出

文件 位置 说明
MD报告 reports/inquiry-report-*.md Markdown 格式的询盘分析报告
CSV报告 csv-reports/inquiry-report-*.csv Excel 友好的 CSV 格式报告
聊天记录 chats/inquiry-*.txt 原始聊天记录文本

OKKI 背调输出

文件 位置 说明
MD报告 okki-reports/okki-report-*.md Markdown 格式的背调报告
CSV报告 okki-reports/okki-report-*.csv Excel 友好的 CSV 格式报告

合并报告输出

文件 位置 说明
MD报告 reports/merged-report-*.md 合并后的完整报告
CSV报告 csv-reports/merged-report-*.csv Excel 友好的 CSV 格式

报告字段

字段 说明
询盘单号 询盘唯一标识
月份 登记月份
登记日期 询盘日期
询盘回复人 业务员姓名
产品型号 产品分类(厨房橱柜/工具柜/户外厨房等)
时间段 询盘时间
客户类型 有效客户/已读未回/未读未回
国家 客户所在国家
客户名称 客户姓名或公司名
L几 客户等级(L0-L4)

产品分类

系统支持动态产品分类,自动从阿里巴巴产品管理页面获取您的产品分组列表:

分类流程

  1. 缓存优先 — 使用本地缓存(7天有效)
  2. 动态获取 — 从产品管理页面抓取所有分组名
  3. 智能匹配 — 标题关键词 → 分组名匹配 → 产品类型
  4. 搜索兜底 — 未命中时搜索产品分组页面

分类来源

来源 优先级 说明
关键词匹配 1 内置产品关键词库
动态分组列表 2 从产品管理页面获取
产品搜索 3 在产品管理页面搜索标题
聊天内容分析 4 从聊天记录提取产品关键词

缓存文件

文件 说明
product-groups-cache.json 产品分组列表缓存(7天有效)
product-mapping.json 用户自定义分组→产品类型映射
title-cache.json 标题分类缓存(每次运行清除)
chat-products.json 聊天内容产品映射(可手动编辑)

首次运行配置

首次运行时,系统会自动检测产品分组并为每个分组分配建议的产品类型:

[自动配置] 正在为分组分配建议类型...
  Stainless Steel Kitchen Cabinet → 厨房橱柜
  Outdoor Kitchen Shed → 箱体户外厨房
  Tool Cabinet → 工具柜
  ...
[配置] 已保存映射到 product-mapping.json

如需自定义映射,可编辑 product-mapping.json

{
  "version": "1.0",
  "updatedAt": "2026-03-31T00:00:00.000Z",
  "mapping": {
    "Stainless Steel Kitchen Cabinet": "厨房橱柜",
    "Outdoor Kitchen Shed": "箱体户外厨房",
    "Tool Cabinet": "工具柜"
  }
}

自定义分类

如需自定义产品分类映射,可编辑以下文件:

# 编辑用户自定义映射
# 格式:{ "分组名": "产品类型" }
notepad product-mapping.json

# 清除分组缓存(强制重新获取)
del product-groups-cache.json

# 清除映射配置(重新自动配置)
del product-mapping.json

安全说明

child_process 使用声明

入口脚本使用 child_process.spawn 启动 Node.js 进程运行分析器:

  • 用途:隔离运行环境、传递命令行参数
  • 安全性:仅调用本地已知脚本,不执行任意命令
  • 替代方案:直接运行主脚本也可(需在正确目录下)

Relay Token 配置

Relay Token 在主脚本中配置(inquiry-analyzer.jsokki-background.js),建议:

  1. 生产环境使用环境变量覆盖
  2. 不要在公开仓库中提交真实 Token

注意事项

  1. 浏览器要求:必须使用 OpenClaw 浏览器,禁止使用 Puppeteer/Playwright 直接启动浏览器(会触发阿里巴巴反爬)
  2. 登录状态:运行前确保已在阿里巴巴登录
  3. 文件清理:系统自动清理旧文件,每个目录只保留最近 10 个文件
Usage Guidance
Things to consider before installing/using: - Hard-coded relay token: The code contains a literal RELAY_TOKEN in lib/inquiry-analyzer.js and lib/okki-background.js. Treat this as a potential secret leak; confirm where the token came from and rotate it if it's a real credential. Prefer replacing hard-coded tokens with environment-variable-based configuration (process.env) before use. - Dependency mismatch: The skill claims 'self-contained' and only declares node, but the code requires 'playwright-core' and an OpenClaw runtime. Ensure your environment provides Playwright/OpenClaw or adjust the code to use available libraries. - Platform assumptions: The code contains a Windows-specific OpenClaw path and fixed CDP URL. If you run on Linux/macOS, verify those paths and connectivity. - Data sensitivity: The tool scrapes Alibaba pages and extracts personal/company identifiers (names, emails, chat text). Run it only with accounts/data you control and consider using an isolated/test environment if you are concerned about data exfiltration. - Review network behavior: From the provided files there are no remote exfiltration endpoints, but confirm there are no hidden remote calls at runtime (e.g., telemetry in your OpenClaw environment). Run in a network-restricted environment or monitor outbound connections when you first execute it. - Safety-first: If you decide to use it, (1) remove or replace the embedded RELAY_TOKEN, (2) run initial tests with a throwaway Alibaba account or in a VM/container, (3) verify Playwright/OpenClaw connectivity, and (4) inspect logs/output to ensure only expected data is written to local files.
Capability Analysis
Type: OpenClaw Skill Name: inquiry-analyzer Version: 1.0.2 The skill bundle contains hardcoded sensitive credentials (a Relay Token: 856baea1afbe169e5eec0f6ecb5b90c77ddeb06b2abe1154) in 'lib/inquiry-analyzer.js' and 'lib/okki-background.js', which is a significant security vulnerability. Additionally, the entry scripts in the 'scripts/' directory use 'child_process.spawn' to execute local Node.js scripts; while this appears to be for legitimate environment isolation and parameter passing, the combination of hardcoded secrets and process spawning represents a high-risk profile. The code is designed to automate data scraping from Alibaba and OKKI CRM, which involves extensive DOM manipulation and browser control via a local OpenClaw relay.
Capability Assessment
Purpose & Capability
Name/description (Alibaba inquiry analysis) aligns with the code: scripts navigate Alibaba pages, extract chat/customer/company data, classify products, and write reports. Reasonable for this purpose. Minor mismatch: SKILL.md and README claim the skill is 'self-contained' and only requires node, but the code imports 'playwright-core' and expects an OpenClaw browser CDP endpoint; that implies runtime dependencies beyond plain Node and an OpenClaw runtime.
Instruction Scope
SKILL.md instructs to start the OpenClaw browser and login to Alibaba, which matches the code's behavior (it connects to a local CDP endpoint and scrapes pages). The scripts read and write many local files (cache, mapping, reports) — documented in SKILL.md. The code will extract personal/company identifiers (names, emails, company names) from pages — consistent with purpose but worth noting. The code also contains Windows-specific start path hints and will attempt to auto-start/connect to a local OpenClaw instance.
Install Mechanism
There is no install spec (instruction-only from registry perspective) which lowers risk, but the package includes code that requires 'playwright-core' and expects an OpenClaw runtime. That dependency is not declared in requires.bins and is not packaged here; the user environment must provide it. No remote download/install steps are present in the files provided.
Credentials
Two notable issues: (1) A RELAY_TOKEN value is hard-coded in lib/inquiry-analyzer.js and lib/okki-background.js ('856baea1afbe169e5eec0f6ecb5b90c77ddeb06b2abe1154'). SKILL.md advises using environment variables for relay tokens, but the code does not read process.env for the token — it uses the literal constant. Embedding a token in code is a credential management and leakage risk. (2) The code references a hard-coded OpenClaw module path (E:\Nvm\...) and a fixed CDP URL (http://127.0.0.1:18800), which are platform-specific and could fail or behave unexpectedly on non-Windows systems.
Persistence & Privilege
The skill is not set to always:true and does not request elevated system privileges. It reads and writes files in its working directory (reports, caches, mappings), which is expected for this tool and documented. It does not modify other skills or global system settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install inquiry-analyzer
  3. After installation, invoke the skill by name or use /inquiry-analyzer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
- Skill is now fully self-contained; all required core scripts have been added to the skill's own lib/ directory. - Dynamic product classification introduced: automatically fetches and manages product groups from Alibaba. - New configuration and mapping files for customizing product category logic: product-groups.js and product-mapping.js. - Installation steps simplified—external dependencies are no longer required for standard usage. - Documentation updated to describe dynamic product group fetching, cache usage, and how to customize product mapping.
v1.0.1
- 增加了适用于多环境的安装与路径配置说明,包括环境变量和目录结构指引 - 新增主分析器查找机制说明,提升运行脚本的灵活性与可用性 - 补充了 child_process 使用说明与安全注意事项 - 给出 Relay Token 配置建议,加强安全性 - 故障排除中新增“找不到主脚本”的应对方法 - 其他内容描述与表述更加结构化、详细
v1.0.0
- Initial release of inquiry-analyzer skill. - Analyze Alibaba inquiry data by time window and generate structured reports including product category, customer info, and country. - Supports report export in Markdown and CSV formats. - Integrates with OpenClaw browser for secure data access. - Includes OKKI background check report and report merging functions. - Automatic cleanup retains only the latest 10 files per output directory.
Metadata
Slug inquiry-analyzer
Version 1.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is inquiry analyzer?

阿里巴巴询盘分析技能 - 分析指定时间窗口内的询盘数据,提取产品分类、客户信息、国家等关键字段,生成结构化报告。当用户需要分析阿里巴巴询盘、生成询盘报告、运行询盘分析时使用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 120 downloads so far.

How do I install inquiry analyzer?

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

Is inquiry analyzer free?

Yes, inquiry analyzer is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does inquiry analyzer support?

inquiry analyzer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created inquiry analyzer?

It is built and maintained by likem90is-cmd (@likem90is-cmd); the current version is v1.0.2.

💬 Comments