claude-runtime

Community

Invoke Claude reliably across runtimes.

AuthorCleanExpo
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill reduces failed or inconsistent Claude invocations by standardizing how Claude Code subprocess output is parsed and how Claude SDK/MCP imports are performed across local and Railway environments.

Core Features & Use Cases

  • Subprocess-first Claude Code streaming: Ensures the system parses stream-json events like system, assistant (including tool_use), tool_result, and result for deterministic runtime behavior.
  • Environment-aware execution paths: Directs teams to use the claude -p subprocess only when the Claude Code CLI is available, and to switch to ANTHROPIC_API_KEY with claude_agent_sdk when running in cloud where the CLI is not present.
  • Correct MCP SDK import paths: Prevents runtime failures by requiring the specific MCP SDK subpath imports for McpServer and stdio transport objects.
  • Guardrails for rejected SDK migration: Documents why the Managed Agents API path was not adopted due to PoC failures, helping avoid repeated dead-ends.

Quick Start

Ask your agent code to follow the claude-runtime rules so it selects the correct Claude invocation mode for the current environment and parses tool and result events consistently.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: claude-runtime
Download link: https://github.com/CleanExpo/Pi-Dev-Ops/archive/main.zip#claude-runtime

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.