Red-Team Formula

    1

    Most wrong numbers aren't wrong because of bad maths.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Red-Team Formula

    Example session with this skill installed

    red-team-formula: 90-day repeat rate for the August cohort. SQL: SELECT COUNT(DISTINCT CASE WHEN n >= 2 THEN customer_id END) * 1.0 / COUNT(DISTINCT customer_id) FROM (SELECT customer_id, COUNT(*) n FROM sales WHERE created_at >= '2026-08-01' GROUP BY customer_id) t

    • Read your context and instructions
    • Compiled the red-team formula

    Example on the fictional Ridgeline Outdoor shop, using the house rules bundled with the skill.

    1. Canonical source: no repeat-rate definition in reporting/metrics/ or dw.kpi_daily. ⚠️ This is a new formula.

    Input audit: COUNT(*) on sales counts header and line rows together, so a single checkout with two items makes the customer a "repeat buyer". Filter to row_type = 'header'.
    3.

    Filter audit: missing state IN ('paid','shipped','delivered'), so abandoned carts count as orders. Missing channel <> 'demo' and the staff-account exclusion. created_at is bucketed in the storage timezone.
    4.

    Cohort grain: created_at >= Aug 1 on any row pulls in existing customers who bought again in August. The cohort should start at the first paid checkout.
    5.

    Maturity: house rules say repeat cohorts need 120 days. August is about 100 days old, so the 90-day window is real but not comparable with mature cohorts.
    6. Divergence: not run, because only one version exists.

    🔴 Definition gap: don't quote this number until the grain, filters and cohort start are fixed.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Most wrong numbers aren't wrong because of bad maths. They're wrong because of a missing filter, a NULL, or a table that mixes two row grains. Red-Team Formula catches those before the number leaves your hands.

    What it does

    1. Canonical-source check: searches your production metric definitions first. If the formula already exists, it cites it and stops, so you don't invent a second version.
    2. Input audit: NULL behaviour, units and row grain for every column the formula touches.
    3. Filter audit: status, test/sample rows, zero-value lines and timezone, checked against your house rules.
    4. Cohort grain and maturity: which cohort definition you used, and whether the cohort is old enough for the window you're quoting.
    5. Divergence test: when two versions of a formula exist, finds the cohorts where they disagree.
    6. Verdict: ✅ production formula, ⚠️ define it before next use, or 🔴 don't quote it.

    Where it stops: it reviews a formula or SQL. It doesn't decide whether the metric is the right one to track.

    Free and MIT-licensed. It's part of pm-os, which also has a Claude Code plugin that triggers these checks automatically: https://github.com/hartejsingh99-cloud/pm-os

    It reasons over what you give it and what your agent can read. It doesn't run queries unless your agent already has a database tool. Without a house-rules file you get the generic checks; with one, it checks against your company's real filters and traps.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 5 days ago

    • Free with an Agensi account

    Permissions

    Read Files

    File Scopes

    .pm-os/house-rules.md
    ~/.claude/pm-os/house-rules.md

    Reads your optional house-rules file, plus any metric-definition files or SQL you point it to. It never writes files or calls the network.

    Listed5 days ago

    What's inside

    Frequently Asked Questions

    Yes. It's free and MIT-licensed, and the source is on GitHub: https://github.com/hartejsingh99-cloud/pm-os

    No. Without one you get the generic checks. With one (start from references/house-rules.example.md in the skill), it checks your company's real filters, column traps and metric sources.

    No. It reviews the formula or SQL you give it and reads the files you point it to. If your agent already has a database tool, it can use it to run the divergence test.

    New in Data & Databases