Skip to content
cccskills
FreePublished on GitHub

inventory-stock

Design inventory and stock control — availability tracking, optimistic locking to prevent overselling, reservations, multi-location, backorders, and restock forecasting. Includes a safety-stock/reorder-point calculator. Triggers: designing inventory, fixing overselling, forecasting restock.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3 stars(GitHub 3 + cccskills 0)

Run score Not tested

See how to install

Files included (2)

  • SKILL.md3.6 KB
  • scripts/restock_forecast.py6.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Inventory & Stock

Stock is where data integrity meets revenue: oversell and you lose trust, over-reserve and you lose sales. Design availability that is correct under concurrency and forecast restocks from real demand — platform-agnostic.

Before Starting

Gather: inventory model (single vs multi-location), sales velocity and lead times, fulfillment style (own stock, dropship, backorder), and goal (design the model, forecast restock, or audit for oversell risk).

How This Skill Works

ModeTriggerOutput
DesigndesignAvailability model + concurrency strategy
ForecastforecastSafety stock + reorder points (via script)
AuditauditOversell-risk and accuracy review

Phase 1 — Availability Model

Track three numbers per SKU per location, never one:

QuantityMeaning
on_handPhysically present
reservedAllocated to unfulfilled orders/checkouts
availableon_hand − reserved — the only number a shopper sees

Rule: Reserve at checkout start with a TTL; release on timeout/abandonment. Decrement on_hand at fulfillment, not at order placement.


Phase 2 — Preventing Overselling

The classic race: two shoppers buy the last unit. Defenses, in order of preference:

  1. Optimistic locking — version/row check on decrement; retry on conflict. Default choice.
  2. Atomic conditional update — UPDATE ... WHERE available >= qty and check rows-affected.
  3. Pessimistic lock — only for high-contention single rows; costs throughput.

Always treat "reserve stock" as a transaction that can FAIL and surface that to checkout cleanly. Multi-location adds an allocation step (which location fulfills) before the decrement.

For backorder rules, multi-location allocation strategies, and reservation TTL tuning, see the patterns above and hand off to order-lifecycle for fulfillment state.


Phase 3 — Restock Forecasting

Use the script to turn a sales CSV into reorder points:

python skills/inventory-stock/scripts/restock_forecast.py            # demo data
python skills/inventory-stock/scripts/restock_forecast.py sales.csv --lead-time 14 --service-level 0.95

It computes average daily demand, demand variability, safety stock (z × σ_demand × √lead_time), and reorder point (demand × lead_time + safety_stock). CSV columns: sku,date,units_sold.


Output Artifacts

RequestOutput
DesignAvailability model + chosen concurrency strategy
ForecastPer-SKU reorder point + safety stock table
AuditOversell-risk findings: PASS / FAIL per check

An inventory design PASSES when shoppers only see available, reservations expire, decrements are atomic/versioned, and forecasts drive reorder points instead of guesswork.


Related Skills

  • commerce-data-model: defines the SKU/variant that stock hangs off.
  • order-lifecycle: consumes reservations and triggers decrements at fulfillment.
  • cart-checkout: starts the reservation when checkout begins.
  • commerce-analytics: sell-through and turnover metrics that feed forecasts.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

See all skills by SebastianLuser

Report a problem with this skill