Token导航 LogoToken导航TokenDH.com
开发执行命令clawhub未标认证来源可访问clear审计提醒

paperclip-resilience回形针弹性

Agent Skill

paperclip-resilience 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,946

周安装

124

GitHub Stars

公开资料未说明

下载量

1,032
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:paperclip-resilience(回形针弹性)
来源仓库:https://github.com/levineam/paperclip-resilience
安装命令:
openclaw skills install paperclip-resilience
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install paperclip-resilience

简介

Paperclip AI 代理编排的生产弹性模式。

  • 支持后备生成、模型轮换和运行恢复功能。
  • 提供拦截器路由和任务注入的容错机制。
  • 需确认生产环境部署权限和监控配置。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。
  • 建议了解故障转移策略和性能影响。paperclip-resilience 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
paperclip-resilience
description
>
metadata
openclaw
emoji
🛡️

paperclip-resilience

Production-grade resilience for AI agents running on Paperclip, orchestrated through OpenClaw.

The Problem

Paperclip agents die silently when providers hit rate limits, sessions crash on gateway restarts, and failed runs leave agents stuck in error state with no recovery path. If you're running agents overnight or in parallel, you need automated recovery — not manual babysitting.

What's Included

ModuleFilePurpose
Spawn with Fallbacksrc/spawn-with-fallback.jsWraps openclaw session spawn with automatic provider failover. If your primary model 429s, it tries the configured fallback.
Model Rotationsrc/model-rotation.jsTracks fix attempts per PR/task and rotates through models + thinking levels after repeated failures.
Run Recoverysrc/run-recovery.jsDetects failed Paperclip heartbeat runs (gateway errors, timeouts, 429s) and re-invokes agents with model fallback.
Blocker Routingsrc/blocker-routing.jsScans agent session transcripts for blocked/stuck signals and routes them to configurable destinations (file, stdout, webhook).
Task Injectionsrc/task-injection.jsEnriches spawn task descriptions with issue tracking metadata, PR requirements, and UX design checklists before agent execution.

Quick Start

1. Install

clawhub install paperclip-resilience

2. Configure

cd skills/paperclip-resilience
cp config.example.json config.json
# Edit config.json with your model aliases and fallback pairs

3. Use Spawn with Fallback

# CLI
node skills/paperclip-resilience/src/spawn-with-fallback.js \
  --model sonnet --task "Fix the login bug" --mode run

# Dry run to see what would happen
node skills/paperclip-resilience/src/spawn-with-fallback.js \
  --model opus --task "Refactor auth" --dry-run
// Programmatic
const { spawnWithFallback, loadConfig } = require('./skills/paperclip-resilience/src/spawn-with-fallback');
const config = loadConfig('./my-config.json');
const result = await spawnWithFallback({ model: 'sonnet', task: 'Fix bug', config });

4. Set Up Run Recovery (Cron)

Add to your OpenClaw cron schedule to auto-recover failed runs:

node skills/paperclip-resilience/src/run-recovery.js --dry-run --verbose

Once verified, schedule it:

*/15 * * * *  node skills/paperclip-resilience/src/run-recovery.js

5. Model Rotation for PR Fixes

# Check if a PR needs model rotation
node skills/paperclip-resilience/src/model-rotation.js check --pr 42 --repo owner/repo

# Record an attempt
node skills/paperclip-resilience/src/model-rotation.js record --pr 42 --repo owner/repo --model anthropic/claude-sonnet-4-6

Configuration

All modules read from config.json in the skill directory, with sensible defaults if no config is provided.

See config.example.json for the full documented schema, and config.schema.json for validation.

Key Configuration Sections

aliases — Map short model names to full provider/model strings:

{
  "aliases": {
    "sonnet": "anthropic/claude-sonnet-4-6",
    "opus": "anthropic/claude-opus-4-6",
    "codex": "openai-codex/gpt-5.3-codex"
  }
}

fallbacks — Define provider failover pairs:

{
  "fallbacks": {
    "anthropic/claude-sonnet-4-6": "openai-codex/gpt-5.3-codex",
    "openai-codex/gpt-5.3-codex": "anthropic/claude-sonnet-4-6"
  }
}

failurePatterns — Regex patterns that trigger fallback:

{
  "failurePatterns": {
    "patterns": ["credits", "quota", "402", "rate[\\s_-]?limit"]
  }
}

Architecture

┌──────────────────┐     ┌──────────────────┐
│  Task Injection   │────▶│ Spawn w/ Fallback │
│  (enrich task)    │     │  (provider retry)  │
└──────────────────┘     └────────┬───────────┘
                                  │
                                  ▼
                    ┌──────────────────────┐
                    │   Paperclip Agent     │
                    │   (heartbeat runs)    │
                    └──────────┬───────────┘
                               │
                    ┌──────────┴───────────┐
                    │                       │
                    ▼                       ▼
          ┌────────────────┐    ┌──────────────────┐
          │ Run Recovery    │    │ Blocker Routing   │
          │ (detect + wake) │    │ (escalate stuck)  │
          └────────────────┘    └──────────────────┘
                    │
                    ▼
          ┌────────────────┐
          │ Model Rotation  │
          │ (escalate model)│
          └────────────────┘

Requirements

  • OpenClaw (for session spawning and agent management)
  • Paperclip (for heartbeat run monitoring and agent lifecycle)
  • Node.js 18+
  • At least two LLM provider API keys configured (for fallback to work)

Security

This skill was security-reviewed for ClawHub publication in SUP-453. The code paths that accept user-controlled input now enforce validation up front and fail closed.

Hardened Surfaces

SurfaceProtection
Model namesCharacter allowlist with support for provider suffixes like :free; rejects empty path segments and . / .. traversal segments
Task files (@file)Blocks explicit ../, canonicalizes symlinks with realpath, rejects system paths like /etc/ and /usr/, requires a regular file
Task payloads1MB max size limit for inline and file-backed task content
Spawn mode + labelsAllowlist validation for mode (run, session) and safe-character validation for labels
Failure regex configCaps pattern count/length and drops invalid regexes to reduce ReDoS risk
Paperclip issue metadataSanitizes API strings, constrains issue identifier extraction, normalizes priority values

Security Boundaries

  • Process execution: uses execFile, not shell execution
  • Dynamic code execution: none (eval / Function not used)
  • Credentials: read from environment or external auth files; not embedded in the skill
  • File access: limited to explicitly requested files, with traversal and symlink tunnel protections
  • Dependencies: zero external runtime dependencies in this package

Verification

# Functional coverage
node skills/paperclip-resilience/tests/test-spawn-with-fallback.js

# Full security suite
node skills/paperclip-resilience/tests/test-security.js

# Quick smoke test
node skills/paperclip-resilience/tests/test-security-quick.js

Audit Record

  • Last audit: 2026-03-27
  • Tracking issue: SUP-453
  • Status: ✅ Approved for ClawHub publication
  • Details: see SECURITY-AUDIT-REPORT.md

Related Paperclip Issues

These are the upstream gaps this skill works around:

  • #276 — Auto-requeue agent on failure
  • #1845 — No crash-recovery wakeup after restart
  • #1861 — Agent death on 429 with no model fallback

License

MIT

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

90.18%
按下载量换算931

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install paperclip-resilience 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills