Skip to content
Skills Library
Sales & customer service · Automation

commerce-inventory

/commerce-inventory

Use when managing stock levels, inventory adjustments, or reservation workflows.

Licence
MIT
Last repository change
22.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when managing stock levels, inventory adjustments, or reservation workflows.

Original author description

Use when managing stock levels, inventory adjustments, or reservation workflows.

How it works

  1. Inventory Concepts
  2. Inventory Item Structure
  3. Inventory Operations
  4. Reservation Structure
  5. Transaction Types
  6. Stock Level Alerts
  7. Common Workflows
  8. Multi-Location Inventory
  9. Reservation Expiration
  10. Common Errors
Original SKILL.md headings · 218 lines, 693 words
SKILL.md preview
---
name: commerce-inventory
description: Use when managing stock levels, inventory adjustments, or reservation workflows.
---

# Commerce Inventory Skill

Domain knowledge for inventory management, stock tracking, and reservation systems.

## Inventory Concepts

### Stock Quantities

| Quantity | Description | Formula |
|----------|-------------|---------|
| `onHand` | Physical units in warehouse | Actual count |
| `allocated` | Reserved for orders | Sum of reservations |
| `available` | Can be sold | onHand - allocated |

### Key Formula
```
Available = On-Hand - Allocated
```

### Example
```
On-Hand:    100 units (physical inventory)
Allocated:   25 units (reserved for orders)
Available:   75 units (can be sold)
```

## Inventory Item Structure

```javascript
{
  id: "uuid",
  sku: "WIDGET-001",
  name: "Premium Widget",
  description: "High quality widget",

  // Quantities
  totalOnHand: 100,
  totalAllocated: 25,
  totalAvailable: 75,

  // Thresholds
  reorderPoint: 20,
  reorderQuantity: 50,

  // Location breakdown
  locations: [
    { locationId: "warehouse-1", onHand: 60, allocated: 15 },
    { locationId: "warehouse-2", onHand: 40, allocated: 10 }
  ],

  createdAt: "2024-01-15T10:30:00Z",
  updatedAt: "2024-01-15T12:00:00Z"
}
```

## Inventory Operations

### Adjustments

| Type | Quantity | Use Case |
|------|----------|----------|
| Positive | +N | Received shipment, found inventory |
| Negative | -N | Damaged, lost, shrinkage |

Always document reason:
- "Received shipment PO-12345"
- "Damaged in warehouse - 3 units"
- "Cycle count correction"
- "Promotional giveaway"

### Reservations

Reservation lifecycle:
```
[Available] ──► [Reserved] ──► [Confirmed] (deducted)
                    │
                    └──────────► [Released] (returned)
```

| Action | Effect |
|--------|--------|
| Reserve | Available ↓, Allocated ↑ |
| Confirm | Allocated ↓, OnHand ↓ |
| Release | Allocated ↓, Available ↑ |

## Reservation Structure

```javascript
{
  id: "uuid",
  sku: "WIDGET-001",
  quantity: 5,

  referenceType: "order",
  referenceId: "order-uuid",

  status: "pending",  // pending, confirmed, released, expired

  expiresAt: "2024-01-15T11:00:00Z",
  createdAt: "2024-01-15T10:45:00Z"
}
```

## Transaction Types

| Type | Description |
|------|-------------|
| `adjustment_in` | Manual increase |
| `adjustment_out` | Manual decrease |
| `sale` | Sold (order fulfilled) |
| `return` | Returned from customer |
| `transfer_in` | Received from location |
| `transfer_out` | Sent to location |
| `reservation` | Stock reserved |
| `release` | Reservation released |

## Stock Level Alerts

| Level | Condition | Action |
|-------|-----------|--------|
| `ok` | Available > reorderPoint | Normal |
| `low` | Available ≤ reorderPoint | Consider reorder |
| `critical` | Available ≤ reorderPoint/2 | Urgent reorder |
| `out` | Available = 0 | Stop selling |

## Common Workflows

### Receive Inventory
```
1. get_stock(sku) - Check current levels
2. adjust_inventory(sku, +quantity, "Received PO-12345")
3. Verify new levels
```

### Order Fulfillment
```
1. reserve_inventory(sku, qty, "order", orderId)
2. [Process order...]
3. confirm_reservation(reservationId)
   OR
   release_reservation(reservationId) if cancelled
```

### Cycle Count
```
1. get_stock(sku) - Get system count
2. Physical count
3. If different:
   adjust_inventory(sku, difference, "Cycle count correction")
```

### Write Off Damaged
```
1. get_stock(sku) - Check current
2. adjust_inventory(sku, -damaged, "Damaged - [details]")
3. Document with photos (external)
```

## Multi-Location Inventory

When using multiple warehouses:

```javascript
// Total stock
totalOnHand: 100

// By location
locations: [
  { locationId: "east", onHand: 60 },
  { locationId: "west", onHand: 40 }
]
```

Operations can specify location:
- Reserve from specific location
- Adjust specific location
- Transfer between locations

## Reservation Expiration

Default: 15 minutes (900 seconds)

Expired reservations:
- Automatically released
- Stock returns to available
- Associated order may need attention

Custom expiration:
```javascript
reserve_inventory({
  sku: "WIDGET-001",
  quantity: 5,
  referenceType: "order",
  referenceId: "uuid",
  expiresInSeconds: 3600  // 1 hour
})
```

## Common Errors

| Error | Cause | Solution |
|-------|-------|----------|
| `SKU not found` | Invalid SKU | Create inventory item |
| `Insufficient stock` | Not enough available | Check levels, adjust |
| `Reservation expired` | Timed out | Create new reservation |
| `Already confirmed` | Duplicate confirm | No action needed |
| `Negative stock` | Over-adjustment | Verify physical count |

## Best Practices

1. **Always check before adjust** - View current levels first
2. **Document all changes** - Include reason in every adjustment
3. **Use reservations** - Don't directly deduct for orders
4. **Monitor reorder points** - Set appropriate thresholds
5. **Regular cycle counts** - Verify physical vs system
6. **Handle expiration** - Clean up expired reservations

Versions

The database has no other skills named commerce-inventory.

Database snapshot: 13.11.2026 · package version ddcfe7ae9b20 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100spree-inventory
    Use when working with stock in Spree 6 — StockLevel counters (count_on_hand, allocated_count, reserved_count, incoming_count, available/purchasable), stock locations (kind, pickup_enabled, returns_enabled), stock movements and their kinds, checkout stock reservations and their…
  • 100commerce-orders
    Use when managing order lifecycles, fulfillment workflows, or order status transitions.
  • 90d365-commerce
    Review Dynamics 365 Commerce across omnichannel retail operations — Store Commerce POS, e-commerce storefront, call center channels, Commerce Scale Unit, channel management, product catalogs and assortments, pricing and discounts, inventory visibility, and store operations. Use…
  • 100commerce-analytics
    Use when analyzing sales performance, customer metrics, inventory health, or generating forecasts.
  • 100warehouse-optimization
    E-commerce warehouse and inventory optimization advisor. Analyzes inventory health, calculates safety stock and reorder points, performs ABC analysis, evaluates fulfillment costs, and provides actionable recommendations for improving efficiency. Supports all major fulfillment…
  • 90managing-ecommerce-inventory
    Use when managing ecommerce inventory is required during ecommerce product work, especially when the result must be traceable, independently reviewable, and safe to hand to another agent.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.