exec

exec is a command for coding agents from vinnie357/claude-skills. It costs 21 tokens per session (505 once invoked), scanned A, original, MIT.

A command that runs a command inside a provisioned Kubernetes sandbox pod, using kubectl exec. If no command is supplied, it runs Claude Code's configured default command.

In plain words
What is it for?
Use it to enter a Claude Code sandbox, run a custom command, or start the session's default Claude Code process.
Why use it?
It prevents commands from being sent to a session that is not ready by checking that its SandboxClaim is Bound and finding the associated pod first.

Command

Part of the agent-sandboxing plugin — 7 skills, 6 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/vinnie357/claude-skills/exec
Clone the repo
git clone --depth 1 https://github.com/vinnie357/claude-skills

Or install agent-sandboxing, the plugin that ships this one along with the rest of its 7 skills, 6 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for exec

README.md
[![agentmods](https://agentmods.dev/badge/commands/vinnie357/claude-skills/exec.svg)](https://agentmods.dev/commands/vinnie357/claude-skills/exec)
Your own site
<a href="https://agentmods.dev/commands/vinnie357/claude-skills/exec"><img src="https://agentmods.dev/badge/commands/vinnie357/claude-skills/exec.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 505 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00021 $0.00505
Opus 5 $0.00010 $0.00253
Sonnet 5 $0.00004 $0.00101
Haiku 4.5 $0.00002 $0.00051

Measured 2d ago against content hash cbd7aa3aefa2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

exec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/tools/agent-sandboxing/commands/exec.md · 63 lines

What it actually says

Run a command inside a provisioned sandbox pod via kubectl exec.

Skills to load

  • /agent-sandboxing:k8s-agent-sandbox
  • /agent-sandboxing:claude-code-on-sandbox
  • /core:anti-fabrication

Steps

1. Parse arguments

  • First positional arg = session id (required). Resolve to session-<id> if the user passed the short form.
  • Everything after -- is the command to run inside the pod. If absent, default to claude --print --output-format json (the image's CMD).

2. Verify the claim is Bound

PHASE=$(kubectl get sandboxclaim session-$SESSION_ID -o jsonpath='{.status.phase}')
if [ "$PHASE" != "Bound" ]; then
  echo "claim session-$SESSION_ID is in phase $PHASE; aborting"
  exit 1
fi

If not Bound, suggest /agent-sandboxing:provision $SESSION_ID first, or kubectl describe sandboxclaim session-$SESSION_ID to diagnose.

3. Resolve the bound pod

POD=$(kubectl get sandboxclaim session-$SESSION_ID -o jsonpath='{.status.boundSandbox.name}')

(Field name varies between API versions; check kubectl get sandboxclaim ... -o yaml if jsonpath is empty.)

4. Exec

kubectl exec -it sandbox/$POD -- <command>

For the default interactive case (claude --print):

kubectl exec -it sandbox/$POD -- claude --print --output-format json

For an ad-hoc shell:

kubectl exec -it sandbox/$POD -- /bin/bash

Anti-fabrication

  • Don't fake the output. If the exec fails (pod not ready, command not found, permission denied), report the verbatim stderr.
  • If the user passed args expecting an interactive session, but kubectl is being invoked non-interactively (no TTY), warn them — claude --print works either way but bash doesn't.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 63 lines · 21 tokens per session scan A cbd7aa3aefa2

Subscribe to this mod's changes

exec is a command published in the GitHub repository vinnie357/claude-skills (24 stars, last pushed today), licensed MIT. It adds 21 tokens to every session and 505 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.