其他

opencli-autofix

jackwener/opencli

Automatically fix broken OpenCLI adapters when commands fail. Load this skill when an opencli command fails — it guides you through collecting a trace artifact, patching the adapter, retrying, and filing an upstream GitHub issue after a verified fix. Works with any AI agent.

  • 1.8万 次安装
  • 3.1万 星标
  • 收录于

安装命令

npx skills add https://github.com/jackwener/opencli --skill opencli-autofix

要点

Diagnose and repair broken OpenCLI adapters automatically when commands fail, then file upstream issues.

  • Guides you through collecting trace artifacts, identifying root causes (DOM changes, API schema shifts, timeouts), and making minimal targeted fixes to adapter source code
  • Enforces safety boundaries: stops immediately on authentication, browser connectivity, or CAPTCHA issues without modifying code
  • Limits repair attempts to 3 rounds per failure; only files GitHub issues after a verified local fix passes
  • Includes decision logic to distinguish between actual adapter bugs and platform anti-scrape behavior, empty results, or soft 404s that don't warrant patching

SKILL.md

OpenCLI AutoFix — Automatic Adapter Self-Repair

When an opencli command fails because a website changed its DOM, API, or response schema, automatically diagnose, fix the adapter, and retry — don't just report the error.

Safety Boundaries

Before starting any repair, check these hard stops:

  • AUTH_REQUIRED (exit code 77) — STOP. Do not modify code. Tell the user to log into the site in Chrome.
  • BROWSER_CONNECT (exit code 69) — STOP. Do not modify code. Tell the user to run opencli doctor.
  • CAPTCHA / rate limiting — STOP. Not an adapter issue.

Scope constraint:

  • Only modify the file at adapterSourcePath in the trace summary.md front matter — this is the authoritative adapter location (may be clis/<site>/ in repo or ~/.opencli/clis/<site>/ for npm installs)
  • Never modify src/, extension/, tests/, package.json, or tsconfig.json

Retry budget: Max 3 repair rounds per failure. If 3 rounds of diagnose → fix → retry don't resolve it, stop and report what was tried.

Prerequisites