marketing-optimizer

marketing-optimizer is an agent for Claude Code from Lifecycle-Innovations-Limited/claude-ops. It costs 12 tokens per session (1,659 once invoked), scanned A, original, MIT.

An operations agent that compares advertising results from Meta Ads and Google Ads. It calculates blended ROAS, meaning revenue earned compared with advertising spend across both platforms.

In plain words
What is it for?
Use it to read recent ad data, compare spend and results, calculate combined ROAS, and recommend specific budget shifts between campaigns or platforms.
Why use it?
It brings results from two advertising systems into one view and identifies where the budget may be producing better returns.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT variable. Also seen: model in frontmatter; positional $N argument.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ops plugin — 66 skills, 21 agents, 5 hooks, 1 MCP server shipped together

Good fit Use it to read recent ad data, compare spend and results, calculate combined ROAS, and recommend specific budget shifts between campaigns or platforms.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Lifecycle-Innovations-Limited/claude-ops
Claude Code
/plugin install ops

Made for: Claude Code.

Or install ops, the plugin that ships this one along with the rest of its 66 skills, 21 agents, 5 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for marketing-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/lifecycle-innovations-limited/claude-ops/marketing-optimizer/github.svg)](https://agentmods.dev/agents/lifecycle-innovations-limited/claude-ops/marketing-optimizer)
Your own site
<a href="https://agentmods.dev/agents/lifecycle-innovations-limited/claude-ops/marketing-optimizer"><img src="https://agentmods.dev/badge/agents/lifecycle-innovations-limited/claude-ops/marketing-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for marketing-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/lifecycle-innovations-limited/claude-ops/marketing-optimizer"><img src="https://agentmods.dev/badge/agents/lifecycle-innovations-limited/claude-ops/marketing-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,659 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.01659
Opus 5 $0.00006 $0.00830
Sonnet 5 $0.00002 $0.00332
Haiku 4.5 $0.00001 $0.00166

Measured 9d ago against content hash 97704b15fd40, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

marketing-optimizer scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s "https://graph.facebook.com/v20.0/${META_ACCOUNT}/insights?fields=spend,actions,action_values,impressions,clicks&date_preset=last_7d&level=account" \
claude-ops/agents/marketing-optimizer.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Marketing Optimizer Agent

Model: claude-sonnet-4-5 Purpose: Cross-platform ad budget optimization — reads Meta + Google Ads data, computes blended ROAS, and recommends specific budget shifts.


Instructions

You are the marketing optimizer. Your job is to analyze ad performance across Meta Ads and Google Ads, compute blended ROAS, and produce specific, actionable budget recommendations.

Input

Read pre-gathered marketing data from the ops-marketing-dash script:

"${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/ops-ops-marketplace}/bin/ops-marketing-dash" 2>/dev/null

Parse the JSON output. The schema emitted by ops-marketing-dash (v1.5+) is:

  • meta — account-level Meta Ads totals (last 7 days): meta.spend, meta.impressions, meta.clicks, meta.ctr, meta.purchases, meta.purchase_value, meta.roas. All values are strings. No per-campaign breakdown is pre-gathered — fetch campaigns directly via the fallback query below if you need per-campaign analysis.
  • google_ads — raw Google Ads searchStream response (array of pages) when configured, or null otherwise. Each page has .results[] with .campaign.{id,name,status} and .metrics.{costMicros,impressions,clicks,conversions,conversionsValue}. Derive spend and conversions_value via null-safe reductions so unconfigured / empty responses yield 0 instead of throwing:
    • spend: (if type=="array" then [.[].results[]?.metrics.costMicros // "0" | tonumber] | add // 0 else 0 end) / 1000000
    • conversions_value: if type=="array" then [.[].results[]?.metrics.conversionsValue // "0" | tonumber] | add // 0 else 0 end
  • klaviyoklaviyo.subscribers, klaviyo.last_campaign, klaviyo.last_campaign_status, klaviyo.open_rate.
  • ga4ga4.sessions, ga4.users, ga4.conversions, ga4.revenue, ga4.cvr.
  • gscgsc.clicks, gsc.impressions, gsc.ctr, gsc.avg_position.
  • instagraminstagram.followers, instagram.media_count, instagram.reach_7d.
  • Top-level: blended_roas, health_score, health_status, date.

Read the full file on GitHub · 135 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 135 lines · 12 tokens per session scan A 97704b15fd40

Subscribe to this mod's changes

marketing-optimizer is an agent published in the GitHub repository Lifecycle-Innovations-Limited/claude-ops (187 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 1,659 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.