Runta Demos Skill
Create a runta-demos/SKILL.md file with this content.
---name: runta-demosdescription: Demonstrate Runta runtime workflows with safe, guided examples. Use when Codex needs to show a Runta demo, prove Runta works, run a quickstart, create a sample runtime, demonstrate command execution, file transfer, published services, checkpoints and forks, egress policy, secret stubs, auto suspend, or translate demos between CLI, Python SDK, and TypeScript SDK.---
# Runta Demos
## Operating Rules
Prefer the CLI for a general demo. Use the Python or TypeScript SDK when the user asks for that language or the repo clearly uses that stack. If SDK details are needed, combine this workflow with `$python-sdk` or `$typescript-sdk`.
Check `RUNTA_TOKEN` before creating runtimes:
```bashtest -n "$RUNTA_TOKEN"```
If the token is missing, stop before creating resources and tell the user to export `RUNTA_TOKEN`.
Use small resource sizes unless the demo needs more. Prefer names like `demo`, `runta-demo`, `source-demo`, `restored-demo`, or a user-requested name. Run `runta ps -a` first if there may already be resources with those names.
Do not delete runtimes, checkpoints, secrets, or secret rules unless the user asked for cleanup. Offer cleanup commands after demos that create resources.
Never print or store real secret values. For secret demos, use `--value-env`, `--value-stdin`, or `--prompt`.
## Quick Runtime
Create a runtime and run a command inside it:
```bashrunta run --name demo --cpus 2 --memory 2048runta exec demo -- echo "Hello from Runta"runta exec demo -- sh -lc 'pwd && python3 --version'```
Show lifecycle state:
```bashrunta ps -arunta inspect demo```
## File Transfer
Copy data out of the runtime:
```bashrunta exec demo -- sh -lc 'echo hello-from-runtime > /tmp/message.txt'runta cp demo:/tmp/message.txt ./message.txtcat message.txt```
Copy a local file into the runtime:
```bashecho "hello world" > hello.txtrunta cp hello.txt demo:/runta exec demo -- cat /hello.txt```
## Published HTTP Service
Create a runtime with HTTPS ingress on runtime port `8080`:
```bashrunta run --name demo-web --cpus 1 --memory 512 --publish 8080/httpsrunta exec demo-web -- sh -lc 'mkdir -p /tmp/runta-demo && echo "Hello from Runta HTTP" > /tmp/runta-demo/index.html'runta exec demo-web -- sh -lc 'cd /tmp/runta-demo && nohup python3 -m http.server 8080 >/tmp/http.log 2>&1 &'runta ps -a```
Use the runtime UUID from the `ID` column:
```bashcurl https://<runtime_id>.runta.dev```
Do not add `:8080` to the public URL.
## Checkpoints and Forks
Capture runtime state and restore it into new runtimes:
```bashrunta run --name source-demo --cpus 2 --memory 1024runta exec source-demo -- sh -lc 'echo hello-from-runtime > /tmp/hello.txt'runta checkpoint create source-demo source-demo-checkpointrunta checkpoint lsrunta checkpoint restore source-demo-checkpoint restored-demorunta exec restored-demo -- cat /tmp/hello.txtrunta checkpoint restore source-demo-checkpoint fork-demo```
Cleanup, only when the user asks:
```bashrunta rm source-demorunta rm restored-demorunta rm fork-demorunta checkpoint rm source-demo-checkpoint```
## Egress Policy
Show allowlist behavior:
```bashrunta run --name demo-egress --cpus 2 --memory 2048runta egress set demo-egress --mode allowlist --allow pypi.org "*.pythonhosted.org" api.openai.comrunta egress describe demo-egressrunta exec demo-egress -- sh -lc 'curl -fsSI https://pypi.org/simple/ | head -n 1'runta exec demo-egress -- sh -lc 'curl -fsSI --max-time 10 https://example.com || true'```
Explain that allowed hosts are hostnames or wildcard host patterns, not full URLs.
## Secret Stub
Only run a real credential demo if the user has set the environment variable in the active shell:
```bashtest -n "$OPENAI_API_KEY"```
Store the credential without printing it and attach a runtime-scoped rule:
```bashrunta run --name demo-secret --cpus 2 --memory 2048runta secret set openai-api-key --value-env OPENAI_API_KEYrunta secret rule set demo-secret \ --host api.openai.com \ --path '/v1/*' \ --secret openai-api-key \ --header Authorization \ --template 'Bearer ${credential}'runta secret rule list --runtime demo-secret```
Do not call the external API unless the user explicitly asks and the required egress policy allows it.
## Auto Suspend
Use this demo only when the user is willing to wait for idle suspension:
```bashrunta run \ --name demo-suspend \ --cpus 1 \ --memory 512 \ --publish 8080/https \ --idle-timeout 30runta exec demo-suspend -- sh -lc 'nohup python3 -m http.server 8080 >/tmp/http.log 2>&1 &'runta ps -acurl https://<runtime_id>.runta.devsleep 100runta inspect demo-suspendcurl https://<runtime_id>.runta.dev```
Explain that a 30-second idle timeout can take roughly 90 seconds or more to appear suspended because idle scans run periodically.
## SDK Versions
For Python demos, translate the CLI flow with `Runta` or `AsyncRunta` from `$python-sdk`.
For TypeScript demos, translate the CLI flow with `Runta` from `$typescript-sdk`.
Keep the workflow sequence the same across interfaces: create runtime, execute command, verify output, then optionally demonstrate files, ingress, checkpoints, egress, or secrets.