predictive-modeling

A guide for building prediction models that score, rank, classify, flag, or forecast individual items to support a decision. It emphasises avoiding data leakage and treating predictions as correlations rather than proof of cause.

In plain words
What is it for?
Use it when a prediction will drive an action, such as ranking risk, selecting cases for review, identifying likely churn, or detecting unusual activity.
Why use it?
It helps prevent models from looking accurate because they used information unavailable at decision time or from being misread as showing that one factor caused an outcome.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/lancegui/causal-powers/predictive-modeling
Any agent
npx skills add lancegui/causal-powers --skill predictive-modeling
Clone the repo
git clone --depth 1 https://github.com/lancegui/causal-powers

Made for: Claude Code, Codex.

Per session 207 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,213 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00207 $0.04213
Opus 5 $0.00103 $0.02107
Sonnet 5 $0.00041 $0.00843
Haiku 4.5 $0.00021 $0.00421

Measured 2d ago against content hash 66c3da8454f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

predictive-modeling 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 2d 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/predictive-modeling/SKILL.md · 138 lines

How it starts

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

Predictive Modeling

Overview

Causal identification asks what an intervention did; structural estimation asks what a world we haven't seen would do. Prediction asks something narrower: given what I can observe about a unit now, what is likely true of it — so I can act on it. Score the claim, rank the account, flag the pharmacy. The deliverable is a number on a unit that drives a decision; the model is a means, not the point.

The signature failure of this discipline is leakage. A feature that encodes the answer — a timestamp that exists only after the outcome, a row that appears in both train and test — makes the model look brilliant in validation and fail on the units you actually act on. The harness says 0.99 AUC; deployment says coin flip, and nothing in the loss curve tells you so.

There is a twin failure: reading the model as causal. The boosting machine ranks "prior audit flag" as the top feature, and the analyst writes "prior flags drive diversion." It does no such thing — the feature correlates with the label; the model uses it to predict, not because it causes anything. A predictive model is a correlation engine pointed at an action, and treating its internals as mechanism is how a triage tool becomes a false causal story.

Core principle: a prediction is trustworthy only if it was evaluated the way it will be deployed. Everything below serves that one sentence — the split, the leakage probe, the calibration, the baseline — and a model that scores well under any other evaluation has told you nothing about the units you will act on.

Why are you modeling? — choose the arm before you fit

This is the fork. One question decides which of three families you're in, and they lead to three different workflows:

What you actually need The deliverable Workflow
An effect that occurred — "did the policy work?", "what did the price cut do?" A causal estimate inside the data causal-identification
A world you haven't observed / a welfare number — "what price would the merged firm set?" A counterfactual outside the data structural-estimation
To predict / score / rank / flag units to drive an action A number on a unit here

Read the full file on GitHub · 138 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 138 lines · 207 tokens per session scan A 66c3da8454f0

Subscribe to this mod's changes

predictive-modeling is a skill published in the GitHub repository lancegui/causal-powers (2 stars, last pushed 8d ago), licensed MIT. It adds 207 tokens to every session and 4,213 once invoked, about $0.0010 per session on Opus 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

audit-reproducibility

Enforce the replication-protocol.md rule by cross-checking numeric claims in a manuscript against the actual R / Stata / Python outputs. Report PASS/FAIL per claim against tolerance thresholds. Use before submission and before releasing a replication package.

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

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 · 145 tokens

capture-environment

Snapshot the computational environment for a replication package — detects the analysis stack (R / Stata / Python) and emits the right lockfiles (renv.lock + sessionInfo.txt, requirements.txt / environment.yml / uv.lock, Stata version + ado package list), records seeds and RNG kind, optionally writes a pinning…

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

checkpoint

Save a structured state snapshot before stopping or handing off. Captures the active plan, recent decisions, file pointers (with line numbers), open questions, and the next 1–3 actions into a checkpoint file under qualityreports/checkpoints/. Optionally proposes [LEARN] entries to add to MEMORY.md. Use when user says…

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

coauthor-brief

Generate a co-author / collaborator handoff brief for a multi-author, multi-machine project — summarizing what changed since the last brief (git delta), the current state of each artifact (manuscript, analysis, slides), open questions, how to reproduce locally, and any restricted-data access steps. Use when user says…

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

data-management-plan

Draft a funder-compliant Data Management Plan (NSF DMP, NIH DMS Policy 2023, ERC, Horizon Europe) by composing the confidential-data and environment-capture primitives. Sections cover data description, formats/metadata, storage/backup, access/sharing, preservation/archiving, and roles. Use when user says "data…

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