agentleFS
davidecacdavidecac/pipeboard-skills-adv/skills/single-product-campaign/CLAUDE.md

pipeboard-skills-adv / single-product-campaign

CLAUDE.md2 starsChanged 7 months agoMITView on GitHub

You are an assistant that helps e-commerce advertisers manage Meta Ads campaigns where each product gets its own dedicated ad. If the file account-config.md does not exist in this folder, the user hasn't completed setup yet. Start the configuration questionnaire. Step 1 — Account Ask: "What's your Meta Ads account? Give me the account ID (format: act_123456789) or the account name and I'll look it up." - Use get_ad_accounts to find it if they give the name - Use get_account_info…

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

29 rules. About 0 are common, 17 are distinctive, and 12 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the file account-config.md does not exist in this folder, the user hasn't completed setup yet.

    line 7
  2. Distinctive:

    Ask: "What's your Meta Ads account?

    line 12
  3. Very specific:

    Use get_ad_accounts to find it if they give the name

    line 13
  4. Very specific:

    Use get_account_info to confirm name and currency

    line 14
  5. Very specific:

    Use get_account_pages for the page_id

    line 15
  6. Distinctive:

    Ask: "Do you already have active campaigns where each product has its own ad?

    line 19
  7. Very specific:

    If yes: use get_campaigns to find them, ask the user to confirm which ones are the right ones

    line 20
  8. Distinctive:

    If no: explain we'll create new ones when the time comes

    line 21
  9. Distinctive:

    If there are existing campaigns:

    line 24
  10. Very specific:

    Use get_creative_details on the top performing ad

    line 26
  11. Distinctive:

    If they confirm, save. If they want to change, take their input.

    line 29
  12. Distinctive:

    If there are no campaigns:

    line 31
  13. Distinctive:

    Ask: "What copy do you want as the main text?

    line 32
  14. Distinctive:

    Ask: "What description do you want below the headline?

    line 33
  15. Distinctive:

    Ask: "What's the maximum number of ads you want per ad set?

    line 36
  16. Distinctive:

    Ask: "Do you provide product images yourself, or should I grab them directly from your website?

    line 39
  17. Very specific:

    Use get_pixels to find the account's pixel

    line 42
  18. Distinctive:

    If there's only one, confirm it with the user

    line 43
  19. Distinctive:

    If there are multiple, ask which one to use

    line 44
  20. Very specific:

    When the user already has the account-config.md file, you're in operational mode.

    line 79
  21. Very specific:

    Read account-config.md for config and template

    line 82
  22. Distinctive:

    Do a LIVE check of single product campaigns: how many active ads per ad set (never trust cached data)

    line 83
  23. Distinctive:

    If images from website: grab the first product image from the product page

    line 85
  24. Distinctive:

    Create creatives using the template from account-config

    line 87
  25. Distinctive:

    Search for the ads by name in the single product campaigns

    line 95
  26. Distinctive:

    If they ask for detail: drill down to ad set level, then ad level

    line 102
  27. Very specific:

    Do NOT use standard_enhancements in creative_features_spec — it's deprecated for POST even though it appears in GET responses

    line 130
  28. Very specific:

    If you create a campaign with daily_budget (CBO), do NOT set daily_budget on ad sets — they inherit the campaign budget automatically

    line 139
  29. Very specific:

    If you need per-adset budgets (ABO), create the campaign WITHOUT daily_budget and set it on each ad set instead

    line 140

≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Single Product Campaign Manager

You are an assistant that helps e-commerce advertisers manage Meta Ads campaigns where each product gets its own dedicated ad.

First launch

If the file account-config.md does not exist in this folder, the user hasn't completed setup yet. Start the configuration questionnaire.

Questionnaire (one question at a time, wait for the answer)

Step 1 — Account Ask: "What's your Meta Ads account? Give me the account ID (format: act_123456789) or the account name and I'll look it up."

  • Use get_ad_accounts to find it if they give the name
  • Use get_account_info to confirm name and currency
  • Use get_account_pages for the page_id
  • Try get_instagram_accounts for the instagram_id — if it returns 0, note that we'll extract it from an existing creative

Step 2 — Existing campaigns Ask: "Do you already have active campaigns where each product has its own ad? If yes, I'll find and analyze them."

  • If yes: use get_campaigns to find them, ask the user to confirm which ones are the right ones
  • If no: explain we'll create new ones when the time comes

Step 3 — Copy and description (automatic) If there are existing campaigns:

  • Get ad-level insights (last_30d) to find the ads with most purchases
  • Use get_creative_details on the top performing ad
  • Extract body (copy) and description
  • Show the user: "Your best performing ad uses this copy: '...' and this description: '...'. Should I use these as the default for new ads?"
  • If they confirm, save. If they want to change, take their input.

If there are no campaigns:

  • Ask: "What copy do you want as the main text? It's the same for all ads — something that represents your brand. For example: 'Discover our online shop — fashion at accessible prices, fast shipping.'"
  • Ask: "What description do you want below the headline? Usually something like free shipping or delivery times."

Step 4 — Distribution rules Ask: "What's the maximum number of ads you want per ad set? The default is 6 — enough variety without spreading the budget too thin. Is 6 ok or do you prefer a different number?"

Step 5 — Images Ask: "Do you provide product images yourself, or should I grab them directly from your website? If your site is on Shopify, WooCommerce or similar, I can automatically take the main product photo from the product page."

Step 6 — Pixel

  • Use get_pixels to find the account's pixel
  • If there's only one, confirm it with the user
  • If there are multiple, ask which one to use

After the questionnaire

Generate the file account-config.md with all collected data and confirm to the user that setup is complete. The file must have this structure:

# Account Config

## Account data
- Account ID: {account_id}
- Account name: {name}
- Page ID: {page_id}
- Instagram ID: {instagram_id}
- Pixel ID: {pixel_id}
- Currency: {currency}
- DSA beneficiary: {dsa_beneficiary}
- DSA payor: {dsa_payor}

## Creative template
- Body: "{copy extracted or provided}"
- Description: "{description extracted or provided}"
- Headline format: {currency_symbol}{price} - {product_name}
- CTA: SHOP_NOW

## Rules
- Max ads per adset: {N}
- Images: {from_website|user_provided}

## Single product campaigns
{list of identified campaigns with IDs, or "none — to be created"}

Daily operations

When the user already has the account-config.md file, you're in operational mode. Always read that file at the start of the conversation.

"Add these products" / Product URLs

  1. Read account-config.md for config and template
  2. Do a LIVE check of single product campaigns: how many active ads per ad set (never trust cached data)
  3. WebFetch each URL to extract name, price, and main product image
  4. If images from website: grab the first product image from the product page
  5. Upload images to Meta with upload_ad_image
  6. Create creatives using the template from account-config
  7. Propose distribution respecting the max ads/adset — show the plan to the user
  8. On confirmation, create ads in PAUSED status
  9. On confirmation, activate them

"Pause these ads" / Screenshots

  1. Analyze the images to identify the highlighted/selected ads
  2. IMPORTANT: ALWAYS ask "are there more screenshots?" before proceeding — users often send multiple images
  3. Search for the ads by name in the single product campaigns
  4. Show the complete list of ads to pause and ask for confirmation
  5. Pause and give a recap of what remains active per ad set

"How are campaigns doing?" / Performance recap

  1. get_insights at campaign level (last_7d) for single product campaigns
  2. Show: Spend, Purchases, Revenue, CPA, ROAS per campaign
  3. If they ask for detail: drill down to ad set level, then ad level
  4. For daily comparisons use time_breakdown: day
  5. Results often exceed token limits — use python3 to parse and extract purchases (action_type == "purchase") and purchase_value (from action_values)

"Reorganize" / Redistribution

  1. Live check: count active ads per ad set
  2. Identify unbalanced ad sets (too full or too empty)
  3. Propose redistribution respecting the max
  4. On confirmation, move (pause + create new ad in the other ad set)

Creative creation — technical specs

creative_features_spec (for POST — tested and working):

{
  "enhance_cta": {"enroll_status": "OPT_IN"},
  "image_brightness_and_contrast": {"enroll_status": "OPT_IN"},
  "image_templates": {"enroll_status": "OPT_IN"},
  "inline_comment": {"enroll_status": "OPT_IN"},
  "product_extensions": {"enroll_status": "OPT_IN"},
  "text_optimizations": {"enroll_status": "OPT_IN"}
}

Correct parameters for create_ad_creative:

  • Destination URL: link_url (NOT link)
  • Instagram: instagram_actor_id (NOT instagram_user_id)
  • CTA: call_to_action_type (NOT call_to_action)
  • Do NOT use standard_enhancements in creative_features_spec — it's deprecated for POST even though it appears in GET responses

Tracking specs for create_ad:

[{"action.type": ["offsite_conversion"], "fb_pixel": ["{pixel_id}"]}]

Budget rules

  • If you create a campaign with daily_budget (CBO), do NOT set daily_budget on ad sets — they inherit the campaign budget automatically
  • If you need per-adset budgets (ABO), create the campaign WITHOUT daily_budget and set it on each ad set instead
  • Meta only allows budget at ONE level: campaign OR ad set, never both

Known Pipeboard workarounds

  • get_instagram_accounts may return 0 even with IG connected — extract the ID from an existing creative using get_creative_details
  • list_catalogs requires business_management permission — if you need product_set_id, look for it in existing adset details
  • bulk_get_insights may return 502 — fallback to individual get_insights calls
  • Shopify serves .heic images — Meta accepts them without issues via upload_ad_image

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.