analytics-with-claude-code: Skill for Claude Code

.claude/skills/ab-test/SKILL.md

ab-test is a skill for Claude Code from adityawrk/analytics-with-claude-code. It costs 59 tokens per session (4,926 once invoked), scanned A, original, MIT.

An analysis process for A/B tests, which compare two or more versions to see which performs better. It checks whether the result is statistically reliable and whether the test had enough users or data.

In plain words
What is it for?
Use it to review experiment setup, calculate statistical significance, check sample size, and decide whether a version should ship.
Why use it?
It helps separate real improvements from random differences and points out when the available data is not enough. It also considers negative effects on other important measures.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is adityawrk/analytics-with-claude-code's own configuration. It tells Claude Code how to work on analytics-with-claude-code itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything analytics-with-claude-code configures →

Reuse

Borrowing it

Nothing to install: this file belongs to adityawrk/analytics-with-claude-code. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/adityawrk/analytics-with-claude-code/main/.claude/skills/ab-test/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/adityawrk/analytics-with-claude-code

Made for: Claude Code.

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 ab-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/adityawrk/analytics-with-claude-code/ab-test/github.svg)](https://agentmods.dev/skills/adityawrk/analytics-with-claude-code/ab-test)
Your own site
<a href="https://agentmods.dev/skills/adityawrk/analytics-with-claude-code/ab-test"><img src="https://agentmods.dev/badge/skills/adityawrk/analytics-with-claude-code/ab-test/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ab-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/adityawrk/analytics-with-claude-code/ab-test"><img src="https://agentmods.dev/badge/skills/adityawrk/analytics-with-claude-code/ab-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,926 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00059 $0.04926
Opus 5.5 $0.00024 $0.01970
Sonnet 5.5 $0.00012 $0.00985
Haiku 4.5 $0.00006 $0.00493

Measured 2mo ago against content hash 341308711c58, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ab-test 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 2mo 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.

.claude/skills/ab-test/SKILL.md · 500 lines

How it starts

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

A/B Test Analyzer

You are a senior experimentation analyst. When given A/B test data, you will perform a rigorous, multi-step analysis and produce a clear recommendation. Follow every step below. Do not skip steps. If data for a step is unavailable, note it as "Not Assessed" and explain what data would be needed.

Step 0: Environment Setup

import pandas as pd
import numpy as np
from scipy import stats
from scipy.stats import norm, chi2_contingency
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings('ignore')

SIGNIFICANCE_LEVEL = 0.05  # default, user can override
POWER = 0.80               # default, user can override

Step 1: Test Configuration Review

Before analyzing results, document the test setup:

TEST CONFIGURATION
==================
Test Name:           [name]
Hypothesis:          [clear statement: "Changing X will increase Y by Z%"]
Primary Metric:      [e.g., conversion rate, revenue per user]
Secondary Metrics:   [list]
Guardrail Metrics:   [metrics that must NOT degrade, e.g., page load time, error rate]
Test Type:           [A/B, A/B/C, A/B/n]
Allocation:          [e.g., 50/50, 80/20]
Unit of Randomization: [user, session, device, cookie]
Start Date:          [date]
End Date:            [date or "still running"]
Target Population:   [all users, mobile only, new users, etc.]
Minimum Detectable Effect (MDE): [X% relative change]

If the user does not provide these details, ask for them. The hypothesis and primary metric are essential -- do not proceed without them.

Step 2: Pre-Analysis Validation

2.1 Sample Ratio Mismatch (SRM) Test

This is the single most important diagnostic. If the actual split differs significantly from the expected split, the test is invalid.

def check_srm(n_control, n_treatment, expected_ratio=0.5):
    """
    Chi-squared test for Sample Ratio Mismatch.
    expected_ratio is the expected proportion in treatment.
    """
    total = n_control + n_treatment
    expected_control = total * (1 - expected_ratio)
    expected_treatment = total * expected_ratio

    chi2 = ((n_control - expected_control)**2 / expected_control +
            (n_treatment - expected_treatment)**2 / expected_treatment)
    p_value = 1 - stats.chi2.cdf(chi2, df=1)

    actual_ratio = n_treatment / total
    return {
        'expected_ratio': expected_ratio,
        'actual_ratio': round(actual_ratio, 4),
        'chi2_statistic': round(chi2, 4),
        'p_value': round(p_value, 6),
        'srm_detected': p_value < 0.001,  # use stricter threshold for SRM
        'severity': 'CRITICAL' if p_value < 0.001 else 'OK'
    }

Read the full file on GitHub · 500 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. 2mo ago First seen · 500 lines · 59 tokens per session scan A 341308711c58

Subscribe to this mod's changes

ab-test is a skill published in the GitHub repository adityawrk/analytics-with-claude-code (6 stars, last pushed 8mo ago), licensed MIT. It adds 59 tokens to every session and 4,926 once invoked, about $0.0002 per session on Opus 5.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-31.

Related

Other skills, from other repositories

snowflake-dbt-model-refactoring

Refactor a bloated dbt model on Snowflake safely and produce a quantified before/after report that explains which qualities improved and why — not just raw deltas. Extends the standard refactor flow with (1) downstream impact analysis via dbt-analyze, (2) row-count + column-hash parity validation via data-parity, (3)…

AltimateAI/data-engineering-skills · 195 tokens

optimizing-databricks-sql

Analyze DBSQL queries, including SQL embedded in notebooks (spark.sql(...), %sql cells), for anti-patterns, lint issues, and performance problems, using Databricks-specific dialect and platform knowledge (Delta, Photon, Unity Catalog) layered on top of altimate-code's generic SQL engine. Use when a user asks to…

AltimateAI/data-engineering-skills · 98 tokens

mssql-to-snowflake-dbt-migration

Convert MS SQL Server source code (stored procs, views, T-SQL scripts) into dbt models targeting Snowflake, with build-first-then-parity, isolated-schema deployment, and a migration dashboard. Use when: (1) User says "migrate this T-SQL to dbt on Snowflake", "convert these stored procs end-to-end", "move from SQL…

AltimateAI/data-engineering-skills · 240 tokens

end-to-end-snowflake-pipeline

Build an end-to-end Snowflake pipeline — ticket → dbt models + orchestration DAG → PR → self-review → ticket comment. Use when: (1) User says "build a pipeline for X end-to-end", "create an end-to-end flow", "set up the pipeline per JIRA-123" (2) Scope spans dbt models AND orchestration AND a PR — not just one of them…

AltimateAI/data-engineering-skills · 221 tokens

snowflake-query-optimization

End-to-end Snowflake query optimization — fetch, rewrite, prove parity, benchmark, report. Use when: (1) User wants an end-to-end flow (fetch + rewrite + parity + benchmark + report), not just a rewrite (2) Input is a .sql file path in the repo (optionally :L10-L80 line range), OR a Snowflake queryid (UUID) (3) User…

AltimateAI/data-engineering-skills · 221 tokens

dbt-model-enhancement

Scoped enhancement of ONE existing dbt model from a ticket, with a validated PR as the deliverable. Use when: (1) User says "update per JIRA-123", "add column X to this model", "enhance based on this ticket" (2) Task is a scoped change to a specific existing model — one model, one ticket, one PR (3) User expects dbt…

AltimateAI/data-engineering-skills · 198 tokens