ixhlink-skills-app-iwmt

This skill calls the “Inventory Management Table” API to perform inventory queries, entity disambiguation, product addition, and secure stock IN/OUT operations. It is suitable when users ask about inventory in natural language, perform inbound or outbound operations, parse product/warehouse/supplier/customer information, or mention inventory management or barcodes.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "ixhlink-skills-app-iwmt" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-82ba9fca1d0784dad9ba37eff402c91102e0395e04b5dd7cfcd1774c79c3834a. Verify the upstream source and version against https://skillhub.cn/skills/ixhlink/ixhlink-skills-app-iwmt before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

This skill calls the “Inventory Management Table” API to perform inventory queries, entity disambiguation, product addition, and secure stock IN/OUT operations. It is suitable when users ask about inventory in natural language, perform inbound or outbound operations, parse product/warehouse/supplier/customer information, or mention inventory management or barcodes.

0 Downloads

Introduction source: third_party · ixhlink · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: 进销存库存表
description: 调用「进销存库存表」接口完成库存查询、实体消歧、商品新增与安全出入库(IN/OUT);适用于用户以自然语言查库存、入库/出库、解析商品/库房/供应商/客户,或提及进销存、条码时。

目标

让 Agent 通过现有后端 API,安全完成以下操作:

  • 生成/使用用户级 AI Token
  • 查询库存(按条码、商品名、仓库)
  • 执行商品/仓库/客户/供应商消歧
  • 执行入库/出库(IN/OUT)

适用场景

  • 用户自然语言输入库存查询指令,例如:
    • 查下测试商品库存
    • 00001 在福建仓还有多少
    • 解析“苹果入库到A仓”前的候选实体(商品/仓库/供应商)
    • 确认后执行“入库2个测试到北京库房”

前置条件

  1. 后端服务可访问:基址为 https://iwmt.ixhlink.com/api(下文接口路径均相对于该基址,例如完整 URL 为 基址 + /aiStock/query)。
  2. 已有可用 X-AI-Token。
  3. 用户数据在当前 token 对应账号权限范围内可见(含主账号可见范围与员工数据权限)。

面向用户的输入约定(重要)

  • 与用户交互时,优先使用中文业务词:商品名、库房名、供应商名、客户名。
  • 不要求用户提供 supplierId/customerId/warehouseId 这类技术字段。
  • 若用户只给名称,Agent 必须先走消歧接口,拿到唯一候选后再执行。
  • xxxId 仅用于系统内部调用参数,不作为用户必填项。

接口能力清单

1)库存查询(AI Token)

  • GET aiStock/query
  • Header:X-AI-Token: <token>
  • Query 参数:
    • sku 或 goodsBarCode
    • goodsName 或 name
    • warehouseId 或 storehouseId(可选)
    • categoryId 或 categoryName(可选)
    • brandId 或 brandName(可选)

1.1)商品新增(AI Token)

  • POST aiGoods/create
  • Header:X-AI-Token: <token>
  • Body 参数(常用):
    • sku 或 goodsBarCode(选填,不传则系统生成)
    • goodsName 或 name(必填)
    • goodsUnit 或 unit(选填)
    • goodsCode(选填,不传默认与条码一致)
    • categoryName(选填,存在则关联,不存在则自动创建)
    • brandName(选填,存在则关联,不存在则自动创建)
  • 返回关键字段:
    • created=true:本次新建成功
    • created=false:商品已存在(幂等命中)

2)消歧接口(AI Token)

  • 仓库消歧:GET /aiResolve/warehouseSearch?keyword=...
  • 批量商品消歧:POST /aiResolve/productBatch
    • 请求头:X-AI-Token: <token>
    • 请求体:
      • items:数组,必填
      • items[].name:商品名称,必填
      • items[].unit:单位,选填(用于单位一致性判断)
    • 请求体示例:
      {
        "items": [
          {"name":"测试商品","unit":""},
          {"name":"苹果","unit":"个"}
        ]
      }
    • 返回关键字段:
      • results[].query:输入查询词
      • results[].candidates:候选商品列表(含 goodsId/sku/name/unit)
      • results[].needConfirm:是否需要用户确认
      • results[].reason:原因(如 NO_MATCH、MULTI_MATCH、UNIT_CONFLICT)
  • 客户消歧:GET /aiResolve/customerSearch?keyword=...
  • 供应商消歧:GET /aiResolve/supplierSearch?keyword=...
  • 分类消歧:GET /aiResolve/categorySearch?keyword=...
  • 品牌消歧:GET /aiResolve/brandSearch?keyword=...

3)库存事件执行(AI Token)

  • 批量出入库:POST aiInventoryEvent/batch
  • 请求体:
    • events:数组,必填
    • events[].eventType:IN 或 OUT
    • events[].warehouseId 或 events[].storehouseId:库房 ID,必填
    • events[].quantity:数量,必填且 > 0
    • 商品定位:sku 优先,或 goodsName/name(名称命中多个时会拒绝执行并返回候选)
    • 入库(IN)预检:supplierId 与 supplierName 至少传其一
    • 出库(OUT)预检:customerId 与 customerName 至少传其一

出入库:供应商与客户(batch 内补全,供 targetId/targetName)

服务端在写 record / 发起审批前,会把每条入库事件解析为同时有效的 supplierId(正整数)与非空 supplierName,出库同理为 customerId + customerName(对应单据上的 targetId / targetName)。

请求里传的 服务端行为
仅有 supplierId 按 ID + 当前 token 可见 userId 查 supplier 补全名称;若库中名称为空则用占位 供应商#<id>
仅有 supplierName 先精确匹配供应商名;若无则模糊最多 20 条,仅唯一一条时补全 supplierId;0 条或多条则本条失败
同时传 ID 与名称 以解析结果为准(名称仍可能按库表纠正)

出库 customerId / customerName 规则与上表对称(占位为 客户#<id>)。

失败时 results[].success=false,missingFields 含 supplier 或 customer,msg 为中文说明(须补充或指定 ID / 更精确名称)。

  • 返回关键字段(results[]):
    • success:是否执行成功
    • msg:执行结果消息
    • recordId:正式单据 ID(不经审批、直接落库时有值;走审批时多为 0)
    • approvalId:审批实例 ID(主账号已启用入库/出库审批且配置节点与审批人时返回,可在审批列表中查看)
    • beforeQuantity:执行前库存
    • afterQuantity:执行后库存展示值(不经审批:与落库一致,可按 before±quantity 理解;走审批:当前真实库存未变,与 beforeQuantity 相同)
    • expectedAfterApproval:仅走审批时返回,表示审批通过后的预期库存(入库为加、出库为减)
    • recordStatus:单据状态码
    • recordStatusText:单据状态中文
    • pendingApproval:是否处于待处理/处理中(可用于提示“可能尚未最终生效”)
  • 请求体示例:
    {
      "events": [
        {
          "eventType": "IN",
          "sku": "00001",
          "warehouseId": 3,
          "quantity": 2,
          "supplierId": 3,
          "description": "AI指令入库"
        }
      ]
    }

标准调用流程(必须遵循)

  1. 从自然语言抽取意图与关键字段(商品名/条码、仓库名、客户名、供应商名、数量、方向)。
  2. 若用户是“新增商品”意图,先调用 aiGoods/create,再进入查询或入库流程。
  3. 优先调用消歧接口,拿到候选列表。
  4. 若 needConfirm=true:
    • 向用户回问并让用户选择,不得猜测。
  5. 若执行 IN/OUT:
    • IN 时强制校验供应商(优先 supplierName,内部可转 supplierId)。
    • OUT 时强制校验客户(优先 customerName,内部可转 customerId)。
    • IN/OUT 都必须明确库房(优先 warehouseName,内部转 warehouseId/storehouseId)。
    • 调 aiInventoryEvent/batch 执行;该接口内会把供应商/客户补全为 ID + 名称 再落库或发起审批(见上文「出入库:供应商与客户」)。
    • 优先使用回执里的 beforeQuantity/afterQuantity 给用户反馈,再按需回查 aiStock/query。
  6. 若仅查询:
    • 调 aiStock/query 查询库存。
  7. 返回结构化结果,包含命中实体、执行结果与最新库存。

关键约束

  • 没有 X-AI-Token 时:不得调用需鉴权的业务接口;应停止并用中文提示用户补全凭证(例如在业务系统登录后生成 AI Token,将 Token 交给助手或在集成环境里配置请求头 X-AI-Token)。可将其理解为缺少 aiToken 这一隐含字段,需向用户追问或引导去后台生成,不得静默失败或编造数据。
  • 接口返回 401 且文案涉及未携带 Token / Token 无效时,助手须原样或转述给用户,并说明下一步如何获取或更新 Token(见上文)。
  • 消歧结果多个候选时,不得自动选第一项。
  • 执行入库/出库时,商品存在多个候选必须先确认,不得自动执行。
  • 出库(OUT)必须明确指定库房(用户给库房名称即可,系统内部解析ID)。
  • 入库(IN)未提供供应商时必须拒绝执行,并提示用户补充。
  • 出库(OUT)未提供客户时必须拒绝执行,并提示用户补充。
  • 对“商品存在但无库存记录”的场景,应识别为 quantity=0,而不是“商品不存在”。
  • aiStock/query 支持仅用分类/品牌查询,不强制必须传商品名或条码。
  • 新增商品成功后,若用户紧接着查询库存,应预期可能返回 quantity=0(尚未入库)。
  • 查询/消歧/执行的可见范围必须遵循 token 对应账号的数据权限范围。

输出规范(强制)

1)回复语言

  • 所有对用户的回复必须使用中文。
  • 不输出英文解释性句子(接口路径和字段名可保留英文)。

2)展示格式

  • 查询结果统一使用“类表格”展示,优先使用 Markdown 表格。
  • 结果为空时,也必须输出一行“未匹配/无库存”的表格记录,不直接只写空数组。

3)库存查询结果模板

商品条码 商品名称 仓库 库存数量 结果说明
00001 测试商品 福建 1 查询成功

4)空结果模板

商品条码 商品名称 仓库 库存数量 结果说明
00002 未匹配到商品 - - 当前账号下未查询到库存记录

5)消歧结果模板

消歧类型 查询词 候选数量 是否需要确认 说明
商品 苹果 2 是 存在多个候选,请用户确认

6)执行结果模板

操作类型 商品 仓库 数量 执行状态 说明
入库 测试商品(00001) 北京库房 2 成功 新增入库单成功

返回解释规范(给 Agent)

  • errno=0:请求成功
  • needConfirm=true:需要用户确认
  • results[].success=false 且 msg=商品存在多个候选,请先确认商品:必须二次确认商品后再执行
  • results[].success=false 且 msg=入库请提供supplierId或supplierName:必须补充供应商(用户侧用供应商名称即可)
  • results[].success=false 且 msg=出库请提供customerId或customerName:必须补充客户(用户侧用客户名称即可)
  • results[].success=false 且 msg 以「入库须具备有效的供应商信息」开头:batch 内无法把供应商解析为唯一 ID+名称,须传 supplierId 或更精确名称
  • results[].success=false 且 msg 以「出库须具备有效的客户信息」开头:同上(客户)
  • results[].success=false 且 msg=出库请提供warehouseId或storehouseId:必须补充库房(用户侧用库房名称即可)
  • results[].success=false 且 msg=入库请提供warehouseId或storehouseId:必须补充库房(用户侧用库房名称即可)
  • results[].success=false 且 msg=quantity必须大于0:数量参数不合法
  • results[].pendingApproval=true:建议提示用户“单据已提交,等待处理后库存可能更新”
  • candidates=[]:
    • 对消歧接口表示未匹配
    • 对库存查询需结合 query 判断是“无库存”还是“无商品”

示例

示例1:按商品名查库存

请求: GET aiStock/query?goodsName=测试商品

期望:

  • 返回 list 中每个仓库库存明细

示例1.1:新增商品后查库存(常见闭环)

新增请求体:

{
  "sku": "AI_DEMO_001",
  "goodsName": "演示商品",
  "goodsUnit": "件",
  "categoryName": "演示分类",
  "brandName": "演示品牌"
}

查询请求: GET aiStock/query?sku=AI_DEMO_001

期望:

  • 商品可查到
  • 若未入库,quantity=0

示例2:批量商品消歧

请求体:

{
  "items": [
    {"name":"测试商品","unit":""},
    {"name":"苹果","unit":"个"}
  ]
}

期望:

  • 命中多个候选时 needConfirm=true 且 reason=MULTI_MATCH
  • 无匹配时 needConfirm=true 且 reason=NO_MATCH

示例3:执行入库(成功,可仅 supplierId)

请求体:

{
  "events": [
    {
      "eventType": "IN",
      "sku": "00001",
      "warehouseId": 3,
      "quantity": 2,
      "supplierId": 3,
      "description": "AI指令入库"
    }
  ]
}

期望:

  • results[0].success=true
  • 服务端从库表补全 supplierName(库中无名称时用 供应商#3),审批/单据 targetId、targetName 均有值
  • 再调用库存查询可看到对应仓库库存增加

示例3.1:执行入库(成功,仅 supplierName 且唯一)

{
  "events": [
    {
      "eventType": "IN",
      "sku": "00001",
      "warehouseId": 3,
      "quantity": 1,
      "supplierName": "某某供应商全称"
    }
  ]
}

期望:名称在账号下唯一命中时 success=true;模糊命中多条则 success=false,须传 supplierId 或更精确名称。

示例4:执行入库(缺少供应商,失败)

请求体:

{
  "events": [
    {
      "eventType": "IN",
      "sku": "00001",
      "warehouseId": 3,
      "quantity": 2
    }
  ]
}

期望:

  • results[0].success=false
  • results[0].msg=入库请提供supplierId或supplierName

示例5:执行出库(成功)

请求体(可仅 customerId,名称由服务端补全):

{
  "events": [
    {
      "eventType": "OUT",
      "sku": "00002",
      "warehouseId": 3,
      "quantity": 1,
      "customerId": 2
    }
  ]
}

期望:

  • results[0].success=true
  • 返回 beforeQuantity/afterQuantity(例如 4 -> 3)
  • 返回 recordStatus/recordStatusText/pendingApproval

示例5.1:供应商/客户无法唯一解析(失败)

当仅传 supplierName/customerName 且命中 0 条或 2 条及以上时,success=false,missingFields 含 supplier 或 customer,应让用户从消歧结果中选 ID 或说全名后再调 batch。


建议的 Skill 配置系统提示词片段

你是进销存库存表的智能AI助手。先做消歧,后做查询或执行。
当候选不唯一时必须询问用户,不可自行决策。
所有查询请求都必须带 X-AI-Token。
不要让用户输入任何ID,优先让用户提供中文名称(商品/库房/供应商/客户)。
新增商品后,默认先查库存确认是否为0,再决定是否入库。
执行入库前必须确认供应商已提供。出库同理确认客户。
库存为0要明确告知“商品存在但当前库存为0”。
所有输出都使用中文,并以类表格方式展示结果。

后续扩展(二期)

  • 新增统一聚合接口:一次请求返回商品/仓库/客户/供应商四类候选
  • 增加 eventId 幂等键,避免 Agent 重试导致重复单据
  • 增加自然语言解析器(句子 -> 结构化参数)

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 解决企业进销存高频刚需,支持自然语言查询、商品新增、实体消歧与安全出入库全流程
  • 具备完整业务闭环,显著提升库存管理效率
Trigger Precision90/100

Highlights

  • 触发词覆盖完整(库存查询、入库/出库、商品/库房/供应商/客户解析、进销存、条码)
  • 边界清晰,不易与其他 Skill 重叠
Structure and Standards95/100

Areas to improve

  • 缺少独立 When to Use 章节 Reported severity: Minor

    适用场景已融入文档主体,但未设独立章节

    Recommendation: 建议增加独立 When to Use 章节以提升可读性

Highlights

  • 标准调用流程清晰(7步),含出口条件与门控
  • 提供5个完整端到端示例,覆盖成功与失败场景
  • frontmatter 完整,单文件结构合理
Execution Reliability90/100

Highlights

  • 接口来源明确,参数定义准确
  • 覆盖主要异常场景(401、候选冲突、供应商/客户缺失)
  • 不可逆操作强制用户确认,避免误执行
Evidence Verifiability (mean of the first four)92/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • iwmt.ixhlink.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.