Communitygithub.com

mardab96/tiktok-ads-claude-skills

Turns TikTok Shop and GMV Max reporting into a per-product cost-stack ledger with refunds, affiliate commissions, seller-funded coupons, referral fees, ad spend, COGS, and seller-borne shipping, using gmv_profit.py to flag any incomplete cost stack (T09). Use when a TikTok Shop seller or media buyer says "GMV Max ROI looks great but we are not making money", "is this product profitable on TikTok Shop", "check our TikTok Shop margins", "affiliate commissions are eating us", or before raising a GMV Max budget or ROI target.

What is tiktok-ads-claude-skills?

tiktok-ads-claude-skills is a Claude Code agent skill that turns TikTok Shop and GMV Max reporting into a per-product cost-stack ledger with refunds, affiliate commissions, seller-funded coupons, referral fees, ad spend, COGS, and seller-borne shipping, using gmv_profit.py to flag any incomplete cost stack (T09). Use when a TikTok Shop seller or media buyer says "GMV Max ROI looks great but we are not making money", "is this product profitable on TikTok Shop", "check our TikTok Shop margins", "affiliate commissions are eating us", or before raising a GMV Max budget or ROI target.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mardab96/tiktok-ads-claude-skills/tree/HEAD/gmv-max-profit-check-tiktok-ads

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

GMV Max Profit Check: TikTok Ads

Use this skill when

GMV Max reports gross merchandise value and a platform return figure on ad spend. Treat both as gross unless your report states otherwise: neither shows the refunds, affiliate commission, seller-funded coupons, referral fees, product cost, and seller-borne shipping that decide margin. This skill builds that ledger per product, refuses a profit claim while any cost line is missing (T09), and states what a buyer may and may not conclude. Work from Seller Center and Ads Manager exports; a TikTok for Business connector in Claude is optional.

Typical requests:

  • "GMV Max shows strong ROI. Finance says we lose money on Shop. Who is right?"
  • "Which SKUs should get more GMV Max budget?"
  • "Affiliate creators drive most sales. What is left after their commission?"
  • "Refunds spiked. What does that do to last month's numbers?"
  • "Can we lower the ROI target and still make money?"

Do not use this skill when:

  • Question concerns website pixel purchases instead of Shop orders. Run pixel-events-api-check-tiktok-ads or attribution-gap-check-tiktok-ads.
  • Budget size and pacing is the decision after margin is known. Run budget-scaling-planner-tiktok-ads.
  • Bid or ROI target mechanics need review. Run bid-strategy-check-tiktok-ads, with this ledger attached.
  • A broader account with no Shop is in scope. Run account-triage-tiktok-ads.

Required input

Every cost line comes from a supplied export or a business-owned figure. A blank line stays missing and never becomes zero.

Build one CSV per period with these exact column headers, one row per product or SKU:

product, revenue, refunds, affiliate_commission, coupons, referral_fees, ad_spend

Where each column comes from (Seller Center names vary by market, as labelled in your account):

ColumnTypical sourceNote
revenueSeller Center Orders or Finance settlement reportGross product revenue before refunds
refundsOrders returns and refunds, or settlement adjustmentsSame order-date window
affiliate_commissionAffiliate commission reportUse settled or estimated, and say which
couponsPromotions reportSeller-funded share only
referral_feesFinance settlement fee linesPlatform commission or referral fee as labelled
ad_spendAds Manager GMV Max campaign report, product level if availableSame dates and currency

Also required for a profit claim: COGS per unit and units sold per product, and seller-borne shipping per product or order. Also required: period, market, currency, and whether figures are by order date or settlement date.

Optional input

  • Platform GMV and ROI as shown in GMV Max reporting, for comparison with the ledger.
  • Refund window or return policy length, to judge how mature recent orders are.
  • Sample-order or free-sample cost sent to affiliates, if the business tracks it.

Before analysis

  1. Agree the unit of analysis: product, SKU, or GMV Max campaign. Keep one key across every export so rows join cleanly.
  2. Ask how affiliate-driven orders and ad-driven orders overlap in the shop's reporting. If one order can carry both an affiliate commission and GMV Max credit, keep both costs on the row; the cost is real even if the credit is shared.
  3. Ask who funds each promotion. Platform-funded and seller-funded discounts can sit in one report column.
  4. Confirm the return window per market and today's date, so the immature part of the period is known before reading results.
  5. Record whether ad spend is product-level or campaign-level. Campaign-level spend split across products by GMV share is an allocation, labelled hypothesis.

Analysis workflow

  1. Align period, market, and currency across every export. Mark whether each source is by order date or settlement date; a ledger that mixes them shows fees and revenue from different orders.

  2. Normalise numbers before running the script. gmv_profit.py strips $ and rejects commas or non-finite values as missing. Convert decimal commas (12,50) to points (12.50) and remove thousands separators (1.234,56 becomes 1234.56). Remove other currency symbols or codes (EUR, GBP, PLN), otherwise the row remains incomplete.

  3. Build the CSV with the exact headers above. Enter a true zero as 0; leave unknown cells blank so they stay missing.

  4. Run the helper from this skill folder:

    python3 ../tiktok-ads-shared/scripts/gmv_profit.py shop_ledger.csv
    

    From an installed copy, use ~/.claude/skills/tiktok-ads-shared/scripts/gmv_profit.py. A synthetic sample lives at ../tiktok-ads-shared/examples/data/gmv_profit.csv.

  5. Read the tab-separated output. Columns: product, revenue, cost_stack, contribution_before_cogs, status, missing_columns. cost_stack sums refunds, affiliate_commission, coupons, referral_fees, and ad_spend as absolute values, so negative signs from settlement exports are safe. complete_cost_stack means every visible cell parsed. incomplete_cost_stack / needs_data prints n/a and names each missing column (T09). Exit code 2 with an ERROR: line means the file could not open or a required header is absent.

  6. Add COGS and seller-borne shipping by hand for complete rows: contribution after COGS and shipping equals contribution_before_cogs minus COGS minus seller shipping. Without both inputs, report contribution before COGS only and label profit needs_data.

  7. Compare the ledger with platform figures. Show GMV, platform ROI, contribution before COGS, and contribution after COGS and shipping side by side, per product.

  8. Check refund maturity. Orders still inside the return window can still refund; label the most recent period immature when the refund window has not closed.

  9. Produce an action list: which cost lines to collect, which products are monitor, hold, or approval_needed for a budget or target conversation.

Decision rules

ConditionEvidenceVerdictNext step
Any of revenue, refunds, affiliate commission, coupons, referral fees, or ad spend blank or unparseable (T09)shop_export + script statusneeds_dataCollect the named column; no profit or scale verdict
Visible stack complete, COGS or seller shipping missing (T09)script outputneeds_data for profitReport contribution before COGS only
Contribution after COGS and shipping negative on a product carrying meaningful GMV Max spendledgerapproval_neededOwner decision on target, budget, or product exclusion; route to bid-strategy-check-tiktok-ads
Contribution positive, refund window closedledgermonitor or approval_needed for scaleRoute to budget-scaling-planner-tiktok-ads
Contribution positive, refund window still openledger + return policyholdRecheck after the window closes
Order-date and settlement-date sources mixedexport metadataneeds_dataRebuild on one basis
Affiliate commission estimated, not settledAffiliate reportpossibleLabel estimate; recheck on settlement

Output format

## GMV Max Profit Check: [shop], [market], [period], [currency], [order date / settlement date basis]

**Verdict:** [shared verdict label] because [strongest evidence]
**Script:** gmv_profit.py on [file name]; rows complete: [n] of [n]

### Shop economics ledger
| Product | GMV (platform) | Revenue | Refunds | Affiliate | Coupons | Referral fees | Ad spend | Contribution before COGS | COGS | Seller shipping | Contribution after COGS and shipping | Status |
|---|---|---|---|---|---|---|---|---|---|---|---|---|

### Platform view vs ledger
| Product | Platform ROI | Contribution after COGS and shipping per unit of ad spend | Gap explanation |
|---|---|---|---|

### Decision table
| Finding | Evidence | Verdict | Severity | Confidence | Business impact | Next step |
|---|---|---|---|---|---|---|

### Cost lines to collect
- [product]: [column], source: [report], owner: [name]

### Data gaps
- [missing item]: blocks [conclusion]

Practical example

Illustrative numbers from the synthetic sample file, not a benchmark. Running the helper on ../tiktok-ads-shared/examples/data/gmv_profit.csv returns:

product	revenue	cost_stack	contribution_before_cogs	status	missing_columns
Starter kit	1000.00	445.00	555.00	complete_cost_stack
Incomplete refill	n/a	n/a	n/a	incomplete_cost_stack / needs_data	affiliate_commission

Starter kit: revenue 1,000, refunds 50, affiliate commission 100, coupons 75, referral fees 40, ad spend 180, so cost stack 445 and contribution before COGS 555. GMV Max reporting would show 1,000 GMV on 180 spend. Suppose the business supplies COGS of 320 and seller shipping of 90 for those units: contribution after COGS and shipping is 145. Verdict monitor, with scale routed to budget-scaling-planner-tiktok-ads once the refund window closes.

Incomplete refill: affiliate commission blank. T09 applies; verdict needs_data, no profit statement, collection task assigned to whoever owns the Affiliate report.

Common misreads

  • Reading GMV Max ROI as profit. As reported, it leaves out the fee, commission, COGS, and shipping stack, and refunds unless your report says it nets them.
  • Feeding net-of-refund revenue into revenue and also filling refunds, which subtracts refunds twice.
  • Counting platform-funded coupons as a seller cost. Only the seller-funded share belongs in coupons.
  • Typing 0 into a blank affiliate cell to make the script pass. That turns an unknown into a fake profit.
  • Running European-format numbers with decimal commas, which the script reads as values a hundred times too large.
  • Comparing an order-date revenue export with a settlement-date fee export.
  • Judging last week's products while the return window is still open.
  • Allocating campaign-level ad spend to products by GMV share and then presenting product profit as measured.

Route to next

  • Ledger complete and positive, scale under discussion: budget-scaling-planner-tiktok-ads, then learning-phase-guard-tiktok-ads (T05) before any live edit.
  • Ledger negative on a target-driven campaign: bid-strategy-check-tiktok-ads with the ledger attached.
  • Affiliate creator content outperforming brand content: spark-vs-brand-ad-split-tiktok-ads.
  • Client summary of Shop economics: weekly-client-report-tiktok-ads.

Guardrails

  • Do not call GMV, platform ROI, or contribution before COGS profit.
  • Do not fill a missing fee, refund, or spend cell with zero or an estimate without labelling it hypothesis.
  • Do not change GMV Max targets, budgets, product selection, or Shop promotions. Output stops at an approval-ready recommendation.
  • Do not recommend scaling a product whose cost stack is incomplete under T09.
  • Do not apply one market's fee categories to another market.

Individual skills in this repo

This repo contains 18 individual skills — each has its own dedicated page.

mardab96/tiktok-ads-claude-skills

Runs an ordered, layer-by-layer triage of an unfamiliar TikTok Ads account (tracking, structure, learning, creative, bidding, landing page) and hands the first blocker to one named sibling skill. Use when the user inherits a TikTok account, onboards a client, asks where to start, says TikTok results dropped with no known cause, asks whether an account is ready to scale, or says "audit this TikTok account" without naming a problem.

mardab96/tiktok-ads-claude-skills

Reconciles TikTok Ads Manager conversions with GA4, Shopify, CRM, or app analytics using a baseline-ratio method, separating click-through from view-through credit, attribution window and timezone differences, and real tracking drift (T07). Use when a TikTok media buyer or client says "TikTok says 200 sales, Shopify says 90", "GA4 does not show our TikTok conversions", "TikTok ROAS looks too good", "the gap got bigger this month", or "which number do we report to the client".

mardab96/tiktok-ads-claude-skills

Checks whether a TikTok ad group's bidding strategy fits its goal, budget, and conversion volume using the labels TikTok currently lists (Maximum Results, Target Cost per Result, value options as shown in the account) and asks for a screenshot before mapping any legacy name. Use when someone types "Maximum Results or Target Cost per Result", "Cost Cap vs Lowest Cost on TikTok", "our target CPA is too low and delivery died", "bid strategy check", or "should we use hybrid bidding".

mardab96/tiktok-ads-claude-skills

Builds a staged TikTok budget plan with entry gates, one change per observation window, stop rules, and a recorded rollback, using T04, T05, T06, and T10 from the shared register. Use when someone types "can we scale this TikTok campaign", "double the budget on the winner", "how fast can I raise the daily budget", "scale before the sale", or "plan the budget increase for next week".

mardab96/tiktok-ads-claude-skills

Strips personal data from TikTok ad comments, clusters them into objections, questions, proof requests, and noise with counts, links each cluster to product facts, and drafts reply options and hook ideas for approval. Use when the user pastes TikTok comments and asks "what are people objecting to", "mine the comments for hooks", "draft replies to these comments", "what do viewers keep asking", or wants an FAQ and creative briefs built from comment themes.

mardab96/tiktok-ads-claude-skills

Diagnoses a TikTok CPA jump by splitting it into CPM, CTR, and CVR movement between a baseline and a current window with the cpa_decompose.py helper, then checking tracking, changes, mix, creative, and landing page in that order. Use when someone types "TikTok CPA doubled", "cost per purchase is up 40%", "why did CPA spike", "CVR dropped but clicks are fine", or "the client wants to know what broke".

mardab96/tiktok-ads-claude-skills

Detects whether a TikTok ad is tiring by comparing the last seven distinct dates with the preceding seven for frequency and CTR, using the bundled fatigue_scan.py script and a 14-date rule, then builds a control-versus-refresh queue. Use when the user asks "is this TikTok ad fatigued", says CTR is dropping while frequency climbs, wants to know when to refresh TikTok creative, or pastes a daily ad export and asks which ads to replace.

mardab96/tiktok-ads-claude-skills

Scores the opening seconds of TikTok ads by computing 2-second and 6-second view rates and a thumb-stop proxy from ad-level export columns, comparing them with like-for-like ads, and scoring the script opening on a five-point rubric. Use when the user asks "which TikTok hook is weak", "what's my hook rate", "why do people scroll past my ad", wants a hook test plan, or pastes a transcript of the first seconds next to video-view columns.

mardab96/tiktok-ads-claude-skills

Sequences planned TikTok edits around the learning phase, separating urgent repairs from optimisation, naming which edits TikTok itself labels as affecting learning, and ordering one observable action at a time with rollback. Use when someone types "can I edit this ad group during learning", "will this reset the learning phase", "campaign is in learning, what can we change", "sequence these changes", or "the client wants five edits this week".

mardab96/tiktok-ads-claude-skills

Checks TikTok Pixel and Events API health from Events Manager screenshots and an Ads Manager export, covering event match signals, event_id deduplication between browser and server events, parameter completeness on value events, and primary-event drops against stable clicks (T10). Use when a TikTok media buyer says "purchases dropped but clicks are flat", "check our TikTok pixel", "is Events API deduplicating", "Events Manager shows a diagnostic warning", "TikTok value does not match our orders", or before any bid, budget, or scale call that depends on TikTok conversion data.

mardab96/tiktok-ads-claude-skills

Reviews TikTok Ads delivery split between the TikTok placement and Pangle or TikTok Ad Network inventory (as labelled in your Ads Manager), testing CPA and downstream quality per placement against T08 and keeping brand safety and suitability as a separate question. Use when a TikTok media buyer says "should we turn off Pangle", "where is our TikTok spend actually going", "automatic placement is eating budget", "network traffic converts badly", "is our TikTok ad showing next to unsafe content", or when a client asks for a placement and brand safety readout.

mardab96/tiktok-ads-claude-skills

Reviews TikTok Search Ads search terms and keywords and decides what to add as a keyword, add as a negative, or watch, with match handling as labelled in the account and a lag-aware waste floor. Use when someone types "review our TikTok search terms", "negative keyword list for TikTok Search Ads", "which queries should become keywords", "broad match is bringing junk", or "Search Ads spend with zero conversions".

mardab96/tiktok-ads-claude-skills

Audits a TikTok Smart+ campaign by mapping what Smart+ automates against what the media buyer still controls (creative supply, audience exclusions, conversion event, budget, bidding), then ranks the risks. Use when someone types "audit our Smart+ campaign", "what does Smart+ actually control", "Smart+ vs manual", "Smart+ spend is up but results are flat", or "can we trust Smart+ with this budget".

mardab96/tiktok-ads-claude-skills

Compares TikTok Spark Ads with brand-handle ads like-for-like by matching objective, optimization event, audience, offer, placements, bidding label, dates, and concept before any metric is read, then records authorization status and designs a matched test when no clean pair exists. Use when the user asks "do Spark ads perform better than our brand ads", "Spark vs non-Spark", "should we boost creator posts", "why is the creator ad cheaper", or pastes ad-level data with a format column and wants a verdict.

mardab96/tiktok-ads-claude-skills

Writes a complete creator-facing UGC brief for TikTok ads, with viewer situation, one message, three hook options, scene structure, claims allowed and forbidden, do and don't lists, disclosure, usage rights, and a Spark authorization note, plus an internal approval checklist. Use when the user says "write a UGC brief for TikTok", "brief a creator", "I need a creator script with approved claims", "what rights do I need to run this creator video as an ad", or has product facts and needs something a creator can film from.

mardab96/tiktok-ads-claude-skills

Finds mature TikTok campaigns, ad groups, and ads that spent past a CPA-based floor with zero reported conversions, after excluding rows still inside the conversion lag, using the wasted_spend.py helper. Use when someone types "where is the wasted spend on TikTok", "which ad groups burn budget with no conversions", "what can we cut before we scale", "zero conversion ads", or "clean this account before the client call".

mardab96/tiktok-ads-claude-skills

Writes the weekly TikTok Ads client report as a plain-language narrative, a scorecard against the client goal, and next-week decisions with owners and approvals, after an integrity check on tracking, lag, and learning status (T04, T05, T07, T10). Use when an agency or freelance TikTok media buyer says "write the weekly TikTok report", "client update is due", "explain this week's TikTok results to the client", "what do we tell the client about CPA going up", or "set up a repeatable TikTok report format".

mardab96/tiktok-ads-claude-skills

Turns one proven TikTok ad into N distinct angle scripts, each with hook, body beats, CTA, on-screen text, and a shot list, after deconstructing why the winner worked and checking every claim against product facts and rights. Use when the user says "remix my winning TikTok ad", "give me new angles on this winner", "I need five scripts like this one", "my best ad is wearing out, what next", or pastes a winning transcript and asks for variations.

Related Skills