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

openclaw-skill-claude-code

v1.0.0

Published

Resilient Claude Code skill for OpenClaw — persistent, detached coding jobs

Readme

Resilient Claude Code Skill

Persistent, detached coding jobs for OpenClaw.

Most Claude Code wrappers run exec('claude ...'). If your agent turn times out, the gateway restarts, or the API hangs — your coding task dies.

This skill treats coding tasks as persistent, detached jobs using the @anthropic-ai/claude-agent-sdk.

Why This Exists

Decoupled Lifecycle

Agent turns have timeouts (e.g., 900s). Coding tasks take 20+ minutes. This skill starts a Claude agent process, detaches it from the agent session, and returns a jobId. The agent checks back later.

Restart Survival

If you restart OpenClaw (maintenance, crash, update), child processes usually get killed. This skill spawns processes in a separate process group with PID tracking on disk. On reboot, it re-acquires running jobs instead of losing them.

Rate Limit Intelligence

Generic wrappers treat any pause as a hang. This skill distinguishes between "Claude is thinking" and "API 429/503", bubbling precise status to the orchestrator.

Architecture

[ OpenClaw Agent ] -> (SKILL.md instructions) -> [ exec: node scripts/run.mjs ]
                                                        |
                                                  (Spawn detached job)
                                                        |
                                                  [ Claude Agent SDK ]
                                                        |
                                                  (Write state to disk)
                                                        v
                                                  [ jobs/<jobId>/ ]
                                                    ├── meta.json    (status, timestamps, pid)
                                                    ├── output.log   (streaming output)
                                                    └── result.json  (final result when done)
  1. Agent calls start — gets a jobId and pid.
  2. Agent turn ends. The coding job keeps running.
  3. Agent polls status on next turn.
  4. Skill reads process status and log tail from disk.
  5. Returns: running | completed | failed | killed.

Usage

Start a job

node scripts/run.mjs start \
  --prompt "Read TASK.md and implement. Run tests." \
  --cwd /path/to/project \
  --job-id task-137

Check status

node scripts/run.mjs status --job-id task-137

Get logs

node scripts/run.mjs logs --job-id task-137 --tail 50

Get result

node scripts/run.mjs result --job-id task-137

List all jobs

node scripts/run.mjs list

Kill a job

node scripts/run.mjs kill --job-id task-137

File Structure

openclaw-skill-claude-code/
├── SKILL.md              # OpenClaw skill instructions
├── README.md             # Documentation
├── package.json          # Dependencies
├── scripts/
│   ├── run.mjs           # CLI entry point
│   ├── job-manager.mjs   # Job lifecycle management
│   └── worker.mjs        # Detached worker process
└── jobs/                 # Runtime state (gitignored)
    └── <jobId>/
        ├── meta.json
        ├── output.log
        └── result.json

Configuration

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | ANTHROPIC_API_KEY | Yes | — | Claude API key | | CLAUDE_SKILL_JOBS_DIR | No | <skill-dir>/jobs | Directory for job state | | CLAUDE_SKILL_MODEL | No | SDK default | Override the model |

How It Works

Job Manager (scripts/job-manager.mjs): Manages the job lifecycle — start, status, result, logs, list, kill. Spawns workers as detached processes and tracks them by PID on disk.

Worker (scripts/worker.mjs): Runs in a detached process. Streams the Claude Agent SDK query() iterator, writing output to output.log and final results to result.json. Handles SIGTERM gracefully and detects rate limits.

CLI (scripts/run.mjs): Thin command-line wrapper over the job manager. All output is structured JSON.