claude-cli-runner

Execute Claude Code CLI subprocesses with timeouts, budget guards, and stream-json logs.

1|1|Updated Jul 24, 2014
One-click install
npx skills add https://github.com/rmanzoku/dotfiles --skill claude-cli-runner-rmanzoku
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-cli-runner
Source: https://github.com/rmanzoku/dotfiles/tree/main/skills/claude-cli-runner
Command: npx skills add https://github.com/rmanzoku/dotfiles --skill claude-cli-runner-rmanzoku

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires claude, and includes scripts (resource) components.

What problem does it solve?

This Skill simplifies the invocation of Claude Code CLI subprocesses, ensuring that long-running tasks are observable and manageable, with features like timeouts, budget guards, and artifact-based failure handling.

Core Features & Use Cases

  • Observable Execution: Offers detailed stream-json logs for every subprocess, making long-running tasks transparent.
  • Timeouts and Budgets: Ensures subprocesses do not run indefinitely, with configurable timeout limits and optional budget guards.
  • Artifact-based Failure Handling: Automatically manages failure scenarios by creating artifacts that provide insights into the task's outcome.
  • Use Case: When Codex needs to invoke a claude -p command for research, review, generation, or other CLI work, this Skill ensures that the process is not only executed but also observable and accountable.

Quick Start

To run a Claude Code CLI subprocess with stream-json logging and failure handling, use the following command:

run_claude_cli.py --prompt-file .context/<task>/prompt.md --output-dir .context/<task> --expected-artifact result.md

Frequently Asked Questions about claude-cli-runner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Claude Code CLI subprocesses with logging and timeout enforcement?▼

You can execute Claude Code CLI subprocesses with detailed stream-json logging, configurable timeouts, and budget guards using a Python 3 script that requires the 'claude' binary. This ensures long-running tasks remain observable and manageable.

What is the best way to handle failures when automating Claude Code CLI tasks?▼

The best way to handle Claude Code CLI failures is through artifact-based failure handling. The script automatically manages failure scenarios by creating artifacts that provide insights into the task's outcome.

How do I prevent a Claude Code CLI subprocess from running indefinitely?▼

To prevent a Claude Code CLI subprocess from running indefinitely, you can enforce configurable timeout limits and optional budget guards. This ensures processes are accountable and terminate within expected constraints.

Do I need Python to execute Claude Code CLI commands with budget guards and logging?▼

Yes, you need Python 3 and the 'claude' binary installed. The script uses Python to manage subprocess execution, enforce timeouts, guard budgets, and generate stream-json logs for observability.

How do I make long-running Claude Code CLI tasks observable?▼

You make long-running Claude Code CLI tasks observable by generating detailed stream-json logs for every subprocess. This logging mechanism makes task execution transparent and easy to monitor.