Skill detail
anomaly-scan
Direct marketing performance monitoring.
Inspect before use
Automated review checks relevance, not safety or endorsement. Read the source instructions before using this skill.
SKILL.md
The saved excerpt is a snapshot from review. The external source remains the complete and most current version.
---
name: anomaly-scan
description: "Detect marketing anomalies. Use when: traffic drops, cost spikes, conversion changes, deliverability issues, budget overruns."
---
# /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 `python "${CLAUDE_PLUGIN_ROOT}/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 `python "${CLAUDE_PLUGIN_ROOT}/scripts/performance-monitor.py" --brand {slug} --action detect-anomalies --data '{...current-period metrics...}'`
to flag metrics that fall outside the expected ranges computed from the stored baseline (mean ± standard deviations).
Apply day-of-week and seasonality adjustments where historical data supports it.
5. **Cross-reference with recent executions**: Check execution history via
`python "${CLAUDE_PLUGIN_ROOT}/scripts/execution-tracker.py" --brand {slug} --action get-history --limit 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 explaRead the full source on GitHub (opens external page)