npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rcrsr/claude-code-runner

v0.11.1

Published

Execute Claude CLI with PTY handling, real-time tool visualization, and iterative execution support

Readme

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 throgh <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 18 or later
  • Claude Code installed and authenticated

Installation

Claude Code Runner depends on node-pty for TTY terminal handling. You may need to install build tools first so the native modules can compile. See node-pty instructions for your platform.

Then 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 command 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] arguments
  • model — Default model (CLI --model takes 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 :> operator
  • Conditionals — Branch logic with (condition) ? action
  • Loops — Iterate with for and 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?) | Execute a Claude prompt | | ccr::skill(name, args?) | Run a Claude Code skill | | ccr::command(name, args?) | Run a Claude Code slash command | | ccr::has_result(text) | Check if text contains ccr:result | | ccr::get_result(text) | Extract <ccr:result> from output | | ccr::has_frontmatter(path) | Check if file has frontmatter | | ccr::get_frontmatter(path) | Parse YAML frontmatter | | ccr::file_exists(path) | Check if 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: error $result.reason,
  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 (typecheck, lint, format, test)
npm run build    # Build the project
npm test         # Run tests

License

MIT