← 返回 Skills 市场
jexm

iccn-erp

作者 jexm · GitHub ↗ · v0.0.3
cross-platform ⚠ suspicious
395
总下载
0
收藏
2
当前安装
3
版本数
在 OpenClaw 中安装
/install iccn-erp
功能描述
【零壹问界IC ERP外贸管理系统】,提供查询数据的技能。当用户提到查询订单、采购单、需求单、入库单、出库单、客户、供应商、库存、现货等任何ERP业务数据时,必须使用此技能。触发词包括但不限于:"查订单"、"采购单详情"、"需求单"、"入库记录"、"出库情况"、"客户信息"、"供应商"、"现货库存"、"有没有货"...
使用说明 (SKILL.md)

ERP 系统查询技能

统一调用规范

所有查询统一使用以下方式:

  • 方法:POST
  • Content-Type:application/json
  • URL 格式{ERP_API_BASE_URL}/v1/{table}/lists
  • Token:从环境变量 ERP_API_TOKEN 读取
const ERP_TOKEN = process.env.ERP_API_TOKEN;
const ERP_BASE_URL = process.env.ERP_API_BASE_URL;

const erpQuery = async (table, params = {}) => {
  const url = `${ERP_BASE_URL}/v1/${table}/lists`;
  const body = {
    page: 1,
    pagenum: 50,
    like: {},
    where: {},
    order: {},
    ...params
  };
  const response = await fetch(url, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'authorization': `Bearer ${ERP_TOKEN}`
    },
    body: JSON.stringify(body)
  });
  return await response.json();
};

表格映射

用户说的 table 名称 说明
订单、销售单 order 销售订单
采购单、采购订单 purchase 采购单
需求单、需求 demand 需求单
入库单、入库记录 purchase_in 采购入库单
出库单、出库记录 order_out 销售出库单
客户、客户信息 customer 客户档案
供应商、供应商信息 supplier 供应商档案
现货、库存、有没有货 products_inventory 现货库存

查询参数说明

参数 类型 说明
page number 页码,默认 1
pagenum number 每页条数,默认 50
like object 模糊搜索,如 {"model":"ABC"}
where object 精确过滤,如 {"status":"1"}
order object 排序,如 {"created_at":"desc"}

调用示例

const data = await erpQuery('order', { where: { order_no: 'SO20240001' } });
const data = await erpQuery('products_inventory', { like: { model: 'ABS10' } });
const data = await erpQuery('customer', { like: { name: 'ABC公司' } });
const data = await erpQuery('supplier', { like: { name: '某供应商' } });
const data = await erpQuery('purchase', { where: { purchase_no: 'PO20240001' } });
const data = await erpQuery('purchase_in', { where: { purchase_no: 'PO20240001' } });
const data = await erpQuery('order_out', { where: { order_no: 'SO20240001' } });
const data = await erpQuery('demand', { like: { model: 'ABC123' } });

调用流程

  1. 识别意图:对照"表格映射"确定 table
  2. 提取参数:有单号用 where 精确匹配,有关键词用 like 模糊搜索,不足则主动询问
  3. 调用接口:使用 erpQuery(table, params) 发起请求
  4. 展示结果:以表格形式展示,标注总条数
  5. 报错处理:401 提示 Token 过期;空结果提示检查参数

注意事项

  • Token 和 API 地址通过环境变量注入,在 openclaw.jsonskills.entries.iccn-erp.env 中配置
  • 更换 Token 只需修改 openclaw.json,无需改动此文件
  • 模糊搜索用 like,精确匹配用 where,可同时使用
安全使用建议
This skill generally does what it says: it reads an ERP_API_TOKEN and ERP_API_BASE_URL and issues POST queries to the ERP. Before installing, verify the ERP_API_BASE_URL you set is the legitimate ERP endpoint and restrict the ERP_API_TOKEN with least privilege (read-only if possible). Inspect the included references/order-detail-ui.md: it fetches from https://dev.iccn.cc — confirm whether that host is trusted; if you don't trust it, do not reuse that example code. Ensure network policies or allowlists prevent the skill from sending data to unexpected external hosts. Finally, consider rotating the token after testing and monitoring its use (logs, egress) to detect unintended requests.
功能分析
Type: OpenClaw Skill Name: iccn-erp Version: 0.0.3 The skill bundle provides a standard integration for querying an ERP system (ICCN ERP). It correctly uses environment variables (ERP_API_TOKEN and ERP_API_BASE_URL) for authentication and defines clear mapping logic for various ERP tables like orders, inventory, and customers. The included React reference in order-detail-ui.md points to a domain (dev.iccn.cc) consistent with the skill's name, and there is no evidence of data exfiltration, credential theft, or malicious command execution.
能力评估
Purpose & Capability
Name/description (ERP queries) align with the declared env vars (ERP_API_TOKEN, ERP_API_BASE_URL) and the SKILL.md instructions which show how to call the ERP API. However, an included reference UI file contains a hard-coded fetch to https://dev.iccn.cc which is not mentioned anywhere else — an unexpected external endpoint.
Instruction Scope
SKILL.md runtime instructions are narrowly scoped to building POST requests to {ERP_API_BASE_URL}/v1/{table}/lists and explicitly read only ERP_API_TOKEN and ERP_API_BASE_URL. The instructions do not direct reading other system files or unrelated env vars.
Install Mechanism
Instruction-only skill with no install spec and no code files executed by the platform, so there is no install-time code download or archive extraction risk.
Credentials
The two requested environment variables (ERP_API_TOKEN, ERP_API_BASE_URL) are reasonable for the stated purpose. But the reference React file contains a hard-coded external URL (dev.iccn.cc) that would receive order numbers if that example is reused — this endpoint is not declared among required envs and could lead to unexpected data exfiltration if mistakenly used.
Persistence & Privilege
The skill does not request persistent privileges (always:false) and does not modify other skills or system settings. It relies on environment configuration in openclaw.json, which is normal.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install iccn-erp
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /iccn-erp 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.3
- 技能描述中增加了“零壹问界IC ERP外贸管理系统”品牌说明,更加明确系统来源。 - 其他文档内容和功能保持一致,无代码或接口变更。
v0.0.2
- Replaced hardcoded API base URL and token with environment variables (`ERP_API_TOKEN`, `ERP_API_BASE_URL`) for better security and flexibility - Updated API request examples to use environment variables - Simplified and clarified usage instructions and error handling - Added metadata section describing environment variable requirements - Now, configuration for token and URL is managed in `openclaw.json`, removing the need for code changes when updating credentials
v0.0.1
Initial release of iccn-erp skill. - Provides unified query interface for ERP system data including orders, purchase orders, inventory, customers, suppliers, etc. - Supports keyword-triggered automation for a wide range of ERP business data queries. - Standardizes API call format and parameter mapping for multiple ERP tables. - Includes examples and recommended best practices for querying and result presentation. - Handles error responses and token expiration guidance.
元数据
Slug iccn-erp
版本 0.0.3
许可证
累计安装 2
当前安装数 2
历史版本数 3
常见问题

iccn-erp 是什么?

【零壹问界IC ERP外贸管理系统】,提供查询数据的技能。当用户提到查询订单、采购单、需求单、入库单、出库单、客户、供应商、库存、现货等任何ERP业务数据时,必须使用此技能。触发词包括但不限于:"查订单"、"采购单详情"、"需求单"、"入库记录"、"出库情况"、"客户信息"、"供应商"、"现货库存"、"有没有货"... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 395 次。

如何安装 iccn-erp?

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

iccn-erp 是免费的吗?

是的,iccn-erp 完全免费(开源免费),可自由下载、安装和使用。

iccn-erp 支持哪些平台?

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

谁开发了 iccn-erp?

由 jexm(@jexm)开发并维护,当前版本 v0.0.3。

💬 留言讨论