diagnose-underperformer

diagnose-underperformer is a command for coding agents from markifact/markifact-mcp. It costs 64 tokens per session (1,614 once invoked), scanned A, original, MIT.

A read-only diagnostic command for finding why a Google Ads or Meta Ads campaign, ad set, or ad is performing poorly.

In plain words
What is it for?
It helps investigate low conversions, poor return on ad spend, high acquisition costs, low impressions, or wasted budget and recommends the next action.
Why use it?
It replaces guesswork with a structured review of advertising reports, settings, trends, and likely causes without changing the account.

Command

Part of the markifact plugin — 2 skills, 7 commands, 1 agent, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/markifact/markifact-mcp/diagnose-underperformer
Clone the repo
git clone --depth 1 https://github.com/markifact/markifact-mcp

Or install markifact, the plugin that ships this one along with the rest of its 2 skills, 7 commands, 1 agent, 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 diagnose-underperformer

README.md
[![agentmods](https://agentmods.dev/badge/commands/markifact/markifact-mcp/diagnose-underperformer.svg)](https://agentmods.dev/commands/markifact/markifact-mcp/diagnose-underperformer)
Your own site
<a href="https://agentmods.dev/commands/markifact/markifact-mcp/diagnose-underperformer"><img src="https://agentmods.dev/badge/commands/markifact/markifact-mcp/diagnose-underperformer.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 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,614 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00064 $0.01614
Opus 5 $0.00032 $0.00807
Sonnet 5 $0.00013 $0.00323
Haiku 4.5 $0.00006 $0.00161

Measured 4d ago against content hash 04f8b1816998, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

diagnose-underperformer scanned grade A with 0 findings 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/diagnose-underperformer.md · 107 lines

How it starts

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

Goal

Pull the right report, walk a structured decision tree, and hand the user a ranked list of likely causes with the specific next op to call to fix it. No writes — diagnosis only.

Inputs to confirm (batch)

  1. Account name (substring) — required.
  2. Target — campaign / ad set / ad name or ID — required.
  3. Date range — default last 14 days; if the entity is < 14 days old, use its lifetime.
  4. Comparison window (optional) — previous 14 days, for trend.
  5. Primary KPI — conversions / ROAS / CPA / CPL — required if the entity has a conversion goal.

Workflow

  1. Discover ops. For Google Ads: gads_select_accounts, gads_list_report_fields, gads_get_report, gads_get_account_history. For Meta: meta_ads_select_accounts, meta_ads_list_report_fields, meta_ads_get_report, meta_ads_get_account_history, meta_ads_get_adset_settings, meta_ads_get_campaign_settings.
  2. Inspect with get_operation_inputs. Always call *_list_report_fields before *_get_report — never guess metric/dimension names.
  3. Resolve account with substring match.
  4. Pull the report at the right granularity (campaign / ad set / ad). Required metrics:
    • Spend, impressions, clicks, CTR, CPC, conversions, conv rate, CPA / ROAS, frequency (Meta), search impression share + lost-to-budget + lost-to-rank (Google Search).
  5. Pull settings/history to check for recent edits that could have triggered the dip:
    • Google: gads_get_account_history filtered to this campaign — look for budget changes, bid strategy switches, status flips, asset changes.
    • Meta: meta_ads_get_campaign_settings / meta_ads_get_adset_settings for current state, meta_ads_get_account_history for recent changes.
  6. Walk the decision tree below and rank the matching diagnoses by likelihood + impact.
  7. Present: top 3 diagnoses, evidence from data, and the exact next op to call (or the matching slash command). Do not run any write op.

Decision tree

Branch A — Low impressions / low spend (entity not delivering)

Read the full file on GitHub · 107 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. 4d ago First seen · 107 lines · 64 tokens per session scan A 04f8b1816998

Subscribe to this mod's changes

diagnose-underperformer is a command published in the GitHub repository markifact/markifact-mcp (48 stars, last pushed 16d ago), licensed MIT. It adds 64 tokens to every session and 1,614 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.