跳到正文
cccskills
免费在 GitHub 公开

inventory_management

Use a defined database structure and business rules to query products, warehouses, stock levels, and stock movements. It supports inventory checks and SQL for identifying products whose combined warehouse stock has reached the reorder threshold.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Database schema and business logic for inventory tracking including products, warehouses, and stock levels.

查看安装方法

适用场景

  • Checking stock quantities by product and warehouse
  • Finding products at or below their reorder threshold
  • Understanding records for stock movements
  • Excluding discontinued products from routine analysis

包含的文件(1)

  • SKILL.md1.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Inventory Management Schema

Tables

products

  • product_id (PRIMARY KEY)
  • product_name
  • sku
  • category
  • unit_cost
  • reorder_point (minimum stock level before reordering)
  • discontinued (boolean)

warehouses

  • warehouse_id (PRIMARY KEY)
  • warehouse_name
  • location
  • capacity

inventory

  • inventory_id (PRIMARY KEY)
  • product_id (FOREIGN KEY -> products)
  • warehouse_id (FOREIGN KEY -> warehouses)
  • quantity_on_hand
  • last_updated

stock_movements

  • movement_id (PRIMARY KEY)
  • product_id (FOREIGN KEY -> products)
  • warehouse_id (FOREIGN KEY -> warehouses)
  • movement_type (inbound/outbound/transfer/adjustment)
  • quantity (positive for inbound, negative for outbound)
  • movement_date
  • reference_number

Business Logic

Available stock: quantity_on_hand from inventory where quantity_on_hand > 0

Products needing reorder: total quantity_on_hand across warehouses <= product's reorder_point

Active products only: Exclude discontinued = true unless analyzing discontinued items

Example Query

-- Find products below reorder point
SELECT p.product_id, p.product_name, p.reorder_point, SUM(i.quantity_on_hand) as total_stock
FROM products p
JOIN inventory i ON p.product_id = i.product_id
WHERE p.discontinued = false
GROUP BY p.product_id, p.product_name, p.reorder_point
HAVING SUM(i.quantity_on_hand) <= p.reorder_point;

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use defined customer and order tables to build sales analysis queries with consistent business rules. Calculate revenue from completed orders, rank customers by spending, and identify high-value orders using the supplied thresholds and SQL example.

中文简介正在准备中。当前显示英语简介。

  • Ranking the top ten customers by revenue over three months
  • Calculating revenue from completed orders
  • Finding orders with a total amount above 1,000
alibaba/spring-ai-alibaba1.1万2026年10月7日 更新

查看 alibaba 的全部技能

报告此技能的问题