/calkit:build-paper-pipelinefrom calkit
Builds pipeline stages from TODO comments in a manuscript, working backwards from writing to analysis. Never types computed values into the paper — always routes through Calkit pipeline stages.
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.
The writing is the human's job. Deciding what the paper claims, and whether a claim is worth making, is what nobody else can do for them. Everything under a claim -- the stage that computes the number, the figure that shows it, the question it answers -- is scaffolding, and scaffolding is what this skill builds.
The user writes a sentence with a hole in it and marks the hole:
% TODO: report the mean speedup over the baseline, and plot the
% distribution across cases
Our method is faster than the baseline by \todo{}.
You fill the hole by building the project behind it, not by writing a number into the sentence.
Never type a computed value into the manuscript. A number you typed is
a number nobody can check, and it goes stale the moment a stage reruns. The
number reaches the page through the pipeline: a stage computes it and
writes it to a results file, a json-to-latex stage turns that file into
LaTeX commands, and the manuscript says \result[Speedup]. The same
applies to figures (\ckfigure{...} over a pipeline output) and to the
answers in calkit.yaml ({name} placeholders over value evidence).
If you find yourself about to write 2.4x into a .tex file, stop: that
is the hole, not the fix. The check-reproducibility skill covers finding
and fixing a typed literal that is already in a manuscript; this one is
about not putting one there.
See the conventions skill for calkit.yaml structure and stage kinds,
add-pipeline-stage for adding one stage, and create-pipeline for
building a pipeline from scratch.
Read the manuscript and collect the TODOs. Look for % TODO,
\todo{}, \TODO, and prose that asserts something with no number or
figure behind it. Quote each one back to the user with what you think it
is asking for, grouped into: needs a computation, needs a figure, needs
data the project does not have, and needs a decision only they can make.
Do not start building until they have confirmed the list --- a
misunderstood TODO costs a whole stage.
Say what is missing before you build. For each TODO, name the inputs it needs. If the project already has them, say which stage produces them. If it does not, that TODO is blocked, and the honest answer is to say so rather than to invent data. Blocked TODOs come in two kinds:
procedure stage (see below) and tell the user
the pipeline now knows the step is outstanding.imported_from so the provenance chain reaches back past the project.Build a stage per computation. One stage, one question. Prefer a
script over a notebook, since a script diffs cleanly and reruns
headlessly. Write the results to a JSON file under results/ with keys
named the way the paper will refer to them.
Inject, don't copy. Add a json-to-latex stage over the results
file and reference the values from the manuscript with the generated
command. Replace the TODO with the sentence the user wrote, now with
\result[...] where the hole was.
Make the question match the paper. A claim in the paper is an answer
to a question. Add or update the entry under questions in
calkit.yaml: the question as the paper poses it, the answer as the
paper states it with {name} placeholders where numbers go, and
evidence naming the results file and key, the figure, and the
publication section that carries the argument. The results file must be
one a stage from step 3 writes, never one written by hand. Where the
claim hinges on a threshold, write a conditional answer; the
check-questions skill covers both. Run calkit check questions and
fix what it reports.
Run the pipeline, then check your own work. Run calkit run, then
calkit check repro, which reads the manuscript back and reports any
number in it that is not traceable to a pipeline output. A finding there
is a hole you closed by typing rather than by building, so go back to
step 3 for it. Show the user the rendered sentences
(calkit show question <n>) and the built document. Never commit a derived
output yourself, and never edit a results file by hand.
Some TODOs cannot be closed by any amount of code, because the measurement has not been made. Do not leave that as a comment in the manuscript, where nothing tracks it. Declare the procedure and make it a stage, so the pipeline knows the step is outstanding and everything downstream waits on it:
procedures:
measure-rig:
title: Measure the rig
description: Read the temperature off the display at each setting.
steps:
- summary: Turn on the machine
wait_after_s: 5
- summary: Record the temperature
inputs:
temperature:
units: C
dtype: float
pipeline:
stages:
collect-data:
kind: procedure
procedure_name: measure-rig
plot-data:
kind: python-script
environment: py
script_path: scripts/plot-data.py
inputs:
- from_stage_outputs: collect-data
outputs:
- figures/temperature.png
calkit run walks the person through the steps and logs each one to
.calkit/procedure-runs/measure-rig/, which the next stage reads like any
other input. Write the procedure's steps in the words someone at the bench
would need, not in the words a program would; you are writing for a person
holding a thermometer.
Say what you built, what you did not, and why:
calkit check questions
says;What SKILL.md sets; muted values are Claude Code's defaults
8 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./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./create-pipelineConvert an existing repo with ad hoc scripts into a fully reproducible Calkit pipeline. Use when the user invokes `/calkit:create-pipeline` or asks to make a project reproducible end-to-end.npx claudepluginhub calkit/calkit --plugin calkitOther plugins' skills for the same job