designing-the-analysis
Use when you have an approved research question and need a concrete analysis plan, before touching outcome data or fitting any…
Use when a result is surprising, impossible, contradicts a sanity check, a pipeline fails, a model won't converge, or a replication fails - before adjusting anything
$ npx -y skills add K-Dense-AI/science-superpowers --skill investigating-anomalous-results --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/investigating-anomalous-resultsContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when a result is surprising, impossible, contradicts a sanity check, a pipeline fails, a model won't converge, or a replication fails - before adjusting anything
name: investigating-anomalous-results description: Use when a result is surprising, impossible, contradicts a sanity check, a pipeline fails, a model won't converge, or a replication fails - before adjusting anything
Random tweaks waste time and manufacture false findings. Quietly dropping the inconvenient data point, nudging the cutoff, or re-running until it "works" doesn't fix the problem — it fabricates a result.
**Core principle:** ALWAYS find the root cause before adjusting anything. An adjustment made before you understand the cause is, at best, noise and, at worst, fraud.
**Violating the letter of this process is violating the spirit of it.**
The first question for any anomaly: **is this a code bug, a data issue, or a real finding?** You cannot answer by guessing, and you must not "fix" it until you know — because a real finding is not something to fix.
NO ADJUSTMENTS WITHOUT ROOT-CAUSE INVESTIGATION FIRST
No dropping data, changing a test, transforming a variable, re-running with new parameters, or "cleaning" until Phase 1 is complete. If you haven't found the cause, you cannot justify the adjustment.
**Use this ESPECIALLY when:**
Complete each before the next.
**Before any adjustment:**
1. **Read the output/error carefully.** The exact value, the exact message, the stack trace. Note shapes, counts, and where in the pipeline it appears. 2. **Reproduce it deterministically.** Fixed seed, same data version. Does it happen every time? If not reproducible, gather more data — don't guess. 3. **Check recent changes.** What changed in the code, the data version, or the environment since it last looked right? `git diff`, data provenance, package versions. 4. **Gather evidence at each pipeline stage.** Instrument raw → cleaned → derived → result. Print shapes, ranges, null counts, and key summaries at each boundary. This reveals *where* the anomaly enters.
raw: N=10342, outcome mean=0.31, nulls=0 cleaned: N=10298, outcome mean=0.31, nulls=0 <- 44 dropped, expected derived: N=10298, feature mean=4e7 <- WRONG: unit blew up here result: coefficient enormous <- symptom; cause is upstream
5. **Classify the cause** with the evidence: code bug, data issue, or real finding. Do not proceed assuming one without evidence.
1. **Find a working comparison.** A subset, variable, site, or time period that behaves as expected. What's different about the anomalous one? 2. **Compare against a reference.** A known correct result, a textbook expectation, a prior estimate from the survey. Read the reference method completely — don't skim. 3. **List every difference** between working and anomalous, however small. Don't assume "that can't matter."
1. **Form a single hypothesis:** "The anomaly is caused by X because Y." Write it down. Be specific. 2. **Test minimally** on the smallest slice that exhibits it. One variable at a time. 3. **Verify before continuing.** Confirmed → Phase 4. Not confirmed → new hypothesis. Don't stack adjustments. 4. **When you don't know, say so.** "I don't understand why the derived feature inflates" — then investigate or ask. Don't pretend.
Resolve according to the cause you established:
**If 3+ adjustments fail:** STOP. The pipeline or the design may be wrong — repeated failures that each reveal a new problem indicate a structural issue, not a series of small bugs. Discuss the design with your human partner before another attempt. Re-opening the design or pre-registration must be documented as a deviation.
**All of these mean: STOP. Return to Phase 1.**
Science Superpowers is a complete computational-science methodology for your research agents, built on a set of composable skills plus initial instructions that make sure your agent actually uses them.
Use when you have an approved research question and need a concrete analysis plan, before touching outcome data or fitting any…
Use when facing 2+ independent investigations that can proceed without shared state - parallel literature survey, multi-dataset…
Use when your human partner has explicitly opted into exploratory or feasibility mode - a compute-heavy simulation, an unproven…
Use when you have a pre-registered analysis plan to execute inline in this session with review checkpoints, on a platform without…
You MUST use this before any data analysis or investigation - before exploring a dataset, loading or profiling data, running a…
Use before running any confirmatory analysis or looking at outcome data, when testing a hypothesis, computing a p-value, or about…