# Execute

Execute the code in a Stencila document and save the outputs into it.

- Repository: https://github.com/stencila/stencila (914 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add stencila/stencila --skill execute -g -a claude-code -y`
Codex: `npx skills add stencila/stencila --skill execute -g -a codex -y`
Cursor: `npx skills add stencila/stencila --skill execute -g -a cursor -y`
Gemini CLI: `npx skills add stencila/stencila --skill execute -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add stencila/stencila`

## Description

Execute the code in a Stencila document and save the outputs into it.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# /stencila:execute

Execute the document given in `$ARGUMENTS`.

Use the stencila CLI path reported in session context; otherwise
`${CLAUDE_PLUGIN_OPTION_STENCILA_PATH}` if set, else `stencila`. If no CLI
is available, point the user at `/stencila:doctor` and stop.

```sh
NO_COLOR=1 <stencila> execute <input> --yes
```

- Execution is staleness-driven: unchanged chunks do not re-run. Add
  `--force-all` when the user wants everything re-executed.
- When the user only wants to *check* the document (not update it), add
  `--no-save` so outputs are not written back.
- `--ignore-errors` continues past failing chunks.

Afterwards, summarise: which chunks ran, which errored (quote the first
error and locate its chunk), and whether the document was saved. See the
`execution` skill for staleness and kernel details.

