Installation
npx skills add b-open-io/prompts --skill runtime-context 9
Installs
Runtime Context
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.
The Three Runtimes
| 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 |
Detection Script
Run scripts/detect.sh to get a JSON summary of the current environment:
bash skills/runtime-context/scripts/detect.shReturns:
{
"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"
}For SOUL.md / System Prompt Authors
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.Adapting Behavior
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.
Capability Declaration Pattern
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.
Reference Files
README.md— Three runtimes explained, capability matrix, bash-tool integration guide for SDK developers, skill declaration across runtimes
Installs
Security Audit
View Source
b-open-io/prompts
More from this source
Power your AI Agents with
the best open-source models.
Drop-in OpenAI-compatible API. No data leaves Europe.
Explore Inference APIGLM
GLM 5
$1.00 / $3.20
per M tokens
Kimi
Kimi K2.5
$0.60 / $2.80
per M tokens
MiniMax
MiniMax M2.5
$0.30 / $1.20
per M tokens
Qwen
Qwen3.5 122B
$0.40 / $3.00
per M tokens
How to use this skill
Install runtime-context by running npx skills add b-open-io/prompts --skill runtime-context in your project directory. Run the install command above in your project directory. The skill file will be downloaded from GitHub and placed in your project.
No configuration needed. Your AI agent (Claude Code, Cursor, Windsurf, etc.) automatically detects installed skills and uses them as context when generating code.
The skill enhances your agent's understanding of runtime-context, helping it follow established patterns, avoid common mistakes, and produce production-ready output.
What you get
Skills are plain-text instruction files — not executable code. They encode expert knowledge about frameworks, languages, or tools that your AI agent reads to improve its output. This means zero runtime overhead, no dependency conflicts, and full transparency: you can read and review every instruction before installing.
Compatibility
This skill works with any AI coding agent that supports the skills.sh format, including Claude Code (Anthropic), Cursor, Windsurf, Cline, Aider, and other tools that read project-level context files. Skills are framework-agnostic at the transport level — the content inside determines which language or framework it applies to.
Chat with 100+ AI Models in one App.
Use Claude, ChatGPT, Gemini alongside with EU-Hosted Models like Deepseek, GLM-5, Kimi K2.5 and many more.