anomaly-scan
Detect marketing anomalies. Use when: traffic drops, cost spikes, conversion changes, deliverability issues, budget overruns.
What this skill does
# /digital-marketing-pro:anomaly-scan
## Purpose
Scan all connected marketing platforms for anomalies — statistically significant deviations from established baselines that could indicate problems (traffic drops, CPA spikes, deliverability collapse, budget overruns) or opportunities (viral content, conversion rate improvements, unexpected channel growth). Designed to catch issues early, before they compound into costly problems, and to surface wins worth amplifying.
## Input Required
The user must provide (or will be prompted for):
- **Sensitivity level**: Strict (flags deviations >1.5 standard deviations from baseline), normal (>2 std dev),
or relaxed (>3 std dev). Defaults to normal
- **Time period**: The window to scan for anomalies — today, last 3 days, last 7 days, last 30 days, or custom range.
Defaults to last 7 days
- **Platforms** (optional): Specific platforms to focus the scan on (e.g., "Google Ads and Meta only").
If omitted, all connected platforms are scanned
- **Metrics focus** (optional): Specific metrics to prioritize (e.g., "CPA and conversion rate only").
If omitted, all available metrics are evaluated
- **Baseline period** (optional): Custom baseline for comparison instead of the default.
Defaults to the rolling 30-day average maintained by performance-monitor.py
- **Exclude known events** (optional): List of known events to filter out (e.g., "Black Friday sale",
"site migration on Jan 15") so expected deviations are not flagged as anomalies
## 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. **Pull current metrics from all connected MCPs**: Query each connected analytics platform
(google-analytics, google-ads, meta-marketing, linkedin-marketing, tiktok-ads, mailchimp, stripe, mixpanel,
amplitude, shopify, etc.) for all available metrics across the specified scan period. Include traffic, spend,
conversions, CPA, ROAS, engagement rates, deliverability, and revenue metrics.
3. **Load historical baselines**: Execute `scripts/performance-monitor.py --brand {slug} --action get-baseline`
to retrieve rolling averages, standard deviations, and expected ranges for each metric. If no baseline exists yet,
use the comparison period data to establish a temporary baseline and note this in the output.
4. **Run anomaly detection**: Execute `scripts/performance-monitor.py --brand {slug} --action detect-anomalies --sensitivity {level}`
to flag metrics that fall outside expected ranges based on the chosen sensitivity threshold.
Apply day-of-week and seasonality adjustments where historical data supports it.
5. **Cross-reference with recent executions**: Check execution history via
`scripts/execution-tracker.py --brand {slug} --action get-history --days 14`
to correlate anomalies with recent changes — did a campaign launch, pause, budget shift, creative swap,
landing page change, or audience expansion precede the anomaly?
6. **Cross-reference with known factors**: Check for known platform outages, algorithm updates
(Google core updates, Meta policy changes), industry events, seasonal patterns, and any user-provided
known events that could explain the deviation.
7. **Classify anomalies by severity**: Critical (revenue-impacting, requires immediate action — tracking broken,
CPA 3x+ baseline, budget overspend >20%, deliverability below 80%), Warning (significant deviations worth
investigating within 24 hours — traffic down 30%+, engagement halved, CTR dropped 40%+), or Info (notable
but non-urgent — gradual trend shifts, minor CPA increases, seasonal patterns emerging).
8. **Determine probable causes**: For each anomaly, analyze root causes using the diagnostic framework from
`skills/analytics-insights/anomaly-diagnosis.md`. Categorize as data/tracking issue, external factor
(algorithm update, competitor action, seasonal shift), internal change (campaign modification, landing page
update), or platform change (policy update, feature deprecation, auction dynamics shift).
9. **Save critical anomalies as insights**: For critical and warning-level anomalies, persist via
`scripts/campaign-tracker.py --brand {slug} --action add-insight`
so they are tracked, surface in future reports, and can be referenced in post-mortems.
## Output
A structured anomaly report containing:
- **Scan summary**: Platforms scanned, time period analyzed, sensitivity level used, baseline period,
total anomalies detected (by severity), and overall marketing health assessment (healthy, caution, or critical)
- **Critical anomalies** (if any): Metric name, platform, expected range (mean +/- threshold), actual value,
deviation magnitude (in std devs and percentage), probable cause, estimated revenue impact, and recommended
immediate action
- **Warning anomalies**: Same structure as critical, with recommended investigation steps and a 24-hour
action plan for each
- **Info anomalies**: Notable deviations worth monitoring with watch criteria — what to look for to determine
if the trend continues or reverses
- **Correlation analysis**: Connections between anomalies and recent execution history — which changes may have
caused which deviations, with confidence levels (strong, possible, unlikely)
- **Platform health summary**: Per-platform health indicator (green/yellow/red) based on the number and severity
of anomalies detected, plus a trend vs the last scan if previous scan data exists
- **Recommended actions**: Priority-ordered list of responses — immediate fixes for critical issues, investigations
for warnings, monitoring adjustments for info items, and any baseline recalibrations needed
- **Baseline update notes**: Whether any baselines need recalibration due to structural changes (e.g., new campaign
launched, channel added, seasonal shift, or pricing change that permanently alters expected ranges)
## Agents Used
- **performance-monitor-agent** — Anomaly detection engine, baseline management, statistical threshold evaluation, historical trend analysis, severity classification, and seasonality adjustment
- **analytics-analyst** — Root cause interpretation, cross-platform correlation, contextual analysis (seasonality, algorithm updates, competitive shifts), impact estimation, and actionable recommendation generation
Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".