src/autoskillit/skills_extended/exp-lens-pipeline-integrity/SKILL.md
Create Pipeline Integrity experimental design diagram showing data splits, leakage points, preprocessing order, and label contamination. Integrity lens answering "Could data handling create optimistic bias?"
npx skillsauth add talont-org/autoskillit exp-lens-pipeline-integrityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Philosophical Mode: Integrity Primary Question: "Could data handling create optimistic bias?" Focus: Data Splits, Leakage Points, Preprocessing Order, Label Contamination, Pipeline Invariants
/autoskillit:exp-lens-pipeline-integrity [context_path] [experiment_plan_path]
/autoskillit:exp-lens-pipeline-integrity or /autoskillit:make-experiment-diag pipelineNEVER:
{{AUTOSKILLIT_TEMP}}/exp-lens-pipeline-integrity/run_in_background: true is prohibited)ALWAYS:
Classify every pipeline stage as pre-split or post-split
Trace whether transforms are fitted on full data or train-only
Flag all label-touching feature engineering steps
Document pipeline invariants that guard against leakage
BEFORE creating any diagram, LOAD the /autoskillit:mermaid skill using the Skill tool - this is MANDATORY
If the Skill tool cannot be used (disable-model-invocation) or refuses this invocation, do NOT proceed with diagram creation. Abort this step and omit the diagram from output.
Write output to {{AUTOSKILLIT_TEMP}}/exp-lens-pipeline-integrity/exp_diag_pipeline_integrity_{YYYY-MM-DD_HHMMSS}.md
After writing the file, emit the structured output token as literal plain text with no markdown formatting on the token name (the adjudicator performs a regex match):
diagram_path = /absolute/path/to/{{AUTOSKILLIT_TEMP}}/exp-lens-pipeline-integrity/exp_diag_pipeline_integrity_{...}.md
If positional arg 1 (context_path) is provided and the file exists, read it to obtain IV/DV tables, H0/H1 hypotheses, controlled variables, and success criteria. If positional arg 2 (experiment_plan_path) is provided and exists, read the experiment plan for full methodology. Use this structured context as the foundation for Steps 1-5; skip the CWD exploration for these fields if the context file supplies them.
Spawn Explore subagents to investigate:
Data Loading & Sources
Preprocessing & Transforms
Split Logic
Feature Engineering
Model Training & Evaluation
Map the full pipeline from raw data to reported metrics. For each stage, determine:
CRITICAL — Analyze Leakage Direction: For every data transformation:
Assign a severity level (High/Medium/Low) to each leakage risk based on whether it would invalidate reported metrics.
Use flowchart with:
Direction: LR (data flows left to right)
Subgraphs:
Node Styling:
cli class: Data sourceshandler class: Transformsdetector class: Split point and validation gatesstateNode class: Data storesgap class: Leakage risksoutput class: Metrics and resultsphase class: Model trainingEdge Labels: full data, train only, test only, LEAKAGE RISK
Write the diagram to: {{AUTOSKILLIT_TEMP}}/exp-lens-pipeline-integrity/exp_diag_pipeline_integrity_{YYYY-MM-DD_HHMMSS}.md (relative to the current working directory)
# Pipeline Integrity Diagram: {Experiment Name}
**Lens:** Pipeline Integrity (Integrity)
**Question:** Could data handling create optimistic bias?
**Date:** {YYYY-MM-DD}
**Scope:** {What was analyzed}
## Pipeline Stages
| Stage | Input | Output | Pre/Post Split | Leakage Risk? |
|-------|-------|--------|----------------|---------------|
| {stage} | {input} | {output} | {Pre/Post} | {Yes/No} |
## Pipeline Diagram
```mermaid
%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%
flowchart LR
%% CLASS DEFINITIONS %%
classDef cli fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;
classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;
classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;
classDef newComponent fill:#2e7d32,stroke:#81c784,stroke-width:2px,color:#fff;
classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef detector fill:#b71c1c,stroke:#ef5350,stroke-width:2px,color:#fff;
classDef gap fill:#ff6f00,stroke:#ffa726,stroke-width:2px,color:#000;
classDef integration fill:#c62828,stroke:#ef9a9a,stroke-width:2px,color:#fff;
subgraph Raw ["RAW DATA"]
SRC["Raw Dataset<br/>━━━━━━━━━━<br/>Source path<br/>N samples"]
end
subgraph Preprocessing ["PREPROCESSING"]
PREP["Normalization / Encoding<br/>━━━━━━━━━━<br/>Fitted on: full/train?"]
LEAK["Leaky Transform<br/>━━━━━━━━━━<br/>Uses full dataset"]
end
subgraph SplitPoint ["SPLIT POINT"]
SPLIT["Train/Test Split<br/>━━━━━━━━━━<br/>Stratified? Ratio?"]
end
subgraph TrainPath ["TRAIN PATH"]
TRAIN_DATA["Train Set<br/>━━━━━━━━━━<br/>N_train samples"]
MODEL["Model Training<br/>━━━━━━━━━━<br/>fit()"]
end
subgraph TestPath ["TEST PATH"]
TEST_DATA["Test Set<br/>━━━━━━━━━━<br/>N_test samples"]
end
subgraph Evaluation ["EVALUATION"]
METRIC["Reported Metric<br/>━━━━━━━━━━<br/>score / loss"]
end
%% PIPELINE FLOWS %%
SRC -->|"full data"| PREP
PREP -->|"full data"| LEAK
LEAK -.->|"LEAKAGE RISK"| METRIC
PREP -->|"full data"| SPLIT
SPLIT -->|"train only"| TRAIN_DATA
SPLIT -->|"test only"| TEST_DATA
TRAIN_DATA -->|"fit"| MODEL
MODEL -->|"predict"| TEST_DATA
TEST_DATA -->|"evaluate"| METRIC
%% CLASS ASSIGNMENTS %%
class SRC cli;
class PREP handler;
class LEAK gap;
class SPLIT detector;
class TRAIN_DATA,TEST_DATA stateNode;
class MODEL phase;
class METRIC output;
Color Legend: | Color | Category | Description | |-------|----------|-------------| | Dark Blue | Data Source | Raw input datasets | | Orange | Transform | Preprocessing and feature engineering steps | | Red | Split / Gate | Split point and validation gates | | Teal | Data Store | Partitioned data stores (train/test) | | Purple | Training | Model training stages | | Dark Teal | Output | Reported metrics and results | | Amber | Leakage Risk | Transforms using full-dataset information |
| Risk | Stage | Mechanism | Severity | |------|-------|-----------|----------| | {risk name} | {stage} | {how leakage occurs} | {High/Medium/Low} |
---
## Pre-Diagram Checklist
Before creating the diagram, verify:
- [ ] LOADED `/autoskillit:mermaid` skill using the Skill tool
- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)
- [ ] Diagram will include a color legend table
---
## Related Skills
- `/autoskillit:make-experiment-diag` - Parent skill for lens selection
- `/autoskillit:mermaid` - MUST BE LOADED before creating diagram
- `/autoskillit:exp-lens-reproducibility-artifacts` - For artifact completeness audit
- `/autoskillit:exp-lens-measurement-validity` - For outcome measurement validity
development
Generate YAML recipes for .autoskillit/recipes/. Use when user says "make script skill", "generate script", "script a workflow", "write a script", "create a script", "new recipe", "write a pipeline", or when loaded by other skills for script formatting.
data-ai
Create Uncertainty Representation visualization planning spec showing error bar definitions, distribution-aware alternatives, and multi-seed variance protocols. Statistical lens answering "How is uncertainty honestly represented?"
data-ai
Create Temporal Dynamics visualization planning spec showing axis scaling (linear vs log), smoothing disclosure, epoch/step alignment, run aggregation (mean + variance bands), early-stopping markers, and wall-clock vs step-count x-axis. Temporal lens answering "Are training dynamics shown clearly and honestly?"
data-ai
Create Narrative Story Arc visualization planning spec showing visual consistency across the report (same color = same model everywhere), logical figure progression, redundant figure detection, and narrative dependency between figures. Narrative lens answering "Do the figures tell a coherent story across the report?"