agentleFS
Eugenevdm01Eugenevdm01/eugenes-meta-agent/skills/meta-safe-campaign-builder/SKILL.md

meta-safe-campaign-builder

Skill4 starsChanged 6 months agoMITView on GitHub

Safe Meta Ads campaign creation workflow via Graph API. Use for: validating Meta access tokens, creating paused campaigns/ad sets/ads, uploading videos with chunked upload, adding video thumbnails, QA-checking delivery status, diagnosing app-mode/rate-limit blockers, and handing over launch-ready paid ads setups without accidental activation.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 8 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when building or resuming a Meta Ads campaign programmatically, especially for purchase, lead generation, challenge ticket, …

    line 8
  2. Distinctive:

    Before creating anything, verify the account, page, pixel, event, landing page, budget, naming convention, audience, and CTA.

    line 14
  3. Very specific:

    Read meta-ads-analyzer before analysis or Meta MCP/API work.

    line 36
  4. Distinctive:

    Use this validation to select the correct pixel, page, Instagram identity, and prior campaign setup to mirror.

    line 42
  5. Distinctive:

    Before write calls, create a payload preview JSON that excludes the token and shows every intended object as PAUSED.

    line 46
  6. Distinctive:

    Do not proceed if the preview has any active status or missing conversion event.

    line 48
  7. Very specific:

    Create the campaign with status=PAUSED.

    line 52
  8. Distinctive:

    If campaign creation succeeds but ad set creation fails, write a resume script that uses the existing campaign ID.

    line 54
  9. Very specific:

    If a video creative requires a thumbnail, extract a frame with ffmpeg and upload it to /act_{ad_account_id}/adimages.

    line 60
  10. Very specific:

    Create the ad creative with an object_story_spec that contains the correct page_id, instagram_user_id, video_data or link_data, CTA, …

    line 64
  11. Distinctive:

    If Meta returns a blocker, stop and diagnose.

    line 66
  12. Very specific:

    Verify all created delivery objects through read calls.

    line 70
  13. Distinctive:

    Write a concise Markdown handover containing created object IDs, status, campaign configuration, creative copy, QA notes, blockers, and …

    line 76
  14. Very specific:

    Read references/meta_api_payload_patterns.md when building the payload or script structure.

    line 94

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

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

Meta Safe Campaign Builder

Use this skill when building or resuming a Meta Ads campaign programmatically, especially for purchase, lead generation, challenge ticket, webinar, or event campaigns where all new objects must remain PAUSED until QA is complete. This skill is designed for performance-marketing execution, not generic API experimentation.

Safety Rules

Always default to paused-only creation. Never activate campaigns, ad sets, or ads without explicit user confirmation. Treat API tokens, ad account IDs, page IDs, pixel IDs, and Instagram actor IDs as sensitive operational data. Save tokens only in local protected files or environment variables, never in final reports.

Before creating anything, verify the account, page, pixel, event, landing page, budget, naming convention, audience, and CTA. If any critical requirement is missing, ask for clarification instead of guessing. If an API call partially succeeds, resume from the existing object IDs rather than creating duplicates.

Required Inputs

Collect or confirm the following before write calls.

InputRequired Use
Meta access tokenValidate ads_read and ads_management, then call Graph API.
Ad account IDCreate campaigns, ad sets, assets, creatives, and ads.
Facebook Page IDRequired for object story specs.
Instagram actor IDRequired when using Instagram placement identity.
Pixel ID and eventRequired for offsite conversion campaigns.
Landing page URLCTA destination and message-match QA.
Budget and currencyDaily budget in minor units, e.g. R1,000 = 100000 for ZAR.
Campaign structureObjective, ad set targeting, attribution, bid strategy, and optimization event.
Creative assetsVideo/image file path, thumbnail source, primary text, headline, description, CTA.

Standard Workflow

1. Load Relevant Skills and Instructions

Read meta-ads-analyzer before analysis or Meta MCP/API work. If the campaign is for a challenge, webinar, ticket, or launch event, also read the relevant challenge/operator skill if available. Check local AGENTS.md files before editing or running project files.

2. Validate Token and Inspect Assets

Validate the token before creating objects. Confirm at minimum that the token can access /me, the ad account, campaigns, pixels, pages, and Instagram actors. Confirm that the user has write access for ads_management. Save a sanitized validation result to a JSON file.

Use this validation to select the correct pixel, page, Instagram identity, and prior campaign setup to mirror. Do not assume asset IDs from memory when inspection is possible.

3. Prepare a Payload Preview

Before write calls, create a payload preview JSON that excludes the token and shows every intended object as PAUSED. Include campaign, ad set, creative, ad, video, thumbnail, promoted object, targeting, attribution, URL, and copy.

Do not proceed if the preview has any active status or missing conversion event. If using ad-set-level budget, put budget and bid strategy at ad set level; avoid conflicting campaign-level bid strategy settings.

4. Create Campaign Infrastructure Paused

Create the campaign with status=PAUSED. Create the ad set with status=PAUSED, the correct daily budget, optimization_goal, billing_event, promoted object, attribution spec, and targeting. Confirm both objects by reading status and effective_status immediately after creation.

If campaign creation succeeds but ad set creation fails, write a resume script that uses the existing campaign ID. Do not rerun full creation in a way that duplicates the campaign.

5. Upload Video Reliably

For large or MOV/MP4 assets, prefer Meta's chunked video upload flow against graph-video.facebook.com using upload_phase=start, repeated transfer, and finish. Save every offset response. After finish, query safe fields such as id,title,status,created_time. Avoid unsupported fields that may trigger false failures.

If a video creative requires a thumbnail, extract a frame with ffmpeg and upload it to /act_{ad_account_id}/adimages. Store the returned image_hash. Use image_hash or image_url in video_data; otherwise Meta may reject the creative.

6. Create Creative and Ad Paused

Create the ad creative with an object_story_spec that contains the correct page_id, instagram_user_id, video_data or link_data, CTA, destination URL, and copy. Then create the ad with status=PAUSED and attach it to the existing ad set.

If Meta returns a blocker, stop and diagnose. Common blockers include app development mode, missing thumbnail, rate limits, invalid page/Instagram actor, policy review limitations, and video not yet processed. Do not keep retrying the same failed request more than three times.

7. QA Before Handover

Verify all created delivery objects through read calls. Minimum QA fields are id, name, status, effective_status, configured_status, daily_budget, promoted_object, targeting, attribution_spec, creative, and video status. If Meta returns rate limits, record that explicitly and avoid further repeated calls.

Confirm whether any ad exists. If no ad exists because creative creation failed, state that clearly. If an ad exists, confirm it is PAUSED before handover.

8. Deliver Handover

Write a concise Markdown handover containing created object IDs, status, campaign configuration, creative copy, QA notes, blockers, and exact next actions. Attach the handover and key JSON QA files. Do not include access tokens.

Blocker Handling

BlockerDiagnosisAction
Missing video thumbnailMeta says Please specify one of image_hash or image_url.Extract a frame, upload via /adimages, and retry creative with image_hash.
App in development modeMeta says creative post was created by an app in development mode.Stop. Ask user/admin to switch the Meta app to public/live mode, or finish the ad manually in Ads Manager.
User request limit reachedMeta returns code 17 or account API call limit.Stop non-essential calls, save current state, and retry later.
Partial object creationCampaign/ad set created before later failure.Resume from existing IDs and create only missing objects.
Video still processingVideo status is not ready/complete.Wait and recheck safe status fields; do not create duplicate videos unless upload failed.

Performance-Marketing Guardrails

Build campaigns for business outcomes, not cheap traffic. For purchase campaigns, keep the conversion event aligned with the funnel offer and ensure ad copy, landing page, checkout, thank-you page, and follow-up sequence match the promise. After launch, monitor cost per purchase, purchase quality, landing-page view rate, checkout completion, and downstream buyer quality.

Reusable Resources

Read references/meta_api_payload_patterns.md when building the payload or script structure. Use templates/handover_template.md when preparing the final delivery report.

Completion Criteria

A task using this skill is complete only when one of these is true: the campaign, ad set, creative, and ad are created and confirmed PAUSED; or the exact blocker is documented with existing object IDs, no accidental activation, and a safe manual or API continuation path.

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.