Detect and route to active AI runtime
runtime-halskillsetup L4★64
Tibsfox/gsd-skill-creator ↗What it does
Detect AI runtime and provide uniform abstraction for hooks and GUPP
Best for
Multi-runtime agent frameworks needing uniform hook/GUPP semantics across Claude Code, Codex, Gemini, Cursor without editing skills.
Inputs
- · environment variables (GT_RUNTIME, CLAUDE_SESSION_ID)
- · .claude/settings.json
- · process tree inspection
Outputs
- · RuntimeProvider enum (claude|codex|gemini|cursor|unknown)
- · StartupStrategy (hook_injection|startup_fallback|polling)
- · GUPPStrategy (hook_injection|prompt_preamble|polling)
- · session ID (if available)
- · stall threshold (seconds)
- · nudge interval (seconds)
Requires
- · process inspection (ps, pgrep)
- · filesystem checks (.claude/settings.json)
- · environment variable reads
Preconditions
- · Environment initialized (env vars readable)
- · Workspace accessible (for .claude/settings.json check)
- · Process tree visible (for binary detection)
Failure modes
- · GT_RUNTIME env var overrides detection cascade (may lie)
- · Process tree inspection unreliable (binary names change across versions)
- · Falls back to 'unknown' + polling if no signal matches (graceful degradation)
Trust signals
- · Detection cascade documents fallback order (explicit over specific-signal-first)
- · Capability matrix shows which runtimes support hooks vs polling
- · Graceful degradation: unknown runtime → polling (never crashes)
- · Mirrors Go binary's runtime.go provider abstraction (proven pattern)