Build or review source-backed descriptive, diagnostic, predictive, and prescriptive analysis for consequential decisions. Use when an agent must profile and safely prepare uploaded data, turn a real dataset or research question into a reproducible study, investigate drivers without overstating causality, validate a model, compare feasible actions under dependent uncertainty and tail risk, trace every parameter to evidence and approval, or produce an answer-first analytical report across health, business, finance, policy, engineering, operations, behavioral science, AI, or planning.
npx skills add https://github.com/limingrui679-design/high-stakes-analytics-decision-lab --skill high-stakes-analytics-decision-lab
Turn a real research question into a defensible path from source evidence to
prediction and, only when justified, action. Keep description, diagnosis,
prediction, causal inference, value judgments, and the final recommendation
visibly separate.
Classify the analytical request:
| Lens | Question | Required output |
|---|---|---|
| Descriptive | What is happening? | Baseline, trends, segments, denominators, and data limitations |
| Diagnostic | Why might it be happening? | Contributions, competing explanations, testable hypotheses, and a visible causal boundary |
| Predictive | What is likely to happen? | Forecast or risk distribution with out-of-sample validation and uncertainty |
| Prescriptive | What should be done—and how? | Feasible alternatives, trade-offs, recommendation, and reversal conditions |
Select diagnostic analysis when the request asks why a pattern occurred or
which drivers warrant investigation. Do not convert a correlated driver into
a cause without an identification strategy.
When only a question is available, generate a visual analysis blueprint:
python3 scripts/route_question.py "How should we allocate limited capacity?" \
--output-dir /absolute/path/to/blueprint
Use --scope full for the complete baseline-to-decision sequence. Use
--scope auto for the primary route and its prerequisites. Read
analytics-triad.md before routing an ambiguous
or multi-stage question.
Do not fabricate results when data are absent. State the required data,
metrics, horizon, validation design, alternatives, constraints, and affected
groups.
Before analysis, prefer an official, academic, or otherwise authoritative
source whose redistribution terms permit the intended repository use. Record:
license, and redistribution rule;
permitted analytical use;
Never substitute a synthetic case for an empirical project. Synthetic data are
allowed only as clearly separated engineering fixtures for deterministic,
property, boundary, or extreme-input tests. Read
real-evidence-workflow.md before
starting a new project.
Whenever a user supplies row-level data, preserve the source unchanged and run
the data-quality gate before calculating a descriptive result, fitting a model,
or comparing decisions. For a new dataset, initialize the complete review
workspace in one command:
python3 scripts/init_case.py /absolute/path/to/input.csv \
--question "Which groups are most likely to need support next month?" \
--output-dir /absolute/path/to/case-workspace
The initializer preserves and hash-checks the source, drafts the contract,
profiles quality, routes the question, and lists unresolved decisions. It must
not apply cleaning, fit a model, or generate a recommendation.
To run the gate separately, copy and complete
data-contract-template.json, then run:
python3 scripts/profile_dataset.py /absolute/path/to/input.csv \
--contract /absolute/path/to/data-contract.json \
--output-dir /absolute/path/to/readiness
For XLSX, Parquet, database, or multi-table inputs, hash the original and create
a traceable tabular extract; retain the conversion receipt, table relationships,
join checks, and original-versus-extract hashes.
The gate checks grain, schema, completeness, uniqueness, type and domain
validity, temporal reliability, distributions, privacy, and declared leakage
rules. It produces a visual Data Readiness Report, machine-readable findings,
and a dry-run cleaning plan with one of four statuses:
ready;ready_with_documented_limitations;needs_user_confirmation;blocked.Treat an inferred contract as profiling assistance, not permission to analyze:
missing intended use or grain must pause at needs_user_confirmation.
Duplicate or blank headers, unlabelled extra fields, missing predictive
features or targets, target-as-feature overlap, broken keys, and declared
leakage block the workflow. Apply user-declared missing sentinels and numeric
ranges exactly; do not silently expand them.
Run only safe_auto actions without asking. Require approval by action ID for
row deletion, column removal, imputation, outlier treatment, category merging,
unit or timezone conversion, target correction, or grain changes. Never execute
a non-executable manual-review action generically.
python3 scripts/prepare_dataset.py /absolute/path/to/input.csv \
--quality-report /absolute/path/to/readiness/data-quality-report.json \
--cleaning-plan /absolute/path/to/readiness/cleaning-plan.json \
--approve clean-003 \
--output-dir /absolute/path/to/prepared
Use the processed copy only after the post-cleaning gate permits the intended
route. Do not continue when the gate is blocked, and do not continue past
needs_user_confirmation until the relevant issue or cleaning choice is
resolved. Fail closed if the source hash, reviewed action definition, approval
ID, or raw/processed path binding changes. Read
data-quality-gate.md for the complete policy
and route-specific requirements.
Before forecasting or recommending:
For a narrow descriptive request, stop here. For diagnostic, predictive, or
prescriptive work, carry the baseline and data-quality findings into the next
stage.
Define the target, horizon, prediction grain, and information available at
decision time. Compare against a simple baseline and use a time-aware or
otherwise defensible validation design. Report calibration, uncertainty,
subgroup error, leakage risk, and drift.
A prediction of outcomes under an intervention is not automatically the causal
effect of that intervention. When the decision depends on intervention effects,
require experimental, quasi-experimental, or otherwise defensible causal
evidence.
When row-level evidence is supplied, select an executable method module before
building the decision case:
scripts/evidence_analysis.py for two-group binary, continuous, andtime-to-event evidence;
scripts/prediction_validation.py for held-out score validation,calibration, subgroup errors, and drift;
scripts/allocation_optimizer.py for a small discrete resource-allocationproblem with linear constraints and scenarios.
Read method-modules.md for commands, output
contracts, and method boundaries. Do not use a method merely because the
columns exist; match the estimand and decision. Read
advanced-method-boundaries.md when
using survival, repeated-measures, financial-risk, spatial, or responsible-AI
methods.
Identify:
Do not begin simulation while the alternatives or decision owner remain ambiguous. Ask only for information that materially changes the model.
Label every quantitative input as one of:
Never relabel an association, prediction, or scenario assumption as a causal effect. Read methodology.md before analyzing causal, clinical, financial, or safety-critical claims.
Copy case-template.json and replace every placeholder. Follow case-schema.md. Keep criterion identifiers and alternative identifiers stable and machine-readable.
Use fixed external scales rather than the observed minimum and maximum across current alternatives. This reduces rank reversal when an alternative is added.
Require criterion weights to be nonnegative. Normalize them during analysis.
Use schema 1.3. Represent marginal uncertainty with fixed, normal, uniform,
triangular, empirical, or bootstrap distributions and declare whether each
term is parameter, process, scenario, or no uncertainty. Preserve repeated,
temporal, market, campaign, participant, and geographic dependence through
shared resampling units or latent factors. Never leave material common shocks
independent merely for convenience.
Map every weight, scale, distribution field, scenario input, constraint
threshold, dependence loading, and model parameter to a traceable source and
approval chain. Read
provenance-contract.md.
Migrate a legacy 1.2 fixture without changing it in place:
python3 scripts/migrate_case_v12_to_v13.py old-case.json \
--output migrated-case.json
The migration conservatively labels every non-fixed legacy distribution as
parameter uncertainty. Review those labels before using the result.
Run from the skill directory:
python3 scripts/validate_case.py /absolute/path/to/case.json
Resolve every error. Treat warnings as disclosure requirements; do not silently suppress them.
Run:
python3 scripts/run_case.py /absolute/path/to/case.json \
--output-dir /absolute/path/to/output \
--samples 10000 \
--seed 20260726
The engine produces:
for P(best), CVaR10, breach U95, feasibility, and winner changes;
95% upper bounds, declared-support diagnostics, and signed margins;
correlation-stress, criterion, scenario, sensitivity, and group-impact
figures.
Use at least 10,000 samples for a shareable analysis. Use fewer only for a quick draft and label it accordingly.
Check whether:
the declared decision use;
Read reporting-standard.md before finalizing
a brief. Read visual-report-system.md
and editorial-visual-system.md before
producing a shareable visual report. The Evidence Intelligence Report is
the primary evidence product. A Decision Intelligence Brief is a
conditional downstream layer and must never replace, abbreviate, or hide the
primary evidence product. Read
domain-playbooks.md for domain-specific
criteria and failure modes. To select the smallest defensible analytical path
from the question and available data, read
method-routing.md.
Compose shareable reports as an evidence sequence, not as a chart gallery
followed by a text wall. Alternate a bounded result, its full-width visual,
the adjacent interpretation and claim boundary, then the next relevant
source, design, quality, or method block. Use compact tables for exact metrics
and contracts. Parameter-level registers and reproducibility receipts may be
placed in <details> blocks, but never hide the bottom line, methods,
validation result, uncertainty, limitations, or decision status. Every visual
must answer a stated analytical question; do not add decorative graphics merely
to break up prose.
Do not recommend an alternative merely because it has the highest expected utility. Prefer a feasible option with acceptable tail performance and disclose any robustness or equity trade-off.
If a simulation observes zero constraint breaches, never write “zero risk.”
Report the event count, the one-sided 95% upper bound, and whether the declared
input support mathematically excluded a breach. A bounded-support zero is an
assumption diagnosis, not evidence that real-world risk is impossible.
Use the fifteen-project case index when a
worked precedent would improve method selection or reporting. The bundle
contains fifteen complete, reproducible projects across operations, urban
information systems, marketing, responsible AI, financial risk, fintech,
real estate, wildfire decision analysis, regulatory filings, field
experiments, population health, public policy, repeated measures,
transportability, and spatial planning.
Each project includes its reviewed raw source snapshot, source manifest and
hashes, configuration, preparation and analysis code, Evidence Intelligence
Report, all figures, machine-readable results, and an evidence-matched
Decision Intelligence Brief. The Evidence Intelligence Report is the primary
project record. A Decision Intelligence Brief is added only when a separate
decision layer is justified; otherwise the analytical result itself records
the bounded terminal status. Decision Intelligence Briefs may
end in a bounded comparison, do_not_deploy, a randomized-pilot requirement,
targeted diligence, or an evidence request. Use
examples/real-data-cases/cases.json as the machine-readable case index.
Treat the projects as method precedents, not answer templates. Copy neither a
saved empirical result nor a threshold, weight, subgroup definition, causal
claim, or recommendation into a new case without new evidence and review.
Do not force every case into one report template. Keep a stable evidence spine,
then add only the fields, sections, methods, and figures required by the
selected route:
| Route | Case-specific additions | Valid terminal output |
|---|---|---|
| Descriptive | Cohort, denominator, coverage, trend, distribution, segment, and missingness fields | Baseline report or evidence request |
| Diagnostic | Contribution, process, comparison, and hypothesis fields | Prioritized explanations to test; causal boundary retained |
| Predictive | Target, horizon, split, baseline, discrimination, calibration, error, drift, and uncertainty fields | Validated prediction, negative validation, or do-not-deploy result |
| Prescriptive | Decision owner, alternatives, criteria, constraints, dependence, tail risk, sensitivity, and reversal fields | Bounded recommendation or no decision-ready recommendation |
Every route must still include the question, scope, source lineage, data-quality
status, supported findings, limitations, and next action. Dynamic fields must
be machine-readable and mirrored in the narrative; omit inapplicable sections
instead of filling them with generic prose.
For question routing, deliver:
analysis-blueprint.md explaining the selected routes, methods, required data,validity checks, and handoffs.
analysis-blueprint.json preserving the routing decision and data contract.figures/analytics-lifecycle.svg visualizing the question-to-decision path.For uploaded row-level data, deliver before analytical results:
data-quality-report.md and figures/data-quality-overview.svg as theanswer-first readiness decision.
data-quality-report.json, data-contract.json, and cleaning-plan.jsonas the machine-readable gate and dry-run remediation plan.
processed/analysis.csv,transformation-log.json, and a complete post-cleaning/ quality bundle.
The source file must remain unchanged. A blocked or confirmation-required
quality gate is a valid terminal output and must not be hidden by a downstream
analysis.
For every source-backed analytical project, deliver:
report.md as the Evidence Intelligence Report, including thequestion, evidence and data-quality contract, methods, validation, every
material figure with adjacent interpretation, uncertainty, limitations,
claim boundary, and reproducibility.
results.json containing the complete machine-readable analytical result.figures/*.svg and chart-map.json covering every material visual,not only a representative chart.
When a real decision layer is requested and justified, additionally deliver:
decision-results.json containing assumptions, scores, sensitivity results, and provenance.decision-report.md as the Decision Intelligence Brief, containing ananswer-first executive summary, adjacent interpretation for every visual,
recommendation, ranking, uncertainty, scenario resilience, group impacts,
next steps, further questions, and caveats.
GitHub-renderable.
figures/chart-map.json must record each figure's analytical question,supported takeaway, benchmark, chart family, source, palette policy,
accessibility treatment, and report section.
Report (report.md) and results.json.
State “no decision-ready recommendation” when all alternatives breach hard constraints or when evidence limitations make the ranking misleading.
Use “illustrative preference,” not “recommendation,” when
evidence.decision_use is illustrative. Numerical stability must never
upgrade the permitted use of the evidence.
a cleaning plan.
columns, change units, or redefine a target or grain.
validation and test data.
the required data or decision inputs are absent.
Take limingrui679-design/high-stakes-analytics-decision-lab from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.