← back to The Ai Factory
output/run-4/shopify-cost-breakdown/SKILL.md
65 lines
---
name: shopify-cost-breakdown
description: Generates cost, MAP (Minimum Advertised Price), retail, and margin breakdown for Shopify product variants when given a product handle and user-supplied cost data. Auto-triggers on "cost breakdown for handle" or similar phrases. Requires handle + unit_cost; no live Shopify API integration.
---
# Shopify Cost Breakdown
## Trigger
- "cost breakdown for handle"
- "variant cost breakdown"
- "shopify product cost"
- "price breakdown for handle"
- "cost analysis for handle"
## When to use
When a user provides a Shopify product handle (e.g., `summer-dress`) and explicitly supplies unit_cost (e.g., $15.00) to calculate cost, MAP, retail, and margin.
## What it does
- Calculates total cost per variant using user-provided unit_cost
- Computes MAP using user-defined minimum advertised price or default formula (MAP = cost × 1.5)
- Estimates retail price using user-specified markup percentage or default formula (retail = cost / (1 - 0.3))
- Determines gross margin and net profit per unit based on inputs
- Outputs structured tables with currency formatting
## How to invoke
1. Provide the Shopify product handle (e.g., `summer-dress`)
2. Supply **required** cost data: unit_cost (e.g., $15.00)
3. Optionally specify MAP (e.g., $25.00), markup percentage (e.g., 30%), or retail price
4. Choose output format: table, JSON, or markdown
## Input contract
**Required fields**:
- `handle`: Shopify product handle (e.g., `summer-dress`)
- `unit_cost`: Base cost per unit (e.g., $15.00)
**Optional fields**:
- `map`: Minimum Advertised Price (e.g., $25.00)
- `markup_percent`: Retail markup percentage (e.g., 30%)
- `retail_price`: Final retail price (e.g., $30.00)
- `currency`: ISO currency code (e.g., USD)
## Example
**Input**:
```plaintext
handle: summer-dress
unit_cost: 15.00
map: 25.00
currency: USD
```
**Output**:
| Metric | Value |
|--------------|----------|
| Unit Cost | $15.00 |
| MAP | $25.00 |
| Retail Price | $30.00 |
| Gross Margin | $15.00 |
| Margin % | 50.00% |
## Out of scope
- Fetching live Shopify API data
- Processing multiple handles simultaneously
- Calculating margins without explicit cost data
---