skills/runtime-context/SKILL.md
This skill should be used when the user asks "what runtime am I in", "detect the execution environment", "adapt behavior for Claude Code vs a hosted bot", or "check what tools are available in this environment". Detects the current agent execution environment (Claude Code, Vercel Sandbox, or local dev) and adapts behavior accordingly — for agents or bots that run in Claude Code as subagents AND as hosted bots, or a SOUL.md/SKILL.md that must work across runtimes.
npx skillsauth add b-open-io/prompts runtime-contextInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Agents run in different environments with different capabilities. This skill detects the current runtime so agents can use the right tools and fail clearly when a required capability is missing.
| Runtime | How to detect | Tools available | Skills via |
|---------|--------------|-----------------|-----------|
| Claude Code | CLAUDE_CODE=1 env var, or Skill()/Agent()/Read tools exist | Full suite: Read, Write, Edit, Bash, Grep, Glob, Agent, Skill, WebFetch, WebSearch | Skill() tool |
| Vercel Sandbox | /vercel/sandbox/ paths exist, VERCEL_SANDBOX_ID env var set | bash-tool trio: bash, readFile, writeFile, plus skill if configured | createSkillTool() from bash-tool |
| Local dev | Neither of the above, process.cwd() is in user home or project dir | Whatever the app provides (usually just HTTP + AI SDK) | Direct file reads or none |
Run scripts/detect.sh to get a JSON summary of the current environment:
bash skills/runtime-context/scripts/detect.sh
Returns:
{
"runtime": "sandbox",
"has_bash": true,
"has_skill_tool": true,
"sandbox_id": "sbx_abc123",
"working_dir": "/vercel/sandbox/bot",
"node_version": "v22.x.x",
"bun_version": "1.x.x"
}
When writing a system prompt that works across runtimes, structure it like this:
## Environment Awareness
Before taking action, check your environment:
1. If you have `Skill()` and `Agent()` tools, you are in Claude Code
- Use skills via `Skill(name)`, delegate via `Agent()`
- Full file access via Read/Write/Edit
2. If you have `bash`, `readFile`, `writeFile` tools, you are in a Sandbox
- Run scripts via `bash`, read context via `readFile`
- Skills available via the `skill` tool if configured
3. If you have no tools, you are text-only
- Answer from your training and system prompt context
- Tell the user what you would do if you had tools
Do not guess which tools exist. If a tool call fails, state what tool
was missing and what capability it would have provided.
The goal is NOT fallbacks. The goal is clarity.
Correct: "I'm in a Sandbox. I have bash and file tools but no Skill() tool. I'll read the skill instructions directly from ./skills/clawnet/SKILL.md."
Incorrect: Silently trying Skill() first, catching the error, then trying readFile, then trying fetch, then giving up without telling the user.
At the start of a conversation or task, state what tools are available:
I'm running in a Vercel Sandbox with bash, file, and skill tools.
I can: run scripts, read/write files, look up skill instructions.
I cannot: spawn subagents, use Claude Code tools, access the host filesystem.
This sets expectations immediately so users and orchestrators know what to ask for.
README.md — Three runtimes explained, capability matrix, bash-tool integration guide for SDK developers, skill declaration across runtimestools
This skill should be used when a Claude Code session needs to keep working after Anthropic usage runs out, or when the user asks to run the Claude Code harness on GPT-5.6 Sol. Trigger phrases include "my Anthropic usage ran out", "I'm out of Claude usage", "usage limit reached, what now", "keep working on another model", "run Claude Code on GPT-5.6 Sol", "use GPT-5.6 Sol as the model", "set up claudex", "claudex isn't working", "route the harness through CLIProxyAPI", or "bill against my ChatGPT/Codex subscription". It stands up a local proxy so the Claude Code CLI runs on OpenAI's Codex backend as an escape hatch, and diagnoses that setup when it drifts. macOS + Homebrew.
testing
This skill should be used when the user asks to "open Visual Wayfinder", "answer a Wayfinder ticket visually", "turn this decision into a configurator", "show Wayfinder choices as a dashboard", "prototype the Wayfinder questionnaire", or wants interactive choice cards, tradeoff controls, rankings, ranges, toggles, and consequence previews for one active Wayfinder decision. It wraps the Wayfinder skill and JSON Render; it never replaces the tracker or resolves more than the active decision.
development
This skill should be used when the user asks to "make a visual proposal", "write this up so I can share it", "present these options visually", "diagram the trade-offs", "turn this plan into something reviewable", or requests a shareable design pitch, architecture proposal, RFC, options comparison, or visual roadmap for work that has not been built. It produces one self-contained, theme-aware HTML page led by grounded diagrams. Use visual-review instead for completed code changes; do not use this skill for internal task tracking.
tools
This skill should be used when the user asks to "add plugin settings", "make a plugin configurable", "store per-project plugin configuration", "use settings.local.json", "create a plugin state file", "expose skill settings in Agent Master", or "add a skill interface". Distinguishes official Claude Code settings from project-owned configuration and documents bOpen Agent Master skill interface discovery.