cogs-tracking-allocation
FreeNo executable scriptsNot checkedTrack cost of goods sold and landed costs using your platform's built-in tools or accounting integrations to compute accurate gross margin per order
by finsilabs★ 69 GitHub starsAbout this skill
COGS Tracking and Allocation
Overview
Tracking Cost of Goods Sold (COGS) tells you the actual gross margin on every order — revenue minus what you paid for the products you sold. Most platforms let you enter a cost price per product, and accounting integrations (QuickBooks, Xero) use that to generate COGS entries automatically. Landed cost allocation (freight, customs, duties) requires either a dedicated app or manual allocation in your accounting software. Only build a custom COGS system if your platform cannot meet your costing method requirements (FIFO, weighted average).
When to Use This Skill
- When your income statement shows revenue but you cannot compute gross margin because unit costs are not tracked
- When importing goods internationally and needing to allocate freight, customs, and duties into the landed cost of each SKU
- When switching from periodic (year-end count) to perpetual (real-time) cost tracking
- When building variance analysis reports to identify SKUs where actual purchase costs are drifting from standard costs
- When an ERP integration (QuickBooks, NetSuite, Xero) requires COGS journal entries at time of sale
Core Instructions
Step 1: Determine platform and choose the right approach
| Platform | Recommended Approach | Why |
|---|---|---|
| Shopify | Enter cost per variant in Admin; use Shopify Analytics or connect QuickBooks/Xero for COGS reporting | Shopify stores cost price per variant; profit reports use this for margin calculation |
| WooCommerce | Enter purchase price per product; connect WooCommerce Bookings + accounting plugin or Metorik for margin reports | WooCommerce stores cost price natively; Metorik provides profit analytics |
| BigCommerce | Purchase cost field per product; connect to QuickBooks via built-in integration | BigCommerce has a cost price field; the QuickBooks integration auto-posts COGS |
| Custom / Headless | Build a cost ledger with FIFO/weighted-avg logic and accounting journal entries | Required when none of the above integrations meet your costing method or reporting needs |
Step 2: Enter cost prices per product
Before any COGS reporting is possible, every product variant needs a cost price.
Shopify
- Go to Admin → Products → [Product] → [Variant]
- Under Pricing, enter the Cost per item field
- Shopify's Analytics → Finances → Product sales by variant report will then show profit per product
For bulk cost updates: use Matrixify (App Store) to import a CSV with cost per SKU — the column is Variant Cost.
WooCommerce
- Go to WooCommerce → Products → [Product] → Inventory tab
- Enter the value in the Purchase cost field (requires WooCommerce Cost of Goods plugin or the field added by your theme/plugin)
- For reporting: install Metorik or connect QuickBooks for WooCommerce — both read the cost field and generate gross margin reports
Popular COGS plugins for WooCommerce:
- WooCommerce Cost of Goods (SkyVerge) — adds cost field, generates margin reports
- Metorik — analytics dashboard showing profit per product, order, and channel
BigCommerce
- Go to Products → [Product] → Pricing
- Enter the value in the Cost Price field
- Connect QuickBooks Online via Apps → BigCommerce for QuickBooks — it maps cost price to COGS entries automatically
Step 3: Connect accounting software for COGS journal entries
The cost price field alone only enables reporting inside the platform. For your P&L and balance sheet, connect an accounting integration that posts COGS when orders are fulfilled.
Shopify → QuickBooks / Xero
- QuickBooks Online: Install QuickBooks Connector by OneSaas from the Shopify App Store. Configure: Sales → Fulfilled orders post to COGS account; map products to QuickBooks items
- Xero: Install Xero by Amaka or A2X from the Shopify App Store. A2X is the most widely used — it batches daily Shopify sales into summarized Xero journal entries including COGS
A2X is strongly recommended for Shopify + Xero — it handles currency conversion, refunds, fees, and COGS automatically.
WooCommerce → QuickBooks / Xero
- QuickBooks: Install QuickBooks Commerce or MyWorks Sync (most reliable WooCommerce ↔ QuickBooks sync)
- Xero: Install Xero for WooCommerce by Zapier or Xero Bridge by Parex for direct sync
BigCommerce → QuickBooks
- Use the built-in BigCommerce for QuickBooks app from the Apps marketplace
- Configure COGS mapping under Settings → Accounting → Cost of Goods Sold account
Step 4: Set up landed cost allocation
Landed costs (freight, insurance, customs, duties) must be added to the product cost before the first sale to get accurate COGS.
For most merchants (manual method):
- Receive your shipment and get the freight/customs invoice
- Calculate the landed cost per unit: Total landed cost ÷ Total
Install cogs-tracking-allocation in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
claude-codecursorgemini-clicopilotcodex-cliBundled files
FAQ
What does the cogs-tracking-allocation skill do?
Track cost of goods sold and landed costs using your platform's built-in tools or accounting integrations to compute accurate gross margin per order
How do I install the cogs-tracking-allocation skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the cogs-tracking-allocation skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic