restock-priority-alert
Skill8 starsChanged 45 days agoMITView on GitHub
Rank the Amazon FBA SKUs about to stock out by urgency - days of supply vs sales velocity, inbound-aware - with how many units to ship and by when, from DataDoe's FBA Inventory Health with Amazon's FBA restock recommendations as the fallback. Live from DataDoe. Use for "restock", "what's about to stock out", "days of supply", "reorder", "low inventory", "how much to ship in", or "stockout risk".
In this repository26 other files it gives its agents.
- amazon-asin-search-auditorSkill
- amazon-listing-optimizerSkill
- buy-box-loss-root-causeSkill
- create-amazon-reconciliation-dashboardSkill
- create-orders-managerSkill
- daily-account-health-checkSkill
- daily-performance-health-checkSkill
- fba-inventory-ledger-reportSkill
- fba-stock-restock-plannerSkill
- keyword-rank-sqp-trackerSkill
- net-profit-pl-analyzerSkill
- ppc-asin-acos-alertSkill
- ppc-bid-optimizer-applySkill
- ppc-campaign-acos-alertSkill
- ppc-negative-keyword-applierSkill
- ppc-profit-bid-applySkill
- ppc-wasted-spend-watchdogSkill
- promotions-managerSkill
- return-refund-analyzerSkill
- sales-movers-scannerSkill
- suppressed-inactive-listings-checkSkill
- vendor-inventory-reportSkill
- vendor-performance-dashboardSkill
- vendor-pnl-dashboardSkill
- weekly-business-reviewSkill
- weekly-sales-briefingSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Before a promo or peak season.
- Distinctive: line 68
Never render an empty catalog as "nothing to restock".
- Very specific: line 93
If enabled: false, go straight to the fallback (step 3b).
- Very specific: line 105
Do not pre-filter to "urgent" rows: a null days_of_supply (2,009 of those 7,560 rows) or a zero-stock row whose Amazon velocity reads 0 can …
- Very specific: line 132
If the inbound-inclusive days of supply is null/empty (slow, new or near-zero SKUs often are): daily velocity = (cross-checked 30-day …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Restock Priority Alert
The SKUs about to stock out, ranked by urgency, with how many units to ship and by when - from DataDoe's FBA Inventory Health (premium) with Amazon's own FBA Restock Recommendations as the fallback, plus a velocity sanity-check against real sales. Stops the silent revenue loss of a hero SKU going to zero.
<!-- TODO(Riegel, Q5): primary restock source still to be decided - inventory_health
(premium; the empty table seen in July was most likely an initial-load state) vs
restock_recommendations (free, optional, multi-country). Until answered,
inventory_health is primary with an emptiness guard that falls back to
restock_recommendations. -->When to use this
- Weekly (or daily) restock planning.
- Before a promo or peak season.
- "What's about to run out / what do I need to ship."
- Trigger phrases: "restock", "what's about to stock out", "days of supply", "reorder", "low inventory", "how much to ship in", "stockout risk".
The framework. Rank by time-to-zero, not by units
- Out now -
available = 0(or, on the fallback source,alert = out_of_stock) with recent velocity (real 30-day units sold, cross-checked againstamazon_profit_by_sku_and_date- see workflow) and little/no inbound. Losing sales right now. Top priority. - Imminent - inbound-aware days of supply
(
total_days_of_supply_including_units_from_open_shipmentson both sources - inventory health'sdays_of_supplycounts on-hand FBA stock only; oralert = low_stockon the fallback) below your lead time (default 30d) - on-hand + inbound won't cover it in time. - Covered - healthy days of supply (fallback:
alert = ""). Skip. Order by severity, then fewest days of supply. Attach Amazon's recommended ship-in quantity and date - but sanity-check the quantity against real 30-day velocity first (an implausible reco is noise, not a signal).
Configuration
- MCP base:
https://mcp.datadoe.com/mcp/v1 - Primary source:
FBA Inventory Health(amazon_fba_inventory_health) [premium]. Daily snapshot - use the latestdate. Columns:sku,child_asin,product_name,available,inbound_quantity,days_of_supply,total_days_of_supply_including_units_from_open_shipments,units_shipped_t30,units_shipped_t7,recommended_ship_in_quantity,recommended_ship_in_date,fba_inventory_level_health_status. Not available in MX.days_of_supplyis on-hand FBA stock at recent sales;total_days_of_supply_including_units_from_open_shipmentsadds inbound (one UK snapshot: higher on 611 of 802 SKUs with inbound, equal where inbound is 0) - rank "imminent" on the second. Emptiness guard: Premium note: a premium export costs 5 AI Tokens instead of 2 - nothing else differs, and the table is part of the always-on default dataset, so it is never disabled. A 0-row export means no data in the window or an initial load still in progress - say which, and switch to the fallback below ("FBA Inventory Health returned no rows (initial load may still be running) - using Amazon's restock recommendations instead"); never render zeros. Never render an empty catalog as "nothing to restock". - Fallback source:
FBA Restock Recommendations(amazon_fba_restock_recommendations, free) - Amazon's own restock report. Per SKU/day:sku,child_asin,product_name,available,inbound(+working/shipped/receivingbreakdown),days_of_supply_at_amazon_fulfillment_network,total_days_of_supply_including_units_from_open_shipments,alert(out_of_stock/low_stock/""),recommended_replenishment_qty,recommended_ship_date,units_sold_last_30_days,country. Multi-country table: one UK seller returned DE/ES/FR/GB/IT rows (43k rows a day); always filtercountry = <marketplace code, e.g. GB>or a UK ranking is built from other marketplaces' rows and holds zero GB rows. Multiple dates per SKU - collapse toMAX(date); state the snapshot date and flag staleness (the data can lag - 13 days behind in an October run). - Velocity cross-check:
Profit by SKU & Date(amazon_profit_by_sku_and_date) [premium] - real units sold per SKU and perchild_asin. Velocity columns on the inventory tables are per SKU: sibling SKUs of a live ASIN read 0 (1,694 "dead" SKUs on selling ASINs in testing), so judge velocity perchild_asin(sum this table over the ASIN's SKUs) before calling a SKU dead or a recommendation "noise". If this table is unavailable (0 rows), sumunits_shipped_t30/units_sold_last_30_daysacross the ASIN's SKUs and say the velocity is Amazon's own figure. - Lead time / target cover: ask the user (default 30 days).
Step-by-step workflow (MCP-native)
sellers_and_vendors_list-> pick the seller.exports_sources_get(query "inventory health") -> checkamazon_fba_inventory_health. Ifenabled: false, go straight to the fallback (step 3b). Also checkamazon_fba_restock_recommendationsandamazon_profit_by_sku_and_date.- a) Primary: two exports on
amazon_fba_inventory_health.- Availability and snapshot date:
from= 3 days ago,to= today,groupBy ["date", "marketplace_country_code"],count(sku), no other filter. No row for the marketplace means the table is unavailable (no data yet, or an initial load still running) - run step 3b and say so. Otherwise the newestdateis the snapshot (a 2-day range would return two snapshots). - The whole snapshot, classified in code:
from=to= that date, filtermarketplace_country_code = <marketplace>, columns as listed above, CSVlimit 5000,orderByColumn sku, and page withskipuntil a page returns fewer rows (row caps are 1,000 JSON / 5,000 CSV; 7,560 rows = 2 pages on one UK account). Do not pre-filter to "urgent" rows: a nulldays_of_supply(2,009 of those 7,560 rows) or a zero-stock row whose Amazon velocity reads 0 can still be selling per the profit table, and step 5 can only rescue rows it receives - 25 SKUs on that snapshot had under 30 days of cover by real sales and a nulldays_of_supply. A pre-filtered export that returns 0 rows also proves nothing about the table being available. Do not rely on sorting either:days_of_supply ASCputs the nulls first and a truncated page keeps the wrong rows. b) Fallback:exports_createforamazon_fba_restock_recommendations, columns:sku,child_asin,product_name,available,inbound,days_of_supply_at_amazon_fulfillment_network,total_days_of_supply_including_units_from_open_shipments,alert,recommended_replenishment_qty,recommended_ship_date,units_sold_last_30_days,date,country, filtercountry = <marketplace code>(multi-country table - see Configuration). Same row caps; pullalert IN (out_of_stock, low_stock)server-side, then sort byalert(out_of_stock first) andtotal_days_of_supply_including_units_from_open_shipmentsASC; paginate if a page fills tolimit. Say in the output which source the ranking is built on, and that this fallback trusts Amazon'salert: a SKU Amazon marks healthy never reaches the velocity cross-check.
- Availability and snapshot date:
- Poll, download, and collapse to
MAX(date)per SKU so you rank on one current snapshot, not a mix of days. Record the snapshot date; flag the lag if it is well behind today. - Velocity cross-check + fallbacks + sanity checks:
- Cross-check velocity (important): pull real 30-day units sold per SKU from
amazon_profit_by_sku_and_date(a premium export, 5 AI Tokens) and use it as the authoritative velocity. Treat a SKU as dead stock (skip it) only if BOTH sources show no sales; if the profit table shows sales, it is a live seller regardless of the inventory table. - If the inbound-inclusive days of supply is null/empty (slow, new or near-zero SKUs
often are): daily velocity = (cross-checked 30-day units, else
units_shipped_t30) / 30; on-hand days =available / velocity; inbound-inclusive days =(available + inbound_quantity) / velocity(fallback:inbound). Bucket on the inbound-inclusive days like every other row and show the on-hand days beside it - inbound that lands after the on-hand days run out still leaves a gap. - A zero-stock row whose Amazon velocity reads 0 but whose profit-table sales are real is out now (when inbound is little or none), not dead stock.
- Sanity-check the recommended quantity (
recommended_ship_in_quantity/recommended_replenishment_qty) against the cross-checked velocity: a reco wildly out of line (e.g. a 4,000-unit reco on a SKU truly selling ~0) is flagged "verify against sales velocity", not surfaced blindly. Prefer Amazon's reco when it is plausible. - The recommended ship date is frequently null (100% null on the fallback source in testing) - render "n/a", do not imply a date exists; drive urgency off days-of-supply.
- Cross-check velocity (important): pull real 30-day units sold per SKU from
- Bucket (out-now / imminent / covered / dead) on the inbound-inclusive days of supply
(step 5 computes it when null) plus
alerton the fallback source, and render most urgent first.
Output format
Restock Priority - {marketplace} - snapshot {date} {STALE if lagging} (lead time {L}d)
Source: FBA Inventory Health | FBA Restock Recommendations (fallback - inventory health returned no rows)
OUT NOW (available 0 / alert out_of_stock, losing sales)
SKU avail 30d-sold inbound ship-in by qty check
{sku} 0 {n} {n} {qty} {date} ok / verify vs velocity
IMMINENT (DoS incl. inbound < {L}d / alert low_stock)
SKU avail DoS 30d-sold inbound ship-in by
{sku} {n} {d} {n} {n} {qty} {date}
Covered: {count} SKUs OK. Dead stock (no sales): {count} - not restocked.Worked example (illustrative)
SKU A: available 1, ~24 units sold in the last 30d (~0.8/day), only 18 inbound, DoS
~0. Amazon's recommended quantity ~86 by a date this week -> OUT-NOW priority; ship the
recommended quantity.
SKU B: available 0, sells ~65/mo, but ~418 already inbound -> covered soon, lower
priority despite being at zero (inbound covers it).
SKU C: out of stock, 0 units sold in 30 days on both sources, recommended quantity 4357 ->
implausible for a non-seller; flag "verify against sales velocity", don't ship it.
That inbound-aware ranking is the point: at-zero alone isn't the trigger; at-zero
without enough inbound is - and Amazon's reco is a suggestion to sanity-check, not gospel.
Quality self-check
- Did I check availability with an unfiltered count on the latest dates (never with a
filtered export), and fall back to
amazon_fba_restock_recommendations(saying so) instead of reporting "nothing to restock"? - Did I collapse to
MAX(date)per SKU and state the snapshot date (and flag it if stale)? - Did I rank on the inbound-inclusive days of supply
(
total_days_of_supply_including_units_from_open_shipments, notdays_of_supply)? - Did I fall back to 30-day velocity when days-of-supply is null, and skip no-velocity dead stock (don't restock a non-seller)?
- Did I sanity-check the recommended quantity against velocity before surfacing it?
- Did I judge velocity per
child_asin(sibling SKUs of a live ASIN read 0 on their own) usingamazon_profit_by_sku_and_datewhere available? - Did I filter
country/marketplace_country_codeto the seller's marketplace? - Did I page through the whole latest snapshot and classify in code, so null-DoS and zero-velocity rows reach the velocity cross-check?
Common mistakes
- Reporting "nothing to restock" because
amazon_fba_inventory_healthcame back empty - the initial load may not have finished; use the fallback source and say so. - Flagging at-zero SKUs that already have plenty inbound.
- Recommending restock for dead stock (0 sales) - that's a removal decision, not restock.
- Ignoring null days-of-supply instead of computing from velocity.
- Using a stale snapshot (multiple dates) - collapse to MAX(date), and flag the lag.
- Trusting one sorted page on a multi-thousand-SKU catalog - caps are 1,000 JSON / 5,000
CSV and
days_of_supply ASCsorts nulls first; page through the whole snapshot. - Pre-filtering the inventory export to "urgent" rows - null-DoS and zero-velocity rows never reach the velocity cross-check, and an empty urgent set looks like an unavailable table.
- Treating
days_of_supplyas inbound-aware - it counts on-hand stock only; rank ontotal_days_of_supply_including_units_from_open_shipments. - Forgetting the
countryfilter onamazon_fba_restock_recommendations- a UK ranking built from DE/ES/FR rows. - Surfacing Amazon's recommended quantity blindly - sanity-check it against real velocity (a 4,000-unit reco on a 0-sales SKU is noise).
- Calling a SKU dead from its own
units_sold_last_30_days/units_shipped_t30- sibling SKUs of a selling ASIN read 0; judge velocity perchild_asin(and a 4,452-unit reco on a sibling SKU of an ASIN selling 2,775 units a month is not noise). - Promising a ship date -
recommended_ship_dateis often null; render "n/a" and rank on days-of-supply instead.
Notes
- Read-only.
- Pairs with a removal / excess-inventory skill for the opposite problem (overstock).
- A DataDoe skill, built on
amazon_fba_inventory_health(premium) withamazon_fba_restock_recommendations(Amazon's native restock report) as the fallback, cross-checking velocity againstamazon_profit_by_sku_and_date.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

