budget-tracker
The budget-tracker skill monitors advertising spend in real time across connected ad platforms, comparing actual daily burn rates against target budgets and projecting period-end totals. Use it when managing multi-platform campaigns to detect overspending or underspending patterns, receive reallocation recommendations, and ensure budgets stay on pace to maximize ROI within available funds.
git clone --depth 1 https://github.com/indranilbanerjee/digital-marketing-pro /tmp/budget-tracker && cp -r /tmp/budget-tracker/skills/budget-tracker ~/.claude/skills/budget-trackerSKILL.md
# /digital-marketing-pro:budget-tracker
## Purpose
Track advertising budget in real-time across all connected ad platforms. Analyze spend pacing against targets, project end-of-period totals, flag overspend risks and underspend inefficiencies, calculate daily burn rates, and recommend budget reallocations to maximize ROI within the remaining budget window. Designed for media buyers and marketing managers who need a single view of where money is going and whether it is being spent effectively.
## Input Required
The user must provide (or will be prompted for):
- **Budget period**: This month, this quarter, or a custom date range (e.g., "Feb 1 - Mar 31").
Determines the pacing denominator and projection horizon
- **Ad platforms to include**: All connected platforms or specific ones (e.g., "Google Ads and Meta only").
Defaults to all connected ad MCPs
- **Budget targets per platform** (optional): Specific spend targets per platform for the period.
If omitted, targets are pulled from `profile.json` budget_range and any saved platform allocations
- **Total budget** (optional): Overall budget cap for the period.
If omitted, pulled from `profile.json` budget_range
- **Alert thresholds** (optional): Custom thresholds for overpace (default: >110% of expected pacing) and
underspend (default: <70% of expected pacing) flags
- **Include efficiency metrics** (optional): Whether to pull CPA, ROAS, and conversion data alongside spend.
Defaults to yes
## Process
1. **Load brand context**: Read `~/.claude-marketing/brands/_active-brand.json` for the active slug, then load `~/.claude-marketing/brands/{slug}/profile.json`. Apply brand voice, compliance rules for target markets (`skills/context-engine/compliance-rules.md`), and industry context. Also check for guidelines at `~/.claude-marketing/brands/{slug}/guidelines/_manifest.json` — if present, load restrictions. Check for agency SOPs at `~/.claude-marketing/sops/`. If no brand exists, ask: "Set up a brand first (/digital-marketing-pro:brand-setup)?" — or proceed with defaults.
2. **Extract budget targets**: Pull `budget_range` from `profile.json` and any saved per-platform allocations from
previous budget-optimizer or media-plan runs. If user provided explicit targets, use those as overrides.
Calculate the target daily spend rate for each platform (budget / days in period).
3. **Pull spend data from connected ad MCPs**: Query each connected advertising platform
(google-ads, meta-marketing, linkedin-marketing, tiktok-ads) for current-period spend — total spend to date,
daily spend breakdown, campaign-level spend distribution, and cost metrics (CPC, CPM, CPA per campaign).
4. **Calculate pacing per platform**: Execute `python "${CLAUDE_PLUGIN_ROOT}/scripts/ad-budget-pacer.py" --budget {total} --period-days {N} --days-elapsed {N} --spend-to-date {amount}` with spend data
and budget targets to compute days elapsed/remaining, budget consumed vs expected pacing percentage, pacing
ratio (actual / expected), daily burn rate (7-day average), and burn rate trend (accelerating/steady/decelerating).
5. **Project end-of-period spend**: Extrapolate current daily burn rate to end of period for each platform —
produce best-case (lowest recent daily spend), expected (7-day average), and worst-case (highest recent daily
spend) projections.
6. **Compare to budget targets**: For each platform, calculate the gap between projected end-of-period spend and
the budget target — express as both dollar amount and percentage variance.
7. **Flag pacing issues**: Generate alerts — overpace critical (>120%, immediate action: reduce bids, pause
low-performers, set daily caps), overpace warning (110-120%, proactive adjustments this week), underspend
warning (<70%, increase bids or expand targeting or reallocate), underspend info (70-85%, monitor).
8. **Pull efficiency metrics**: For each platform, retrieve CPA, ROAS, conversion volume, and cost per conversion
so reallocation decisions are performance-informed, not just pacing-based.
9. **Recommend reallocations**: Execute `python "${CLAUDE_PLUGIN_ROOT}/scripts/budget-optimizer.py"` with current spend
efficiency data to suggest specific dollar-amount shifts from underspending or low-efficiency platforms to
high-performing ones with room to scale. Include rationale for each recommended move.
10. **Save budget snapshot**: Persist the current pacing snapshot via
`python "${CLAUDE_PLUGIN_ROOT}/scripts/performance-monitor.py" --brand {slug} --action save-snapshot --data '{...pacing metrics...}'`
for historical tracking, trend analysis, and comparison in future budget-tracker runs.
## Output
A structured budget dashboard containing:
- **Budget summary**: Total budget for the period, total spent to date, total remaining, overall pacing
percentage, days elapsed, days remaining, projected end-of-period total, and overall health status
(on track, overpacing, underpacing)
- **Per-platform spend table**: Platform name, budget target, actual spend to date, pacing percentage,
daily burn rate (7-day avg), projected end-of-period spend, variance from target ($ and %),
and status flag (green/yellow/red)
- **Pacing visualization data**: Daily spend trajectory vs ideal linear pacing for each platform —
highlights where spend is accelerating, decelerating, or tracking evenly across the period
- **Overspend/underspend alerts**: Priority-ordered list of pacing issues with severity, platform,
current pacing %, projected variance, and specific recommended corrective action
- **Reallocation recommendations**: Specific dollar-amount shifts between platforms with rationale — e.g.,
"Move $2,000 from LinkedIn (62% pacing, $85 CPA) to Google Ads (98% pacing, $22 CPA, room to scale)"
- **Efficiency context**: Per-platform CPA, ROAS, conversion volume, and cost trend alongside spend data
so budget decisions account for performance quality, not just pacing
- **Daily burn rate breakdoDesign a statistically rigorous A/B or multivariate test plan — If/Then/Because hypothesis, control and variant specs, required sample size per variant (absolute vs relative MDE via sample-size-calculator.py), test duration, guardrail metrics, stopping rules, and go/no-go decision criteria. Triggers on \"/digital-marketing-pro:ab-test-plan\", \"set up an A/B test\", \"how long should my test run\", \"calculate sample size for an experiment\", \"is this test result significant\". Reads the brand profile and past campaign-tracker results to avoid re-testing validated hypotheses; finished tests are evaluated with significance-tester.py by the cro-specialist agent.
Generate 3-5 ad copy variations per platform — headlines, descriptions, and CTAs formatted to Google, Meta, LinkedIn, TikTok, X, and Pinterest specs — each scored 1-10 with policy-compliance flags, A/B testing groupings, and a message-match check against the landing page. Triggers on \"/digital-marketing-pro:ad-creative\", \"write ad copy for Meta\", \"give me RSA headline variations\", \"we need LinkedIn ad copy\", \"draft TikTok ad creative\". Reads the brand profile, guidelines, and compliance rules; routes video ad scripts to /digital-marketing-pro:video-script and gates AI-generated visuals for EU campaigns through /digital-marketing-pro:c2pa-metadata and /digital-marketing-pro:check.
Walk through adding a custom MCP server integration to the plugin — searches npm for an existing MCP package (or scaffolds a custom server from the plugin's guide), generates the exact .mcp.json entry, sets up environment-variable credentials, tests connectivity, and documents the tools the new server exposes. Triggers on \"/digital-marketing-pro:add-integration\", \"connect Ahrefs to the plugin\", \"add a new MCP server\", \"integrate our internal API\", \"hook up Stripe data\". Reads the brand profile and agency credential profiles at ~/.claude-marketing/credentials/ to map client-specific keys; custom builds follow skills/context-engine/custom-mcp-guide.md.
Audit how a brand appears across the 6 canonical AI answer surfaces — ChatGPT, Perplexity, Google AI Mode, AI Overviews, Gemini, Copilot — probing 10-25 queries into a numbered output bundle with per-platform visibility scorecards, citation-accuracy checks, a competitor matrix, content gaps, and an optimization playbook behind a four-gate quality scorecard. Triggers on \"/digital-marketing-pro:aeo-audit\", \"does ChatGPT know about our brand\", \"check our AI search visibility\", \"how does Perplexity describe us\", \"are we showing up in AI Overviews\". Reads the brand profile; reconciles probes against GSC actuals via /digital-marketing-pro:gsc-ai-performance and defines the AI-visibility scoring standard reused by geo-monitor and share-of-voice.
Strategy module for Answer Engine / Generative Engine Optimization — audits AI visibility, restructures content for citation, runs entity-consistency checks across Knowledge Graph, Wikidata, Wikipedia, Crunchbase, and LinkedIn, and produces JSON-LD schema specs, monitoring frameworks, and a 90-day LLM content strategy. Triggers on \"/digital-marketing-pro:aeo-geo\", \"how do we get cited by AI\", \"optimize for AI Overviews\", \"fix our entity consistency\", \"do we need llms.txt\". Reads the brand profile, compliance rules, and industry benchmarks; its measurement counterpart is /digital-marketing-pro:aeo-audit, with GSC actuals via /digital-marketing-pro:gsc-ai-performance.
Generate a portfolio-level dashboard across ALL client brands — per-client RAG health scores, campaign activity, budget pacing, aggregate KPIs, team utilization, pending approvals, upcoming deadlines, and an alerts panel — built for agency standups and weekly reviews. Triggers on \"/digital-marketing-pro:agency-dashboard\", \"how are all our clients doing\", \"portfolio health check\", \"budget pacing across accounts\", \"which accounts are at risk\". Enumerates every brand under ~/.claude-marketing/brands/ and pulls data via campaign-tracker.py, execution-tracker.py, and team-manager.py; drill into a single client with /digital-marketing-pro:performance-report or /digital-marketing-pro:client-report.
Invoke when the user needs to manage multiple client brands, view portfolio-level dashboards, generate client reports, manage SOPs, switch credential profiles, assign team tasks, configure regions, or generate executive summaries. Triggers on requests involving multi-client management, agency workflows, client onboarding, or portfolio oversight.
Invoke when the user needs help with marketing measurement, KPI definition, dashboard design, attribution reporting, performance analysis, competitive benchmarking, or translating data into marketing decisions. Triggers on requests involving metrics, reporting, analytics setup, or data interpretation.