AI Agent Skill

Install the hosted StateSet Sandbox skill file for Claude, Codex, and similar agents.

AI Agent Skill

You can install a hosted StateSet Sandbox skill file directly from sandbox.stateset.app so an agent runtime can learn the recommended bootstrap, session, and cleanup workflow without copying instructions by hand.

Install the Hosted Skill

Claude-style Skill Directory

bash
mkdir -p ~/.claude/skills/stateset-sandbox
curl -s https://sandbox.stateset.app/stateset-sandbox-skill.md > ~/.claude/skills/stateset-sandbox/SKILL.md

Codex-style Skill Directory

bash
mkdir -p ~/.codex/skills/stateset-sandbox
curl -s https://sandbox.stateset.app/stateset-sandbox-skill.md > ~/.codex/skills/stateset-sandbox/SKILL.md

Raw file URL:

text
https://sandbox.stateset.app/stateset-sandbox-skill.md

What the Skill Covers

  • bootstrap token exchange into a scoped API key
  • auth introspection before provisioning
  • reconnect-safe agent sessions with a stable clientId
  • shell-friendly keepalive and JSON inspection commands
  • explicit cleanup and state-aware error handling

The skill is designed for agents that need a remote execution environment rather than local shell access.

Recommended Agent Flow

  1. Receive a one-time bootstrap token from a human admin.
  2. Exchange it for a scoped API key.
  3. Call auth introspection to confirm org and scopes.
  4. Reattach or create an agent session with a stable clientId.
  5. Wait for running, then execute commands and follow events.
  6. Keep the session alive while work is active.
  7. Stop or cancel explicitly when the task is complete.

Example Session Loop

bash
stateset --profile agent init --yes \
  --api-url https://api.sandbox.stateset.app \
  --bootstrap-token "$STATESET_BOOTSTRAP_TOKEN" \
  --timeout 600

stateset auth introspect

stateset --profile agent session connect \
  --client-id codex-agent-prod \
  --cwd /workspace \
  --resume-paused

stateset --profile agent session wait --state running
stateset --profile agent session exec -- bash -lc "pwd && ls"
stateset --profile agent session keepalive --interval 30 --timeout 300
stateset --profile agent session get --json
stateset --profile agent session stop

Related Docs