wrong-number-debugging

wrong-number-debugging is a skill for Claude Code from lancegui/causal-powers. It costs 150 tokens per session (2,445 once invoked), scanned A, original, MIT.

A method for finding the source of a surprising result in an analysis pipeline. It checks joins, filters, groupings, and recoding step by step until the result first becomes wrong.

In plain words
What is it for?
Use it when code runs without errors but a total, average, count, coefficient, or other computed number is incorrect or does not agree with another result.
Why use it?
It prevents quick patches from hiding the real data problem. The workflow reproduces the result, locates the faulty stage, explains it, fixes the source, and checks the expected result again.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the causal-powers plugin — 19 skills, 2 agents, 5 hooks shipped together

Good fit Use it when code runs without errors but a total, average, count, coefficient, or other computed number is incorrect or does not agree with another result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lancegui/causal-powers/wrong-number-debugging
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add lancegui/causal-powers --skill wrong-number-debugging
Clone the repo
git clone --depth 1 https://github.com/lancegui/causal-powers

Made for: Claude Code.

Or install causal-powers, the plugin that ships this one along with the rest of its 19 skills, 2 agents, 5 hooks.

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 wrong-number-debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/lancegui/causal-powers/wrong-number-debugging/github.svg)](https://agentmods.dev/skills/lancegui/causal-powers/wrong-number-debugging)
Your own site
<a href="https://agentmods.dev/skills/lancegui/causal-powers/wrong-number-debugging"><img src="https://agentmods.dev/badge/skills/lancegui/causal-powers/wrong-number-debugging/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 wrong-number-debugging

Your own site · 80×15
<a href="https://agentmods.dev/skills/lancegui/causal-powers/wrong-number-debugging"><img src="https://agentmods.dev/badge/skills/lancegui/causal-powers/wrong-number-debugging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,445 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.00150 $0.02445
Opus 5.5 $0.00060 $0.00978
Sonnet 5.5 $0.00030 $0.00489
Haiku 4.5 $0.00015 $0.00245

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

Security

Grade A, and why

wrong-number-debugging 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 1mo 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.

skills/wrong-number-debugging/SKILL.md · 92 lines

How it starts

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

Wrong-Number Debugging

Overview

A surprising number is data trying to tell you something. The instinct is to patch it — add a dropna, a distinct, a filter — until it looks reasonable. That instinct is how a symptom gets hidden and the real bug ships. Routing: code THROWS or a test fails → superpowers:systematic-debugging. Code runs CLEAN but the number is wrong → this skill. Either way, a remedy that changes design/sample/spec is analysis-checkpoints territory, not a fix.

Core principle: Locate the bug by bisecting the pipeline, not by guessing at fixes. The number is wrong somewhere specific — find where, then you'll know why.

Why analytics debugging is its own thing

In software a bug announces itself with a stack trace pointing near the cause. In analysis there is no trace — the pipeline ran clean, and the only signal you have is that the output is wrong. Work backward through the chain of joins, filters, groupings, and recodes, checking the number at each stage, until you find where it stopped being right. That stage contains the bug.

The loop

REPRODUCE  →  LOCATE (bisect)  →  EXPLAIN  →  FIX AT THE SOURCE  →  RE-CONTRACT
  1. REPRODUCE — Pin the wrong number down to a deterministic, minimal case. Same input, same seed, same result every time. If it's intermittent, you have hidden state (ordering, randomness, a mutated global) and that is the bug. Shrink to the smallest subset of rows that still shows it — debugging on 50 rows beats debugging on 50 million.

    Then state the diagnostic roadmap and get a quick nod before running scans. A bisection is a multi-step plan — state it in 2–4 lines: the stages you'll check, in what order, where you'll start. "Roadmap: (1) pull the flagged records, (2) check X, (3) scan the panel for the pattern, (4) trace how it's produced. Stays a diagnosis — any drop/merge comes back to you. Good, or reprioritize?" Get agreement once, then execute autonomously — only re-stopping if a step turns into a design/sample/spec change. This is where the user's local knowledge reorders your search cheaply. Skip it for a one-or-two-step check.

Read the full file on GitHub · 92 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. 1mo ago First seen · 92 lines · 150 tokens per session scan A 1b4afe7fff9f

Subscribe to this mod's changes

wrong-number-debugging is a skill published in the GitHub repository lancegui/causal-powers (2 stars, last pushed 16d ago), licensed MIT. It adds 150 tokens to every session and 2,445 once invoked, about $0.0006 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

diagnose

Root-cause a failing or wrong empirical result with a disciplined reproduce → minimise → hypothesise → instrument → fix loop, instead of guessing-and-poking. Use when the user says "why is my regression wrong", "this number changed", "my script errors out", "the result won't reproduce", "debug this", "this estimate…

pedrohcgs/claude-code-my-workflow · 0 tokens

adjudicate-review

Turn an incoming set of findings — from an AI reviewer, a referee report, a code review, a linter, or a second model — into verified fixes, without letting a confident misread damage correct work. Every finding is a CANDIDATE until checked against the actual source. Use whenever you receive review comments, audit…

pedrohcgs/claude-code-my-workflow · 101 tokens

blast-radius

Before and after changing anything shared — a function's return value, a signature, a schema, a label set, a config default, a constant, a file format — find every consumer and actually run them. Catches the change that looks purely additive but silently breaks a contract in a file you never opened. Use when editing…

pedrohcgs/claude-code-my-workflow · 97 tokens

issue-patrol

Automated GitHub issue scanning, triage, and fix loop.

statsclaw/statsclaw · 17 tokens

debug

Auto-diagnose pipeline failures — checks dependencies, validates files, searches for fixes. Use when user says 'debug my analysis', 'why did it fail', 'fix the error', or 'diagnose the problem'.

OpenAnalystInc/10x-analyst-loop · 46 tokens

slide-excellence

Multi-agent comprehensive slide review (visual + pedagogy + proofreading, plus TikZ / parity / substance conditionally). Use when user says "full review", "excellence pass", "comprehensive check", "review everything", "pre-release review", "slide excellence", or before teaching / shipping a deck. Fanout wrapper — for…

pedrohcgs/claude-code-my-workflow · 94 tokens