opencli-autofix skill for Claude: repair broken OpenCLI commands
Makes your agent fix an OpenCLI website command that broke, retry it, and offer to file an upstream GitHub issue. For OpenCLI users.
- Installs
- 17.8K
- on skills.sh
- Stars
- 30.8K
- on GitHub
- Updated
- Oct 2026
- last repo commit
opencli-autofix makes your agent repair an OpenCLI adapter when its command fails because a website changed. The agent reruns the command with a trace, reads the saved failure summary, inspects the live page, edits the adapter file, and retries, for up to three rounds.
It loads when an opencli command fails with a repairable error such as SELECTOR, EMPTY_RESULT, API_ERROR, PAGE_CHANGED, COMMAND_EXEC or TIMEOUT. It needs OpenCLI itself, its Chrome extension and a running local daemon, and it uses the opencli and gh command lines. It stops without editing code on login, browser-connection or CAPTCHA problems.
Good for
- OpenCLI users whose site commands start failing after a website change
- Developers who maintain their own OpenCLI adapters
- Anyone running OpenCLI through an AI agent on their logged-in Chrome
Install opencli-autofix
Claude Code
- 1
Copy this prompt.
Install the opencli-autofix skill in Claude Code. Run this command: npx skills add https://github.com/jackwener/opencli --skill opencli-autofix Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
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.
Sections in SKILL.md
- Safety Boundaries
- Prerequisites
- When to Use This Skill
- Before Entering Repair: "Empty" ≠ "Broken"
- Step 1: Collect Trace Context
- Step 2: Analyze the Failure
- Step 3: Explore the Current Website
- DOM changed (SELECTOR errors)
- API changed (API_ERROR, EMPTY_RESULT)
- Step 4: Patch the Adapter
- Common Fixes
- Rules for Patching
- Step 5: Verify the Fix
- Step 6: File an Upstream Issue
- Summary
- Adapter
Key facts
- Author
- jackwener
- License
- Apache-2.0
- Installs on skills.sh
- 17,833 (Nov 2, 2026)
- GitHub stars
- 30,816 for the whole repo (Nov 2, 2026)
- Last commit
- Oct 26, 2026
- Tools it may use
- opencli, gh, Read, Edit, Write
- Retry budget
- 3 repair rounds per failure
What it includes
Stop on login, browser or CAPTCHA problems
On AUTH_REQUIRED (exit 77), BROWSER_CONNECT (exit 69), CAPTCHA or rate limiting it does not edit code and tells you what to do.
Read ·
Safety checkRule out blocked or genuinely empty results first
Retries with another query, checks the page in a normal Chrome tab and looks for soft 404s before treating an empty result as a bug.
Network ·
Empty is not brokenRerun with --trace retain-on-failure
Runs the failing command again, reads the trace summary and its adapterSourcePath. Trace files hold a redacted timeline, network and console events, and screenshots.
Try: “opencli zhihu hot failed with SELECTOR. Fix the adapter.”
Runs code ·
Step 1: collect a traceClassify the cause from the error code
Maps SELECTOR, EMPTY_RESULT, API_ERROR, TIMEOUT and PAGE_CHANGED to a repair strategy.
Read ·
Step 2: analyzeUse opencli browser to inspect the page
Runs opencli browser commands (open, state, click, network) to inspect the live page and its network calls. It must not use the broken adapter for this.
Runs code ·
Step 3: explore the live siteMake the smallest edit at adapterSourcePath
Makes the smallest edit at the adapterSourcePath from the trace summary. It must not change src, extension, tests, package.json or tsconfig.json, and must not loosen verify fixtures to hide a failure. The one exception SKILL.md allows is updating a fixture when the site itself changed shape, and noting that in ~/.opencli/sites/<site>/notes.md.
Write ·
Step 4: patch the adapterRerun the command, up to 3 rounds
If it still fails it collects a fresh trace. After 3 rounds it stops and reports what it tried.
Runs code ·
Step 5: verifyDraft a GitHub issue after a verified fix
Shows you the title and body and asks first. Only with your approval and a working gh login does it run gh issue create against jackwener/OpenCLI.
Runs code ·
Step 6: file an upstream issue
From the official docs
Permissions
Medium risk
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It edits adapter code and drives your logged-in Chrome
The agent runs opencli browser commands on pages you may be signed in to, and edits the adapter file. Keep a copy of the adapter and review the diff. github.com
Edits can reach beyond the adapter file
SKILL.md limits edits to the adapterSourcePath file, but allows updating a verify fixture when the site changed shape and writing a note to ~/.opencli/sites/<site>/notes.md. Review the diff, including any fixture change. github.com
It can file a public GitHub issue after you approve
The issue goes to jackwener/OpenCLI with the site, command and error text. Read the draft before you say yes, and remove anything private. github.com
Traces can hold page content
Trace folders keep a redacted timeline, network events, console events and screenshots under ~/.opencli. Delete old traces if the pages were sensitive. github.com
Technical details
| Talks to | The websites you open through OpenCLI in your Chrome. GitHub, only if you approve an upstream issue |
|---|---|
| Sign-in and keys | Uses your existing Chrome logins and your gh sign-in; the skill stores no credentials. |
| Scopes |
|
Questions
What does opencli-autofix do?
When an opencli website command fails because the site changed, it has your agent find the cause, edit the adapter file, retry, and offer to report the fix upstream. It gives up after three rounds.
How do I install it in Claude Code, the Claude app or Codex?
Use the install box above. The OpenCLI README shows npx skills add jackwener/opencli --skill opencli-autofix and says its skills work in agents such as Claude Code and Cursor. It does not document a Claude app upload.
What do I need before using it?
You need OpenCLI installed, its Chrome extension and the local daemon. The skill tells the agent to run opencli doctor first to check the extension and daemon connection.
Does it need an API key?
The SKILL.md lists none. The agent uses opencli and, for the optional upstream issue, the gh command line signed in to GitHub.
Is it safe to install?
It is one instruction file, but the agent edits adapter code, drives your logged-in Chrome through OpenCLI, and can run gh. It must ask you before filing an issue. Check each edit and stay on adapters you trust.
Will it post to GitHub without asking?
No. The SKILL.md says to show you the draft title and body and only file the issue if you confirm. It files only after a verified local fix, and skips filing if gh is missing or not signed in.
Which skills go with it?
The SKILL.md points to opencli-adapter-author when a site needs a full adapter rewrite. The README lists opencli-browser, opencli-usage and opencli-adapter-author as separate installs.
Information
updated Nov 2, 2026
- Repository
- jackwener/opencli
- Folder
skills/opencli-autofix
Sources
Docs, issue trackers and discussions this page is built from.
Show all 2Hide
- opencli-autofix SKILL.md · github.com
- OpenCLI README · github.com