shadow-analytics
Skill1 starsChanged 7 days agoMITView on GitHub
Use when designing product KPIs, tracking events, funnels, A/B tests, SRM, CUPED, or causal analysis. Not for SLOs (/shadow-observe).
In this repository59 other files it gives its agents.
- shadow-visual-refinementSkill
- antislop-codeSkill
- antislop-copywritingSkill
- antislop-humanSkill
- antislop-layoutmobileSkill
- antislopSkill
- antislop-uiSkill
- context7Skill
- handoffSkill
- modern-web-guidanceSkill
- shadow-accessibilitySkill
- shadow-ai-engSkill
- shadow-apiSkill
- shadow-architectSkill
- shadow-authSkill
- shadow-bootstrapSkill
- shadow-browserSkill
- shadow-cacheSkill
- shadow-compatSkill
- shadow-concurrencySkill
- shadow-dataSkill
- shadow-dbSkill
- shadow-debugSkill
- shadow-designSkill
- shadow-discoverySkill
- shadow-docSkill
- shadow-domainSkill
- shadow-eaSkill
- shadow-emailSkill
- shadow-evalSkill
- shadow-finopsSkill
- shadow-gitSkill
- shadow-grcSkill
- shadow-handoverSkill
- shadow-illustrationSkill
- shadow-integrateSkill
- shadow-maintainSkill
- shadow-mobileSkill
- shadow-modernizeSkill
- shadow-monarchSkill
- shadow-observeSkill
- shadow-opsSkill
- shadow-perfSkill
- shadow-planSkill
- shadow-pmoSkill
- shadow-presalesSkill
- shadow-privacySkill
- shadow-qualitySkill
- shadow-realtimeSkill
- shadow-refactorSkill
- shadow-releaseSkill
- shadow-resilienceSkill
- shadow-searchSkill
- shadow-secSkill
- shadow-seoSkill
- shadow-supplychainSkill
- shadow-testSkill
- shadow-uatSkill
- shadow-videoSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill whenever the Monarch designs KPI frameworks, tracking plans, identity graphs, privacy-compliant analytics pipelines, …
- Very specific: line 14
Hard Randomization & SRM Gate: Always separate Assignment (ITT) from Exposure (triggered identically across Control and Treatment).
- Very specific: line 20
Run offline checks (L0/L1) before claiming VERIFIED-LOCAL:
- Distinctive: line 52
Do not load unrelated references unnecessarily.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Shadow Analytics (/shadow-analytics) — Product Analytics & Experimentation Engineering
Use this skill whenever the Monarch designs KPI frameworks, tracking plans, identity graphs, privacy-compliant analytics pipelines, funnel/retention/behavioral analyses, A/B experiments, quasi-experimental causal studies, or executive ship decisions.
1. Core Engineering Principles & Non-Negotiables
- Metric & Contract Rigor: Anchor decisions on a value-driven North Star Metric, OEC, and blocking guardrails. Enforce
Object_Actionevent naming,schema_version, zero raw PII, and occurrence-unique retry-stableevent_id(UUIDv7) on repeatable events (deterministic entity keys apply strictly to once-per-entity domain transitions). - Truthful Instrumentation & End-to-End Privacy: Use server-side events as the source of truth for revenue/billing, pair with consented first-party client telemetry, rotate
anonymous_id(reset()) on logout/shared kiosks, and orchestrate multi-vendor DSAR deletion across BOTH the warehouse and third-party vendors (PostHog/GA4/Mixpanel/ESP) — deleting onlyanalytics_identity_mapis non-compliant. - Hard Randomization & SRM Gate: Always separate Assignment (ITT) from Exposure (triggered identically across Control and Treatment). Compute Pearson chi-square SRM at
alpha = 0.001; BLOCK shipping (BLOCKED_SRM) wheneversrm_p < 0.001regardless of positive lift (e.g. +12%, p = 0.02). - Statistical & Causal Precision: Match estimator to metric structure (Z-test for user proportions, Welch's t-test for continuous, Delta Method / cluster bootstrap for ratio metrics, cluster-robust SE for clusters, mSPRT / Group Sequential for peeking, Holm-Bonferroni vs Benjamini-Hochberg FDR). CUPED covariates MUST be strictly pre-experiment (
< assignment_ts). Use DiD / Synthetic Control / RDD / AIPW with falsification checks when RCTs are infeasible. - Cross-Skill Boundaries: Delegate backend logging/Prometheus/OTel SRE to
/shadow-observe, OLTP DB migrations/RLS to/shadow-db//shadow-data, UU PDP legal/DPIA governance to/shadow-privacy, and search visibility/CrUX SEO to/shadow-seo.
2. Deterministic Verification CLI & Scenario Benchmarks
Run offline checks (L0/L1) before claiming VERIFIED-LOCAL:
python "shadow-analytics/scripts/analytics_experiment_verifier.py" --self-test
python "shadow-analytics/scripts/analytics_experiment_verifier.py" --check-event path/to/event.json
python "shadow-analytics/scripts/analytics_experiment_verifier.py" --check-experiment path/to/experiment.json
python "shadow-analytics/scripts/analytics_experiment_verifier.py" --check-dsar-plan path/to/dsar_plan.json
python -m unittest discover -s "shadow-analytics/tests" -vGraded specialist scenarios live in evaluations.md (13 scenarios including the SRM p = 0.0002 vs +12% lift, p = 0.02 ship-gate benchmark, ratio Delta Method, CUPED leakage, mSPRT peeking, marketplace switchbacks, DiD parallel trends, and multi-vendor DSAR).
Reference Guide
Load only the 1–2 modules matching the active subtask (never load all 15 at once):
| Task / Scenario | Tier | Load Reference |
| North Star Metric, OEC, metric trees, anti-Goodhart guardrails & metric governance | CORE | references/01-product-metrics-and-kpi-design.md |
Object_Action taxonomy, typed contracts, occurrence-unique retry-stable event_id, versioning | CORE | references/02-event-taxonomy-and-tracking-plans.md |
anonymous_id -> identify -> reset(), cross-device stitching, sessions, shared-kiosk protection | CORE | references/03-identity-resolution.md |
| UU PDP / GDPR consent gate, PII scrubbing, retention TTLs & multi-vendor DSAR orchestration | CORE | references/04-privacy-and-consent-architecture.md |
Hybrid client/server SDKs, first-party /ingest proxy, sendBeacon, PostHog/GA4/Mixpanel, bots | CORE | references/05-analytics-instrumentation.md |
| Raw/Silver/Gold warehouse modeling, clock-skew clamping, late-arriving mobile events, dedup | ADVANCED | references/06-analytics-data-architecture.md |
| Schema validation quarantine/DLQ, freshness/completeness SLAs, volume anomaly & CI contract gates | OPERATIONAL | references/07-data-quality-and-observability.md |
| Strict ordered vs unordered funnels, conversion windows, right-censoring & Simpson's paradox | CORE | references/08-funnel-and-conversion-analytics.md |
| Activation, N-day vs bracket vs unbounded retention SQL, cohort masking & lifecycle Quick Ratio | CORE | references/09-retention-and-cohort-analysis.md |
L7/L28 power-user curves, journey/path SQL, behavioral cohorts & RFM applicability limits | ADVANCED | references/10-behavioral-and-segmentation-analytics.md |
| Salted bucketing, Assignment vs Exposure (ITT/LATE), A/A tests, SRM taxonomy & exclusion layers | CORE | references/11-experiment-design-and-randomization.md |
| Power/MDE, Estimator Matrix, Welch's t, Delta Method, valid pre-experiment CUPED, FWER/FDR | ADVANCED | references/12-statistical-inference.md |
| Sequential testing (mSPRT / O'Brien-Fleming GST), cluster randomization & marketplace switchbacks | SPECIALIST | references/13-advanced-experimentation.md |
| Quasi-experiments: Difference-in-Differences (DiD), Synthetic Control, PSM/AIPW, RDD & falsification | SPECIALIST | references/14-causal-inference.md |
| 4-gate Ship/Iterate/Rollback Decision Records, CI reading, novelty decay, holdouts & flag cleanup | OPERATIONAL | references/15-decision-science-and-reporting.md |
Do not load unrelated references unnecessarily.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

