From calkit
Adds a new stage to existing Calkit pipelines using `calkit xr` or YAML. Supports Python scripts, Jupyter notebooks, shell commands, R/Julia/MATLAB; wires I/O, environments, git/DVC storage.
How this skill is triggered — by the user, by Claude, or both
Slash command
/calkit:add-pipeline-stageThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Add a single new stage to an existing Calkit pipeline—wiring up the right
Add a single new stage to an existing Calkit pipeline—wiring up the right environment, inputs, outputs, and storage mode.
Read calkit.yaml to understand what environments are already defined (you
will reuse one if it fits) and what stages already exist and what they output
(your new stage may depend on them).
calkit xrUse xr when the stage is a script or notebook file (.py, .ipynb, .R,
.jl, .m, .sh, .tex) and you want auto-detection of I/O and
environment.
calkit xr scripts/new-stage.py --dry-run # preview first
calkit xr scripts/new-stage.py # run for real
Override detected I/O or environment if needed:
calkit xr scripts/new-stage.py \
--input data/processed.csv \
--input config/params.yaml \
--output results/output.csv \
--environment main
After running, inspect the new stage in calkit.yaml to confirm I/O is
correct.
Write YAML directly when the stage is a shell command, or when you need
iterate_over, specific storage modes, or other fine-grained control.
| File type | Stage kind |
|---|---|
.py | python-script |
.ipynb | jupyter-notebook |
.sh | shell-script |
| Inline command | shell-command or command |
.tex | latex |
.R | r-script |
.jl | julia-script |
.m | matlab-script |
docker run ... | docker-command |
pipeline:
stages:
# ... existing stages ...
new-stage-name:
kind: python-script
script_path: scripts/new-stage.py
environment: main # must match a key in environments:
inputs:
- data/processed.csv
outputs:
- results/output.csv
If the new stage reads files produced by an existing stage, declare them as inputs. List files explicitly, or depend on all outputs of a prior stage:
inputs:
- data/processed.csv # explicit file
- from_stage_outputs: process-data # all outputs of that stage
If an existing stage reads files your new stage now produces, update that stage's inputs too.
git—small or text files collaborators should see without calkit pull
(PDFs, summary CSVs, HTML reports)dvc (default)—large or binary filesoutputs:
- results/large-matrix.npy # DVC (default)
- path: results/summary.csv
storage: git
- path: results/report.html
storage: git
delete_before_run: false # keep old version if stage is skipped
calkit run # run full pipeline
calkit run new-stage-name # run only this stage
calkit status # check what's stale
calkit commit -am "Add new-stage-name stage"
environments. Run
calkit check env --name <env> to verify.dvc.yaml: Don't—it's auto-generated from calkit.yaml.npx claudepluginhub calkit/calkit --plugin calkitConverts repos with ad hoc scripts/notebooks into reproducible Calkit pipelines using calkit init, xr for I/O detection, and YAML stages/environments for Python/R/Julia/etc.