Skip to content

Quickstart

skrun exposes the same executable skill runtime to Rust, Python, and the CLI. The first contract is intentionally small: one JSON value goes to stdin and one JSON object comes back from stdout.

Terminal window
pip install skrun
import skrun
result = skrun.skill("/path/to/skill").call({"ok": True})
print(result)

Skill IDs resolve under ~/.skrun/skills by default. Set SKRUN_SKILLS_DIR to use another local skill root.

Terminal window
cargo install skrun
Terminal window
skrun skill new --kind rust_binary --id rust-echo /tmp/rust-echo
skrun skill build /tmp/rust-echo
skrun skill run --input '{"ok":true}' /tmp/rust-echo

Every executable skill directory contains an artifact.json manifest:

{
"schema_version": 1,
"kind": "rust_binary",
"id": "regex-finder",
"name": "Regex Finder",
"version": "0.1.0",
"entry": "bin/release/regex-finder",
"protocol": {
"transport": "stdio-json",
"input": "single-json-value",
"output": "single-json-value"
}
}
  • stdin receives one JSON value.
  • stdout must return one JSON object.
  • stderr is diagnostics.
  • a non-zero exit code is a skill failure.
  • streaming is intentionally outside the first contract.