- Home
- Skills
- Data & Databases
- Red-Team Formula
Red-Team Formula
Most wrong numbers aren't wrong because of bad maths.
Free
Works with the AI Agents you already use
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.
- Canonical source: no repeat-rate definition in
reporting/metrics/ordw.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
- 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.
- Input audit: NULL behaviour, units and row grain for every column the formula touches.
- Filter audit: status, test/sample rows, zero-value lines and timezone, checked against your house rules.
- Cohort grain and maturity: which cohort definition you used, and whether the cohort is old enough for the window you're quoting.
- Divergence test: when two versions of a formula exist, finds the cohorts where they disagree.
- 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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
File Scopes
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.