claude-code-runner
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Basarisiz
- rm -rf — Recursive force deletion command in package.json
- process.env — Environment variable access in src/deaddrop/client.ts
- network request — Outbound network request in src/deaddrop/client.ts
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Deterministic, scripted, unattended Claude Code execution.
Claude Code Runner
Deterministic, scripted, unattended Claude Code execution with rill scripting.
Why Use This?
Like Ralph Wiggum, but smarter.
- Rich scripting — Fully scriptable with variables, conditionals, loops, and functions
- Walk away — Workflows can run unattended for hours if needed
- Treat Claude Code Skills as Functions — Call with arguments and get back return values through
<ccr:result type="..."/> - Fresh context — Each invocation starts with a clean slate
- Watch live — See your calls log activity as they execute
- Inspect later — Full session logs for debugging
Prerequisites
- Node.js 22.16 or later
- Claude Code installed and authenticated
Installation
Install Claude Code Runner globally:
npm install -g @rcrsr/claude-code-runner
Usage
prompt — Run a single prompt
claude-code-runner prompt "Refactor the auth module to use async/await"
skill — Run a Claude Code Skill file
Run skills by name:
claude-code-runner skill review-code src/auth.ts
Example skill (.claude/skills/review-code/SKILL.md):
---
description: Review code for issues
argument-hint: <file> [severity]
model: sonnet
---
Review the code in $1 for:
- Security vulnerabilities
- Performance issues
- Code style violations
Output findings as a numbered list.
Template variables:
$1,$2,$3... — Positional arguments$ARGUMENTS— All arguments joined with spaces
Frontmatter options:
argument-hint— Defines required<arg>and optional[arg]argumentsmodel— Default model (CLI--modeltakes precedence)description— Skill/command description
script — Run multi-phase workflows
Scripts use rill, a scripting language designed for AI workflows. Rill provides:
- Variables & capture — Store Claude's output with the
=>operator - Conditionals — Branch logic with
(condition) ? action - Loops — Iterate with
whileanddo-while - Functions — Reusable logic blocks
- String interpolation — Embed variables with
{$var}syntax - Triple-quote strings — Multi-line prompts with
"""..."""
claude-code-runner script workflow.rill src/api/
Example (code-review.rill):
---
description: Code review workflow
args: path: string
---
# Analyze the code
ccr::prompt("Review the code in {$path} for bugs") => $issues
# Get fixes based on issues found
"""
Based on these issues:
{$issues}
Suggest specific fixes with code examples.
"""
-> ccr::prompt => $fixes
# Summarize
ccr::prompt("Summarize: Issues: {$issues} Fixes: {$fixes}")
Host functions:
| Function | Description |
|---|---|
ccr::prompt(text, model?, timeout?) |
Execute a Claude prompt |
ccr::command(name, args?, timeout?) |
Run a command template from .claude/commands/ |
ccr::skill(name, args?, timeout?) |
Run a Claude Code skill (slash command) |
ccr::state(text) |
Set the script status line text |
ccr::has_result(text) |
Check if text contains a ccr:result tag |
ccr::get_result(text) |
Extract the last <ccr:result> from output |
ccr::has_frontmatter(path) |
Check if a file has frontmatter |
ccr::get_frontmatter(path) |
Parse YAML frontmatter |
ccr::file_exists(path) |
Check if a file exists |
See docs/rill-scripting.md for the full scripting reference.
Options
| Option | Description |
|---|---|
--version, -V |
Print version number |
--model, -m |
Specify Claude model (e.g., sonnet, opus, haiku) |
--quiet |
Minimal output (errors only) |
--normal |
Default output level |
--verbose |
Full output with details |
--log |
Enable file logging |
--deaddrop |
Enable DeadDrop streaming |
Example with model selection:
claude-code-runner -m sonnet prompt "Explain this codebase"
Results
Results let Claude communicate control flow decisions back to your scripts using XML:
<ccr:result type="repeat"/>
<ccr:result type="done"/>
<ccr:result type="blocked" reason="...">details</ccr:result>
Result types are application-defined. Your script extracts and handles them:
ccr::prompt("Fix bugs. Signal <ccr:result type='repeat'/> if more remain.") => $output
ccr::get_result($output) => $result
# Dispatch on result type
$result.type -> [
repeat: log("More work needed"),
blocked: ($result.reason -> error),
done: log("Complete")
]
See docs/results.md for workflow patterns.
Exit Codes
For CI/CD integration:
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (script threw or Claude exited 1) |
Logs
Sessions are logged to ./logs/ with timestamped filenames when --log is specified.
Documentation
Development
npm run check # Run all checks (types, lint, format, deps, test)
npm run build # Build the project
npm test # Run tests
License
MIT
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi