True COGS per Batch Tracking with Claude Code for Amazon Sellers
- Seller task
- Track ingredient and packaging costs per production batch across 3PL and FBA
- Agent / tool
- Claude Code
- Source
- X post by haitham (@theonlyhaitham)
- Date
- Feb 2, 2026
What they did
A solo CPG founder with inventory split between a 3PL and Amazon FBA built an inventory tracker with Claude Code over a weekend. It tracks ingredients, packaging, purchase dates, costs and BOMs across SKUs and production runs to calculate true COGS per batch.
How it went
He says he 'immediately saw my real COGS' and had more margin than he thought, so he could spend more on advertising. He estimates he saves at least $300/month on software.
We only report what the source says. Results are self-reported unless noted.
Worth knowing
This replaced an Excel workflow that broke down as production runs got closer together.
Copy-paste prompt
Build me a simple local web app to track COGS per production batch. Inputs: purchases (date, item, quantity, total cost) for ingredients and packaging; BOMs per SKU; production runs (date, SKU, units made, which purchase lots were consumed). Output: COGS per unit for each batch, plus a current weighted COGS per SKU across inventory at my 3PL and at Amazon FBA. Use SQLite. Ask me questions before you start coding.
The source didn't publish its exact prompt. We wrote this starter so you can try the same workflow. Replace anything in [brackets].