size-chart-audit
Skill1 starsChanged 3 months agoMITView on GitHub
Use when auditing TikTok Shop listings for size chart coverage - checking which categories support size charts, which listings are missing them, and whether DTC has size chart images to extract.
- Reads credentials
In this repository9 other files it gives its agents.
- channels-releaseSkill
- codexSkill
- harnessSkill
- product-video-promptSkill
- reviewSkill
- size-chart-syncSkill
- skill-writerSkill
- variant-swatch-imageSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Check data.rule.size_chart.is_supported (boolean).
- Very specific: line 66
Write to data/{org_id_prefix}_listings.csv with columns:
- Distinctive: line 71
Update the merchant's Notion page with:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Size Chart Audit Workflow
Audit a TikTok Shop merchant's listings to determine size chart coverage and identify gaps.
Workflow Steps
1. Query Active Listings
Get all active listings for the org from products-p-listings:
SELECT product_listing_id, product, sales_channel_product_id, sales_channel_store_key
FROM product_listings
WHERE organization_id = '{org_id}' AND state = 'active'
AND sales_channel_store_key = '{store_key}'
LIMIT 500From the product JSON field, extract:
product.categories[0].sales_channel_id— TikTok category IDproduct.size_chart.images— existing size chart (empty array = none)product.title— product title
2. Check Category Size Chart Support
For each unique category ID, call the categories/rules API:
curl 'http://pltf-pd-product-listings.as-in.com/api/v1/categories/rules?external_category_id={cat_id}&sales_channel_store_key={store_key}&sales_channel_platform=tiktok-shop&organization_id={org_id}' \
--header "am-api-key: ${AM_API_KEY}"Check data.rule.size_chart.is_supported (boolean). Only supported categories can have size charts.
3. Identify Missing Size Charts
Cross-reference:
- Listings in categories where
is_supported = true - Listings where
product.size_chart.imagesis empty
This gives the list of listings that can have a size chart but don't.
4. Check DTC for Size Charts
For missing listings, trace back to the DTC product URL via DB chain:
listing_id
-> products-p-listings.products_center_product_id
-> products-p-core.connectors_product_id
-> connectors-p-product.product_urlThen fetch {product_url}.json from Shopify and check:
product.body_html— search for size chart keywords ("size chart", "size guide", etc.)product.images— check alt text/filenames for size-related keywords- Note: Many merchants embed size charts as plain images in descriptions (e.g., alicdn URLs) with no keywords. These can only be identified by visual inspection. Flag them for manual review.
5. Output CSV
Write to data/{org_id_prefix}_listings.csv with columns:
listing_id,title,category_id,size_chart_supported,has_size_chart
6. Update Notion
Update the merchant's Notion page with:
- Total active listings and category count
- Which categories support size chart (with listing counts)
- Listings already with size chart vs missing
- Missing listings table with: listing ID, category, title, DTC link, DTC size chart status
Required Inputs
- Organization ID: AfterShip org_id
- Store Key: TikTok Shop store key (from
sales_channel_store_keyin DB) - Notion page URL: For documenting results (optional)
Environment
Set before running any API call:
export AM_API_KEY=<your-am-api-key>API Reference
Categories Rules API
- Endpoint:
http://pltf-pd-product-listings.as-in.com/api/v1/categories/rules - Auth header:
am-api-key: ${AM_API_KEY}— set via env var, never hardcode - Size chart support:
data.rule.size_chart.is_supported - Not in
data.rules[]— it'sdata.rule(singular)
DB Access
Go query tool at ~/.claude/skills/database/scripts/go/:
go run query_any_db.go -db {db_name} -q "{sql}"Databases: connectors-p-product, products-p-core, products-p-listings
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.

