/calkit:create-pipelinefrom calkit
Converts a repo with ad hoc scripts into a reproducible Calkit pipeline using `calkit.yaml`, DVC, and environments (uv, conda, renv, Julia, Docker).
Ships in calkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Convert an existing repo with ad hoc scripts and manual steps into a fully
reproducible Calkit pipeline. When complete, calkit run should reproduce all
important outputs from scratch.
Before writing any YAML, map out what's already there. Start with the README. Users will typically write manual environment creation steps, and lists of script and commands to run in order. This is like a manual pipeline. Next:
scripts/, notebooks/, src/,
and the repo root for .py, .R, .jl, .m, .ipynb files.Ask the user if the order or dependencies are unclear. Do not guess at data flow.
If there is no calkit.yaml, run:
calkit init
This sets up Git (if needed) and DVC. If calkit.yaml already exists but has
no pipeline section, skip this—you will add one.
Every stage must reference a named environment. Identify what's needed:
pyproject.toml, or no spec yet → uv, created with
calkit new uv-env; an existing requirements.txt the project should
keep → uv-venv; environment.yml → condarenv.lock → renvProject.toml → juliadocker with texlive/texlive:latest-fullmatlabAdd environments to calkit.yaml:
environments:
main:
kind: uv
path: pyproject.toml
Name a single Python environment main. With multiple environments, use
descriptive names (e.g., analysis, paper).
calkit xr firstFor each script or notebook, try xr before writing YAML by hand. It
auto-detects stage kind, environment, and I/O:
calkit xr scripts/collect-data.py --dry-run # preview first
calkit xr scripts/collect-data.py # run for real
Work through scripts in dependency order. After each call, verify the new
stage in calkit.yaml. Override detected I/O if needed:
calkit xr scripts/train.py \
--input data/processed.csv \
--input config/params.yaml \
--output models/model.pkl
xr is not magic—sometimes it won't get everything right. But it handles
most of the boilerplate, so you can focus on verifying correctness and filling
in gaps. Scan through scripts for missing inputs, outputs, environment
dependencies, etc., and add those manually in calkit.yaml as needed.
xr isn't suitableWrite stages directly in calkit.yaml when:
always_run, iterate_over, storage modes, etc.xr does not support the stage kindpipeline:
stages:
collect-data:
kind: python-script
script_path: scripts/collect-data.py
environment: main
outputs:
- data/raw.csv
process-data:
kind: jupyter-notebook
notebook_path: notebooks/process.ipynb
environment: main
inputs:
- data/raw.csv
outputs:
- data/processed.csv
- figures/fig1.png
build-paper:
kind: latex
target_path: paper/paper.tex
environment: texlive
inputs:
- figures/fig1.png
- references.bib
outputs: []
Rules:
from_stage_outputs: stage-name when a stage consumes all outputs of a
prior stage.For each output:
outputs:
- data/raw.csv # DVC (default)
- path: data/meta.json
storage: git
- path: paper/paper.pdf
storage: git
When in doubt, ask the user. Storage mode affects whether collaborators can
see the file without calkit pull.
calkit run
Common errors:
calkit check env --name <env> to diagnoseRun a single stage: calkit run <stage-name>
Force re-run everything: calkit run --force
calkit commit -m "Add reproducible pipeline"
process.py reads data/raw.csv but
that file isn't declared as an output of collect-data, DVC won't track the
dependency.wdir if set).dvc.yaml directly: always edit calkit.yaml—dvc.yaml is
regenerated by Calkit.environment: every stage needs one. Use _system for stages
that only use system tools.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub calkit/calkit --plugin calkit8 skills in this plugin
/add-pipeline-stageAdd a single new stage to an existing Calkit pipeline. Use when the user invokes `/calkit:add-pipeline-stage` or asks to add a script, notebook, or command to the pipeline./build-paper-pipelineBuild the pipeline stages a manuscript's TODO comments ask for, working backwards from the writing to the analysis behind it, and keep the project's questions and answers matching the paper. Use when the user invokes `/calkit:build-paper-pipeline`, leaves TODO comments in a manuscript for an agent to address, or asks to work backwards from the writing to the project behind it. Only for TODOs in a manuscript, and only in a Calkit project; not TODO comments in source code, not GitHub issues, not a task list in someone's notes./check-questionsReview a Calkit project's questions and answers against their evidence. Use when the user invokes `/calkit:check-questions`, asks whether the project's answers are still true, or after a pipeline run changes results that answers cite./check-reproducibilityCheck whether a project is fully traceable, and fix what isn't, including numbers typed into a manuscript that no pipeline output accounts for. Use when the user invokes `/calkit:check-reproducibility`, asks whether a project is reproducible, or asks where a number in a paper came from./connect-overleaf-projectConnect an Overleaf project, e.g., a paper, thesis, or poster, to a Calkit project and the scripts and data behind it, so its figures and numbers come from a pipeline. Use when the user invokes `/calkit:connect-overleaf-project`, asks to connect an Overleaf project (often one open in their browser) to Calkit, or asks to make an Overleaf document reproducible. Not for only signing in to Overleaf./conventionsCalkit conventions and foundational context. Load whenever working in a Calkit project—defines calkit.yaml structure, environments, pipeline stages, CLI commands, and version control conventions.Other plugins' skills for the same job