{
 "schema": "aiblocks-page/1",
 "id": "meta-ads-report-code-builder-prompt",
 "type": "prompt",
 "name": "Meta Ads reporting app planner",
 "summary": "Get a Claude Code prompt that builds a 17-section monthly Meta Ads report from your own data, with dates shown and missing numbers marked.",
 "headline": "Meta Ads reporting app planner",
 "subhead": "Paste this prompt into Claude Code, inside your project. It builds a report function that reads one month of Meta Ads results, compares them with the month before and fills 17 sections. You also get a Markdown copy, a Slack message draft and tests.",
 "job": {
  "id": "build-software",
  "name": "Build and ship software"
 },
 "level": "intermediate",
 "thinking": "medium",
 "tested": true,
 "updated": "2026-11-03",
 "first_published": "2026-10-25",
 "inputs": [
  {
   "type": "codebase",
   "required": true,
   "label": "Codebase",
   "what": "a project's code, in a folder or repo the AI can open"
  }
 ],
 "outputs": [
  {
   "type": "code_change",
   "required": true,
   "label": "Code change",
   "what": "a change to the code, with what it fixes and how it was checked"
  }
 ],
 "you_give": [
  "Your project folder, open in Claude Code",
  "Where your daily Meta Ads results are stored: a table or file with date, campaign, spend, revenue, purchases, clicks and impressions",
  "The month to report on, and a client ID if your data holds more than one client",
  "A minimum spend a campaign needs before it is ranked (optional)",
  "Your Slack setup, if you want a summary message drafted for it (optional)"
 ],
 "you_get": [
  "A report function in your project that returns all 17 sections for one month",
  "A Markdown version of the full report",
  "A Slack message draft with the summary, key numbers, top campaigns and next actions. It is not posted",
  "Sections your data could not fill, marked not available, and a list of setup gaps",
  "Tests that use made-up numbers"
 ],
 "use_when": [
  "A client or boss wants a monthly Meta Ads report and you would rather build it once than write it every month.",
  "You already store daily Meta results in a database and need a function that turns them into a report.",
  "You run an agency and want the same 17 sections for every client, every month.",
  "You want a short Slack summary of the month to review before it goes anywhere."
 ],
 "skip_when": [
  "You only want to read one month of results and not build software: use the Ad results report writer.",
  "You report on Google Ads: use the Google Ads report code planner.",
  "You want to know why sales dropped: use the Ad sales drop analyst.",
  "You have no stored daily results and no project folder. This prompt builds code, so it has nothing to run on."
 ],
 "output_sample": {
  "input": [
   "Your project folder, open in Claude Code",
   "Where your daily Meta Ads results are stored",
   "The month to report on, and a client ID if needed",
   "A minimum spend for ranking campaigns (optional)"
  ],
  "prerequisites": [
   "Claude Code, or another coding AI that can read your project folder",
   "Daily Meta Ads results already saved in your project"
  ],
  "output": [
   {
    "name": "generateMonthlyReport",
    "contains": "The code function that reads one month of results and returns all 17 sections."
   },
   {
    "name": "Sections 2 to 6, key numbers",
    "contains": "Metrics against last month, spend against budget, revenue and weekly ROAS and CPA trends."
   },
   {
    "name": "Sections 7 to 10, campaigns and creative",
    "contains": "Top and bottom campaigns by ROAS, best creatives and audiences, each with spend."
   },
   {
    "name": "Sections 11 to 14, diagnosis",
    "contains": "Platform split, funnel rates, creative fatigue and where the budget went."
   },
   {
    "name": "Sections 1, 8, 15, 16 and 17, the stories",
    "contains": "Written summary, underperformers, wins, challenges and next actions, built only from the numbers."
   },
   {
    "name": "Markdown report",
    "contains": "All 17 sections in one readable file, with dates, currency and gaps shown at the top."
   },
   {
    "name": "generateSlackSummary",
    "contains": "A drafted Slack message with sections 1, 2, 7 and 17. It is not posted."
   },
   {
    "name": "Setup gaps and tests",
    "contains": "Missing tables, columns and permissions, plus tests on made-up numbers and which ones ran."
   }
  ]
 },
 "output_shape": "MONTHLY REPORT: <client> | <month>\nPERIOD: <start to end, N days> | COMPARED WITH: <start to end, N days>\nCURRENCY: <code> | TIME ZONE: <zone> | ATTRIBUTION WINDOW: <window or UNKNOWN>\n\n1. Executive summary: <3 to 4 sentences, numbers from below>\n2. Key metrics: <metric | this month | last month | change %>\n3. Spend vs budget: <actual | planned | variance, or not available>\n4. Revenue attribution: <purchases | revenue | ROAS>\n5. ROAS trend: <weekly ROAS, last 8 weeks>\n6. CPA trend: <weekly CPA vs your target>\n7. Top campaigns: <5 by ROAS with spend and revenue>\n8. Underperforming campaigns: <5 lowest by ROAS, with next steps>\n9. Creative performance: <top 3 by CTR, top 3 by conversion rate>\n10. Audience insights: <best audiences, or not available>\n11. Platform breakdown: <only if other platforms are in the data>\n12. Funnel: <impressions, clicks, add to cart, purchase, rates>\n13. Creative fatigue: <ads past your frequency limit with falling CTR>\n14. Budget allocation: <where money went and where it could go>\n15. Wins: <what worked, with numbers>\n16. Challenges and learnings: <what did not work and why>\n17. Next month: <3 to 5 actions, each tied to the numbers behind it>\n\nSLACK DRAFT: <sections 1, 2, 7 and 17, not posted>\nSETUP GAPS: <missing tables, columns, permissions>\nTESTS: <what ran and passed, what did not run>",
 "how_to_use": [
  "Open your project folder in Claude Code. It needs a coding tool that can read your folder, so it sees your real tables. A chat AI cannot do this. Claude Code runs on a paid Claude plan or an API account.",
  "Copy the prompt from the skill file and paste it in. Add one line saying where your daily Meta results are stored, if you know.",
  "Answer its questions about missing tables or columns before it writes code. Do not let it invent your schema.",
  "Read the setup gaps and the sections marked not available. Fix the data, or accept the gaps.",
  "Run the tests, then run the report on one past month. Check spend, purchases and revenue against Ads Manager before you send anything to a client.",
  "Read the Slack draft. Add posting yourself only when you trust the numbers."
 ],
 "checks": [],
 "next": [
  {
   "name": "Simple code coach",
   "url": "https://useaiblocks.com/skills/simple-code-coach",
   "why": "Build it"
  }
 ],
 "source": null,
 "credits": [],
 "files": [
  "references/worked-example.md"
 ],
 "links": {
  "page": "https://useaiblocks.com/prompts/meta-ads-report-code-builder-prompt",
  "markdown": "https://useaiblocks.com/prompts/meta-ads-report-code-builder-prompt.md",
  "json": "https://useaiblocks.com/prompts/meta-ads-report-code-builder-prompt.json",
  "instructions": "https://useaiblocks.com/skills/meta-ads-report-code-builder-prompt/SKILL.md",
  "download": "https://useaiblocks.com/skills/meta-ads-report-code-builder-prompt.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/meta-ads-report-code-builder-prompt",
  "api_document": "https://useaiblocks.com/api/v1/documents/prompt/meta-ads-report-code-builder-prompt",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
