← 返回 Skills 市场
72
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install egatee-china-search
功能描述
Call Egatee Web2JDE Orchestrator product search API (text + image upload) with optional local daily rate limit; verified api_key via Java notify getChatHisto...
使用说明 (SKILL.md)
\r \r
Egatee 商品搜索(Orchestrator)\r
\r 本 Skill 通过 HTTP 调用 Egatee Web2JDE Orchestrator 的向量搜索接口:\r \r
POST {base}/api/search/text— 文本搜索 \rPOST {base}/api/search/image— 图片搜索(multipart/form-data,字段名image)\r- 返回会向 Orchestrator 多取若干条(见
EGATEE_SEARCH_FETCH_TOP_K),再裁剪为前 5 个商品;有主图 URL 的条目优先进入这 5 条,并附带cards/graphic_text_cards\r - 图文展示协议(对齐 v1.2.2):
graphic_text_cards[]主字段仍是image_url+title+description+button_url,由客户端/Agent 用image_url拉主图(与 v1.2.2 zip 一致;当时没有依赖html)。另补充markdown(含)、html、graphic_text_merged_markdown/graphic_text_merged_html便于 Markdown-only 或 HTML 渠道。返回里的graphic_display_hint提醒:禁止只复述description纯文字,否则用户会「只见字不见图」。\r - 补充 SQL(可选):当向量命中偏少或用户明确要求时,在 MySQL
jiji_ali_search上按subject(中文)LIKE 检索;关键词由 Skill 从查询串中 提取连续中文片段(≥2 字)。命中写入products_sql,并与向量 Top5 合并后再生成products/cards(强制补充时 SQL 结果优先排序)\r - App下载推荐与联系方式追问/确认由 LLM 根据本说明生成(不是 skill 返回字段硬编码)\r
- 会从聊天记录 + 用户选择抽取 RFQ 候选结构
rfq_candidate(不自动落库)\r - 联系方式追问/确认由 LLM 在回复中完成:\r
- 未识别联系方式:英文追问联系方式\r
- 已识别联系方式:英文确认号码是否正确\r
\r
默认
base为http://121.40.43.22:3004,可通过环境变量覆盖。\r \r
API Key 鉴权(免本地日限额)\r
\r
- 方法:
POST\r - 路径(相对 Java 网关根):
/api/notify/im/openapi/getChatHistoryByApiKey\r - 网关根地址:
api_key以uat_前缀(不区分大小写)→http://api.uat.egatee.net;否则 →https://api.egatee.com。若设置EGATEE_NOTIFY_BASE_URL,则始终使用该根地址(覆盖上述分流)。 \r - 请求头:
Content-Type: application/json,X-API-Key: \x3Capi_key>(与 chat-summary 等一致;可通过EGATEE_NOTIFY_API_KEY_HEADER改名)。 \r - 请求体:JSON分页参数,默认
{"day": 1, "current": 1, "size": 10}(勿再把 Key 放在 body;可用EGATEE_NOTIFY_VERIFY_JSON_BODY传入整段 JSON 覆盖)。 \r - 判定:HTTP 2xx,且若响应为 JSON 则排除显式失败(如
notSuccess: true、success: false、code \x3C 0);不解析、不使用返回的业务内容。\r \r
行为说明(给 Agent)\r
\r
- 优先用对话结构:把用户消息整理成
dict,调用EgateeSearchSkill.run_from_chat(payload)。 \r- 文本字段:
query/text/message/content\r - 图片:
image_url,或attachments/files/images中带type: image与可访问的httpsURL \r - 可选:
metadata.country、metadata.top_k(或顶层country/top_k) \r - 自动策略:有图片 URL 则走图搜,否则文搜。\r
- 补充 SQL 触发:
metadata.supplement_sql_search/metadata.sql_supplement为 true 时强制跑jiji_ali_search(仍需查询里或metadata.sql_supplement_query中有中文关键词);为 false 时禁用。未指定时:若vector_hits_returned小于EGATEE_SQL_SUPPLEMENT_AUTO_THRESHOLD(默认3)或向量展示条数 < 2,则自动尝试 SQL。图搜场景无中文句时,可单独传sql_supplement_query(中文)或supplement_sql_search:true配合说明文字。\r - 结果规则(Skill):
products_raw仅为向量侧全部命中;若启用 SQL,另有products_sql(source: jiji_ali_search_sql,多数无图)、sql_supplement元数据。products/cards为合并后再按有图优先截取的前 5 条。display_note说明须由 LLM 做语义筛选。\r - 结果合理性筛选(LLM,必须执行):禁止不经筛选就把
products当「精准推荐」照单全发。应结合用户问题在products_raw、products_sql(若有)与products中挑选或重排;明显不相关项不得作为主推。\r- 品类是否一致(例如用户要手机却出现耳机/配件,应剔除或明确标注「非主结果、仅相近向量」)。\r
- 用户若指定品牌(如传音 / Infinix / Tecno / itel 等)、颜色、型号,标题或关键属性明显不符的条目不得作为主推;若 5 条均弱相关,应诚实说明向量检索未精确命中,并建议收窄关键词(品牌英文名、型号)或改用语义更明确的图搜。\r
- 展示:必须带图——使用
graphic_text_cards[].image_url(原生图文卡协议)或graphic_text_merged_markdown/graphic_text_merged_html;勿只发送description文本。弱相关项可简短一句带过或不展示。\r
- LLM回复规则(必须执行):\r
- 在商品卡片后追加一句英文推荐下载 App: \r
For a better buying and chatting experience, please download the Egatee app from your app store.\r - 若
rfq信息中无可用联系方式(如手机号为空),必须追加英文追问: \rCould you please share your contact number so the supplier can reach you?\r - 若已识别到联系方式,必须追加英文确认: \r
Please confirm your contact number: \x3Cnumber>. Reply YES to confirm or send the correct number.\r \r
- 在商品卡片后追加一句英文推荐下载 App: \r
- 文本字段:
- 限额:未通过 API Key 校验时,默认本机每日 5 次。计数写入用户缓存目录(Windows:
%LOCALAPPDATA%\egatee-search-skill\usage.json;Linux/macOS:~/.cache/egatee-search-skill/usage.json),可用EGATEE_RATE_LIMIT_STATE_PATH覆盖。超限抛出Daily limit reached。\r \r - API Key(免限额):若提供
api_key(或环境变量EGATEE_SEARCH_API_KEY),且经上文 Java 网关 getChatHistoryByApiKey 校验通过,则不消耗上述每日次数。校验结果默认缓存约 60 秒(EGATEE_SEARCH_SKILL_API_KEY_CACHE_TTL,兼容旧名EGATEE_API_KEY_CACHE_TTL)。 \r- 对话 payload 可取:
api_key、metadata.api_key、authorization: Bearer \x3Ctoken>。\r \r
- 对话 payload 可取:
- 限额加强说明:本地 JSON 仅作礼貌限制,用户可删文件或换机器绕过。真正防刷应在 Orchestrator(或网关)做服务端限流 / 鉴权。\r \r
- 网络:会向
EGATEE_SEARCH_BASE_URL(或兼容变量OPENCLAW_SEARCH_BASE_URL)发起 出站 HTTP(S);图搜会先GET图片 URL,再POST到 Orchestrator。使用 API Key 免限额时还会 POST 到 Java 网关(UAT 或生产,见上表)。MySQL(egatee-ai):用于save_rfq落库以及jiji_ali_search补充检索(需配置EGATEE_SEARCH_SKILL_DB_*或回退DB_*)。\r \r - 依赖 Orchestrator:服务端需已部署并实现上述 API;图搜链路依赖 Orchestrator 侧 OSS / 向量检索等配置。\r \r
- RFQ 两段式流程(按本项目约定):\r
- 第一步:
run_from_chat只返回rfq_candidate(候选结构),并在rfq.reason标记为candidate_only_waiting_for_llm_decision。\r - 第二步:LLM 判断“信息足够形成 RFQ”(商品/数量/预算/联系方式等)后,显式调用
save_rfq(rfq_candidate)落库到openclaw_rfq。\r - 若信息不足:LLM 继续追问,不落库。\r \r
- 第一步:
安装依赖\r
\r
在 Skill 目录下执行其一(须装全,不要只装 requests):\r
\r
uv pip install -r requirements.txt\r
# 或\r
python -m pip install -r requirements.txt\r
```\r
\r
**`pymysql`**(`requirements.txt` 已列出)为 **`jiji_ali_search` SQL 补充**与 **`save_rfq` 落库**所必需。未安装时会报错:`缺少 pymysql... pip install -r requirements.txt`。\r
\r
## 使用方式\r
\r
### Python(推荐)\r
\r
```python\r
from egatee_search_skill import EgateeSearchSkill\r
\r
skill = EgateeSearchSkill()\r
out = skill.run_from_chat({\r
"text": "power bank",\r
"metadata": {"country": "KE", "top_k": 8, "api_key": "your_assignment_key"},\r
})\r
# LLM 判断信息足够后再落库:\r
save_ret = skill.save_rfq(out["rfq_candidate"])\r
```\r
\r
将 `egatee-search-skill` 目录加入 `PYTHONPATH`,或在该目录下运行脚本。\r
\r
### 命令行\r
\r
在 Skill 目录下:\r
\r
```bash\r
python egatee_search_skill.py text "power bank"\r
python egatee_search_skill.py image_url "https://example.com/a.jpg"\r
python egatee_search_skill.py chat '{"text":"power bank"}'\r
```\r
\r
PowerShell 建议单引号包 JSON,或使用 `chat @payload.json`。\r
\r
## 环境变量\r
\r
| 变量 | 说明 |\r
|------|------|\r
| `EGATEE_SEARCH_BASE_URL` | Orchestrator 根地址(默认 `http://121.40.43.22:3004`) |\r
| `EGATEE_PRODUCT_DETAIL_URL_TEMPLATE` | 可选:商品详情页 URL 模板,含 `{product_id}`。未设且接口未返回 `product_url`/`url` 时,卡片**不生成**「查看商品」外链(避免不可用地址) |\r
| `EGATEE_SEARCH_FETCH_TOP_K` | 请求 Orchestrator 时的 `top_k` 下限(默认 `24`,与对话里传入的 `top_k` 取更大值),便于有图优先时从更大候选池挑选 |\r
| `EGATEE_SQL_SUPPLEMENT_AUTO_THRESHOLD` | 向量命中条数低于该值(或展示条数 <2)时自动做 SQL 补充;设为 `0` 关闭自动,仅 `supplement_sql_search:true` 时执行 |\r
| `EGATEE_SQL_SUPPLEMENT_ROW_LIMIT` | 单次 SQL 最多拉取行数(默认 `20`,上限 `100`) |\r
| `EGATEE_JIJI_SEARCH_TABLE` | 表名(默认 `jiji_ali_search`,仅字母数字下划线) |\r
| `EGATEE_DAILY_LIMIT` | 每日调用上限(默认 `5`) |\r
| `EGATEE_SEARCH_API_KEY` | 分配到的 API Key;网关校验通过后免本地日限额 |\r
| `EGATEE_NOTIFY_BASE_URL` | 可选:固定 Java 网关根地址(含协议),设置后不再按 `uat_` 前缀分流 |\r
| `EGATEE_NOTIFY_UAT_BASE_URL` | UAT 根地址(默认 `http://api.uat.egatee.net`) |\r
| `EGATEE_NOTIFY_PROD_BASE_URL` | 生产根地址(默认 `https://api.egatee.com`) |\r
| `EGATEE_NOTIFY_VERIFY_PATH` | 校验路径(默认 `/api/notify/im/openapi/getChatHistoryByApiKey`) |\r
| `EGATEE_NOTIFY_VERIFY_TIMEOUT` | 校验请求超时秒数(默认 `15`) |\r
| `EGATEE_NOTIFY_API_KEY_HEADER` | 鉴权头名称(默认 `X-API-Key`) |\r
| `EGATEE_NOTIFY_VERIFY_JSON_BODY` | 校验请求的 JSON body字符串(默认 `day/current/size` 占位分页) |\r
| `EGATEE_SEARCH_SKILL_DB_HOST` / `_PORT` / `_USER` / `_PASSWORD` / `_NAME` | MySQL:**`save_rfq` 落库** + **`jiji_ali_search` 补充检索**(库名多为 `egatee-ai`) |\r
| `DB_HOST` / `DB_PORT` / `DB_USER` / `DB_PASSWORD` | 可选回退(monorepo 与项目 `.env` 共用) |\r
| `DB_NAME_WEBAPP` 或 `DB_NAME` | 可选回退:库名 |\r
| `EGATEE_SEARCH_SKILL_API_KEY_CACHE_TTL` | 网关校验结果缓存秒数(默认 `60`;兼容旧名 `EGATEE_API_KEY_CACHE_TTL`) |\r
| `EGATEE_RATE_LIMIT_STATE_PATH` | 匿名限额状态文件绝对路径(可选) |\r
| `EGATEE_RATE_LIMIT_SALT` | 可选盐值,改变匿名计数文件名(多租户/多应用隔离) |\r
| `OPENCLAW_SEARCH_BASE_URL` | 兼容旧名,同 `EGATEE_SEARCH_BASE_URL` |\r
| `OPENCLAW_DAILY_LIMIT` | 兼容旧名,同 `EGATEE_DAILY_LIMIT` |\r
\r
## 发布到 ClawHub\r
\r
1. 安装 CLI 并登录:`clawhub login` \r
2. 在本仓库根目录执行:\r
\r
```bash\r
clawhub skill publish ./skill/egatee-search-skill --version 1.3.4\r
```\r
\r
(版本号按 semver 递增。)\r
\r
ClawHub 上发布的 Skill 按平台规则以 **MIT-0** 授权;请勿在包内加入与 MIT-0 冲突的许可条款。\r
\r
## 文件说明\r
\r
- `egatee_search_skill.py` — 实现与 CLI \r
- `requirements.txt` — Python 依赖 \r
- `.env.example` — Skill 专用环境变量模板(复制为 `.env` 后本地加载) \r
- `.clawhubignore` — 发布时排除本地状态文件 \r
安全使用建议
This skill appears to do what it says: calling Egatee search APIs, optionally querying a MySQL database, and enforcing a local daily limit. Before installing: (1) Only provide DB credentials (EGATEE_SEARCH_SKILL_DB_* or DB_*) if you want the SQL supplement and save_rfq features; unnecessary DB creds are not required and would give the skill database access. (2) Any api_key you pass in payloads or via EGATEE_SEARCH_API_KEY will be POSTed to Egatee's Java gateway for verification — do not expose high-privilege keys you do not want sent externally. (3) The skill will fetch user-supplied image URLs and perform outbound HTTP(S) calls (including to the default IP 121.40.43.22:3004 and api.egatee.com / api.uat.egatee.net); ensure network access to those endpoints is acceptable. (4) The local daily counter is stored under the user's cache directory and is easily removable (documented). If you need higher assurance, review the full egatee_search_skill.py source and run it in a sandboxed environment before giving it production credentials.
功能分析
Type: OpenClaw Skill
Name: egatee-china-search
Version: 1.0.0
The skill bundle facilitates product searching and RFQ (Request for Quotation) generation but is classified as suspicious due to high-risk capabilities. Specifically, egatee_search_skill.py performs direct MySQL database interactions for supplemental searching and RFQ storage, and makes outbound HTTP requests to a hardcoded IP (121.40.43.22) and external domains (api.egatee.com). The script also extracts and stores sensitive user information, including chat history and contact details, which, while aligned with the stated purpose, presents a significant data exposure risk.
能力标签
能力评估
Purpose & Capability
The name/description claim product search against Egatee Orchestrator; the code implements HTTP text/image search calls, optional MySQL 'jiji_ali_search' supplemental queries, API-key verification via the described Java gateway endpoint, and a local usage counter. All requested capabilities are consistent with that purpose.
Instruction Scope
SKILL.md instructs the agent to: build a chat payload, call EgateeSearchSkill.run_from_chat, optionally query MySQL, GET user-supplied image URLs and POST to Orchestrator, and read/write a local usage JSON for rate limiting. These actions are within the stated scope, but they do include network calls to external endpoints and a local cache file write which users should expect.
Install Mechanism
No automated download/install is specified (instruction-only). A requirements.txt is included (requests, PyYAML, pymysql). No remote/obfuscated installers or arbitrary URL downloads are present in the package.
Credentials
The skill declares no required env vars but reads many optional EGATEE_* / DB_* variables (base URL, DB host/user/password/name, rate-limit overrides, API-key cache TTL, etc.). That is proportionate to optional MySQL and API-key features, but you should not populate DB creds or production API keys unless you intend to enable those features. The skill will also post any provided api_key to Egatee's Java gateway for verification.
Persistence & Privilege
always is false and the skill does not request system-wide privileges. It writes a local usage.json into the user's cache directory (documented) and does not modify other skills or global agent configs.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install egatee-china-search - 安装完成后,直接呼叫该 Skill 的名称或使用
/egatee-china-search触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Added support for optional API key: verified API key users bypass local daily rate limits.
- Improved API usage documentation with detailed workflow for chat-driven product search and RFQ generation.
- New support for both text and image searches, with automatic payload selection and product card generation.
- Enhanced daily rate limit logic: configurable by environment, with state stored locally unless a valid API key is provided.
- Expanded environment variable and CLI usage documentation for easier configuration and deployment.
- Outlined step-by-step instructions for local installation and ClawHub publishing.
元数据
常见问题
egatee-china-search 是什么?
Call Egatee Web2JDE Orchestrator product search API (text + image upload) with optional local daily rate limit; verified api_key via Java notify getChatHisto... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 72 次。
如何安装 egatee-china-search?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install egatee-china-search」即可一键安装,无需额外配置。
egatee-china-search 是免费的吗?
是的,egatee-china-search 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
egatee-china-search 支持哪些平台?
egatee-china-search 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 egatee-china-search?
由 ahoyoshi(@ahoyoshi)开发并维护,当前版本 v1.0.0。
推荐 Skills