
Execution
How Stencila executes documents - kernels, staleness-driven re-execution, execution...
Install
npx skills add stencila/stencila --skill execution -g -a claude-code -y- Repository
- stencila/stencila914
- Category
- Testing
- Updated
- 3d ago
- License
- Apache-2.0
- Context cost
- Lightabout 819 tokens
- Runs scripts
- No, instructions only
What it does
How Stencila executes documents - kernels, staleness-driven re-execution, execution options, and debugging chunks that error or do not re-run. Use when running stencila execute or render, when a code chunk is not re-running, when choosing a language/kernel, or when reading execution errors.
Executing Stencila documents
stencila execute doc.smd runs the executable code in a document and saves
the outputs into it. stencila render doc.smd out.html is execute plus
encode to output formats. Always invoke non-interactively:
NO_COLOR=1 stencila execute doc.smd --yes
NO_COLOR=1 stencila render doc.smd out.html --yes
Staleness: why a chunk may not re-run
Execution is staleness-driven. A chunk re-runs only when it (or something it
depends on) has changed since its last recorded execution. This is why
"I edited the prose and re-executed, but the plot didn't regenerate" is
expected behaviour, not a bug. Also check the chunk's execution mode in the
source: lock prevents re-execution to preserve outputs, always forces
re-run every time.
To override staleness:
--force-all, re-execute everything regardless of staleness. The first thing to try when outputs look out of date.--skip-code, skip executing code (useful to re-run only other executable node types).--ignore-errors, do not fail the command on execution errors; render what can be rendered.--no-save(executeonly), run without writing outputs back to the source document. Use for a reproducibility check that must not mutate files.--dry-run, compile and prepare but do not actually execute.
execute and render share the execution option group, but --no-save is
execute-only, and output/encoding options (--to, --theme, etc.) are
render-only. Check --help when unsure.
Kernels
Each language executes in a kernel. stencila kernels list shows what is
available on this machine. Current kernels include:


