opencli-autofix
Skill30k starsChanged 9 months agoApache-2.0View on GitHub
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.
2 other projects use a version of this.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- mambo-wang/ShowTimeword for word, first seen May 23, 2026
- XIYBHK/claude-skillsword for word, first seen Apr 21, 2026
Who's talking about jackwener/OpenCLI
- ruanyf/weekly“【开源自荐】OpenCLI - 把任何网站变成你的命令行工具,AI 原生的浏览器自动化框架”GitHub · Mar 19, 2026 · 7 reactions
- A Hacker News story“OpenCLI – Turn any website into a CLI, reusing your Chrome login”Hacker News · Mar 16, 2026 · 6 points
- A Hacker News story“Opencli – Make Any Website and Tool Your CLI”Hacker News · Mar 21, 2026 · 3 points
- @github-trending-js.bsky.social“🚀 Skyrocketing! 🚀 (200+ new stars) 📦 jackwener / OpenCLI ⭐ 21,415 (+344) 🗒 JavaScript Make Any Website …”Bluesky · May 17, 2026 · 2 likes
- A Hacker News story“OpenCLI – Make Any Website, Electron App, or Local Tool Your CLI”Hacker News · Mar 30, 2026 · 2 points
The biggest 5 of 57 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 57
Talked about on GitHub, Hacker News and Bluesky (57 times).
On GitHub · 49
- Mar 19, 2026【开源自荐】OpenCLI - 把任何网站变成你的命令行工具,AI 原生的浏览器自动化框架 — ruanyf/weekly7 reactions · 1 comment
- Nov 25, 2026chore(hermitd): measure the managed browser's fingerprint and capture a real X failure — gtapps/hermitd0 reactions
- Nov 15, 2026Update skill: /jackwener-opencli-browser (safe risk) — aiskillstore/marketplace0 reactions
- Nov 7, 2026agent-skills.github.jackwener.opencli: 2.0.2 → 2.0.3 — sudosubin/agents.nix0 reactions
- Nov 2, 2026规划:本机多站网页操作 CLI 入口 — OpenCLI 技术栈对齐与选型 — kuicao55/Gofer0 reactions
44 more on GitHub
- Oct 31, 2026PRICE-BROWSER-001|OpenCLI 浏览器商品检索与参考价格来源验证 — sunnyyang0822-stack/GiftWise-AI0 reactions · 1 comment
- Oct 26, 2026docs: 优化 README 并新增英文版本 — ShionWakanae/OpenCliWeb0 reactions
- Oct 20, 2026Update dependency @jackwener/opencli to v2 — IceCodeNew/claude-code-plugins-setup0 reactions
- Oct 20, 2026agent-skills.github.jackwener.opencli: 2.0.1 → 2.0.2 — sudosubin/agents.nix0 reactions
- Oct 20, 2026Add OpenCLI (jackwener/OpenCLI) — reacher-z/Awesome-CUA0 reactions
- Oct 19, 2026agent-skills.github.jackwener.opencli: 2.0.0 → 2.0.1 — sudosubin/agents.nix0 reactions
- Oct 18, 2026fix(metric): accept OpenCLI update notice and run capture with CI=1 — khangpworking/tdn-growth-os0 reactions
- Oct 17, 2026fix(browser): complete OpenCLI rollout across all machines — Castrozan/.dotfiles0 reactions · 1 comment
- Oct 17, 2026agent-skills.github.jackwener.opencli: 1.8.8 → 2.0.0 — sudosubin/agents.nix0 reactions
- Oct 17, 2026Update all non-major dependencies — IceCodeNew/claude-code-plugins-setup0 reactions · 2 comments
- Oct 16, 2026GhostCodexInspect 一期:Codex 注入启动器 MVP(DOM 重绘 + 画面流兜底) — Ghost233/GhostCodexInspect0 reactions · 1 comment
- Oct 16, 2026feat(ai-chat-turbo-engine): support Yuanbao Qwen GLM and Z.ai — CYoJkoY/Yoko-ScriptCat-Scripts0 reactions
- Oct 16, 2026Extend AI Chat Turbo Engine support for Yuanbao, Qwen/Qianwen, ChatGLM, and Z.ai — CYoJkoY/Yoko-ScriptCat-Scripts0 reactions
- Oct 14, 2026Update all non-major dependencies — IceCodeNew/claude-code-plugins-setup0 reactions · 2 comments
- Oct 10, 2026docs: improve browser automation positioning and discoverability — jackwener/opencli-website0 reactions
- Oct 7, 2026Metric tự động qua OpenCLI trên Chrome Fedora → dữ liệu dùng thẳng trong báo cáo (lọc + thông số web + in PDF + Excel) + thử đọc Facebook/Instagram — khangpworking/tdn-growth-os0 reactions
- Sep 29, 2026oct 2026 — kimtth/azure-openai-llm-notes0 reactions
- Sep 28, 2026agent-skills.github.jackwener.opencli: init at 1.8.8 — sudosubin/agents.nix0 reactions
- Sep 26, 2026Update dependency @jackwener/opencli to v1.8.8 — IceCodeNew/claude-code-plugins-setup0 reactions · 2 comments
- Sep 26, 2026Update all non-major dependencies — IceCodeNew/claude-code-plugins-setup0 reactions
- Sep 12, 2026Benchmark remaining high-value browser automation contenders and close tool-coverage gap — Rajeev-SG/web-automation-microbenchsays it tested it0 reactions
- Sep 4, 2026[Codex] Link Brain V1(Owner 修订版):小红书本机归档、单笔记 Obsidian、人机评论/戳与收藏同步 — CyberMist123/PI-Personal-Instance-OS0 reactions
- Sep 4, 2026[Codex] Link Brain V1:小红书本机归档、收藏同步与 Obsidian 人机共享知识入口 — CyberMist123/PI-Personal-Instance-OS0 reactions
- Aug 29, 2026fix(opencli): use official extension release guidance — Panniantong/Agent-Reach0 reactions · 1 comment
- Aug 27, 2026chore(deps): bump the minor-and-patch group across 1 directory with 13 updates — apache/maka0 reactions · 1 comment
- Aug 26, 2026chore(deps): bump the minor-and-patch group with 12 updates — apache/maka0 reactions · 2 comments
- Aug 16, 2026实验:验证 APS Message Hub 作为 Browser ↔ IDE 持久通讯控制面 — carllx/agent-project-system0 reactions · 5 comments
- Aug 11, 2026feat(channels): add TikTok via OpenCLI — Panniantong/Agent-Reach0 reactions · 1 comment
- Aug 7, 2026Research and implement a shared authenticated Gemini/OpenCLI browser bridge — djbclark/site-djbclark0 reactions
- Aug 5, 2026chore(deps): bump the minor-and-patch group across 1 directory with 22 updates — apache/maka0 reactions
- Jul 19, 2026OpenCLI: 웹사이트를 CLI로 변환하는 도구 — roomedia/ax-trend0 reactions
- Jul 15, 2026fix: recover Cloak sessions and arbitrate persistent writes — agentrhq/webcmd0 reactions
- Jul 12, 2026feat: tiered browser channel (OpenCLI → Computer Use → guided install… — jieshu666/Red-Skills0 reactions
- Jul 9, 2026Build eval harness for browser automation competitors — agentrhq/webcmd0 reactions · 3 comments
- Jun 11, 2026OpenCLI:AI Agent 的搜索神器 — dongmu233/blog-issues0 reactions
- Jun 9, 2026chore(deps): bump @jackwener/opencli from 1.8.0 to 1.8.3 in /apps/web-svelte — FrankQDWang/SeekTalent0 reactions · 2 comments
- May 27, 2026feat: v0.10.1-alpha — OpenCLI wechat fetch + CAPTCHA detection + host-aware fetch routing — Daily-AC/omnireach0 reactions
- May 15, 2026feat: integrate OpenCLI and larksuite/cli as data sources and agent tools — spitzheffel/infohub0 reactions
- May 11, 2026feat(twitter): expose card binding_values (title/description/image/domain) on read commands — huanghe/OpenCLI0 reactions
- May 9, 2026feat(skills): #P1-1 5-backend community skill discovery system (Sprint 60 W2 PR-1) — suzuke/agend-terminal0 reactions
- May 4, 2026Vol.46 Claude Code 入門 — hst1189/hst1189.github.io0 reactions
- Apr 1, 2026Network Error — tianhhe/boss-zhipin-cli0 reactions
- Mar 23, 2026Add opencli — agarrharr/awesome-cli-apps0 reactions · 1 comment
- Mar 23, 2026📈 Bản tin xu hướng AI mã nguồn mở 2026-03-23 — compasify/agents-radar0 reactions
On Hacker News · 4
- Mar 16, 2026OpenCLI – Turn any website into a CLI, reusing your Chrome login6 points · 3 comments
- Mar 21, 2026Opencli – Make Any Website and Tool Your CLI3 points
- Mar 30, 2026OpenCLI – Make Any Website, Electron App, or Local Tool Your CLI2 points · 1 comment
- Mar 18, 2026OpenCLI – control Electron and web apps from the CLI or AI agents1 point
On Bluesky · 4
- May 17, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 jackwener / OpenCLI ⭐ 21,415 (+344) 🗒 JavaScript Make Any Website & Tool Your CLI. A universal… — @github-trending-js.bsky.social2 likes and reposts · 1 reply
- Aug 1, 2026📦 jackwener / OpenCLI ⭐ 27,545 (+40) 🗒 JavaScript Make Any Website into CLI & Use your logged-in browser by AI agent. — @github-trending-js.bsky.social1 likes and repost
- Jun 25, 2026🚀 GitHub Intelligence Drop asdf (Go • 🟢) ⭐ 25.4K → https://github.com/asdf-vm/asdf OpenCLI (JavaScript • 🟢) ⭐ 25.2K →… — @githubfeed.bsky.social1 likes and repost
- Jun 13, 2026📦 jackwener / OpenCLI ⭐ 24,234 (+74) 🗒 JavaScript Make Any Website into CLI & Use your logged-in browser by AI agent. — @github-trending-js.bsky.social0 likes and reposts · 1 reply
Other versions2 projects use a version of this.
Word for word · 2
- mambo-wang/ShowTime★ 10100% same
- XIYBHK/claude-skills★ 1100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- llms.txtllms.txt
- opencli-adapter-authorSkill
- opencli-browserSkill
- opencli-usageSkill
- smart-searchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 5 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
When an opencli command fails because a website changed its DOM, API, or response schema, automatically diagnose, fix the adapter, and …
- Very specific: line 33
Use when opencli <site> <command> fails with repairable errors:
- Very specific: line 45
Retry with an alternative query or entry point: If opencli xiaohongshu search "X" returns 0 but opencli xiaohongshu search "X 攻略" returns …
- Very specific: line 48
"0 results" from a search is an answer: If the adapter successfully reached the search endpoint, got an HTTP 200, and the platform returned …
- Distinctive: line 50
Only proceed to Step 1 if the empty/selector-missing result is reproducible across retries and alternative entry points.
- Distinctive: line 54
Run the failing command with failure-retained trace enabled:
- Very specific: line 76
Read summaryPath first. It is the LLM-oriented entry point and includes front matter:
- Very specific: line 104
If you redirected stderr to a file, read that file and copy trace.summaryPath.
- Distinctive: line 106
Do not ask the user to rerun with legacy diagnostic env vars.
- Distinctive: line 110
Read the trace summary and the adapter source.
- Very specific: line 129
Use opencli browser to inspect the live website.
- Very specific: line 159
Read the adapter source file at adapterSourcePath from the trace summary front matter and make targeted fixes.
- Very specific: line 161
Use the Read tool on the exact path from summary.md front matter.
- Distinctive: line 205
If it still fails, go back to Step 1 and collect a fresh trace.
- Very specific: line 209
If the retry passes, the local adapter has drifted from upstream.
- Very specific: line 251
If the user approves and gh auth status succeeds:
- Very specific: line 259
If gh is not installed or not authenticated, tell the user and skip — do not error out.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 runopencli doctor.- CAPTCHA / rate limiting — STOP. Not an adapter issue.
Scope constraint:
- Only modify the file at
adapterSourcePathin the tracesummary.mdfront matter — this is the authoritative adapter location (may beclis/<site>/in repo or~/.opencli/clis/<site>/for npm installs) - Never modify
src/,extension/,tests/,package.json, ortsconfig.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
opencli doctor # Verify extension + daemon connectivityWhen to Use This Skill
Use when opencli <site> <command> fails with repairable errors:
- SELECTOR — element not found (DOM changed)
- EMPTY_RESULT — no data returned (API response changed)
- API_ERROR / NETWORK — endpoint moved or broke
- PAGE_CHANGED — page structure no longer matches
- COMMAND_EXEC — runtime error in adapter logic
- TIMEOUT — page loads differently, adapter waits for wrong thing
Before Entering Repair: "Empty" ≠ "Broken"
EMPTY_RESULT — and sometimes a structurally-valid SELECTOR that returns nothing — is often not an adapter bug. Platforms actively degrade results under anti-scrape heuristics, and a "not found" response from the site doesn't mean the content is actually missing. Rule this out before committing to a repair round:
- Retry with an alternative query or entry point. If
opencli xiaohongshu search "X"returns 0 butopencli xiaohongshu search "X 攻略"returns 20, the adapter is fine — the platform was shaping results for the first query. - Spot-check in a normal Chrome tab. If the data is visible in the user's own browser but the adapter comes back empty, the issue is usually authentication state, rate limiting, or a soft block — not a code bug. The fix is
opencli doctor/ re-login, not editing source. - Look for soft 404s. Sites like xiaohongshu / weibo / douyin return HTTP 200 with an empty payload instead of a real 404 when an item is hidden or deleted. The snapshot will look structurally correct. A retry 2-3 seconds later often distinguishes "temporarily hidden" from "actually gone".
- "0 results" from a search is an answer. If the adapter successfully reached the search endpoint, got an HTTP 200, and the platform returned
results: [], that is a valid answer — report it to the user as "no matches for this query" rather than patching the adapter.
Only proceed to Step 1 if the empty/selector-missing result is reproducible across retries and alternative entry points. Otherwise you're patching a working adapter to chase noise, and the patched version will break the next working path.
Step 1: Collect Trace Context
Run the failing command with failure-retained trace enabled:
opencli <site> <command> [args...] --trace retain-on-failure 2>trace-error.yamlOn failure, stderr contains the normal error envelope plus a small trace block:
ok: false
error:
code: SELECTOR
message: "Could not find element: .old-selector"
trace:
schemaVersion: 1
opencliVersion: "..."
traceId: "..."
dir: "/path/to/.opencli/profiles/default/traces/..."
summaryPath: "/path/to/.opencli/profiles/default/traces/.../summary.md"
receiptPath: "/path/to/.opencli/profiles/default/traces/.../receipt.json"Read summaryPath first. It is the LLM-oriented entry point and includes front matter:
---
schemaVersion: 1
opencliVersion: "..."
traceId: "..."
status: failure
site: "example"
command: "example/search"
adapterSourcePath: "/path/to/clis/example/search.js"
errorCode: "SELECTOR"
errorMessage: "Could not find element: .old-selector"
---The artifact directory contains:
summary.md # start here
receipt.json # machine-readable trace receipt
trace.jsonl # full redacted timeline
network.jsonl # redacted network events
console.jsonl # redacted console events
state/ # final snapshots when available
screenshots/ # final screenshots when availableIf you redirected stderr to a file, read that file and copy trace.summaryPath.
Do not ask the user to rerun with legacy diagnostic env vars. Trace is the repair evidence path.
Step 2: Analyze the Failure
Read the trace summary and the adapter source. Classify the root cause:
| Error Code | Likely Cause | Repair Strategy |
| SELECTOR | DOM restructured, class/id renamed | Explore current DOM → find new selector |
| EMPTY_RESULT | API response schema changed, or data moved | Check network → find new response path |
| API_ERROR | Endpoint URL changed, new params required | Discover new API via network intercept |
| AUTH_REQUIRED | Login flow changed, cookies expired | STOP — tell user to log in, do not modify code |
| TIMEOUT | Page loads differently, spinner/lazy-load | Add/update wait conditions |
| PAGE_CHANGED | Major redesign | May need full adapter rewrite |
Key questions to answer:
- What is the adapter trying to do? (Read the file at
adapterSourcePath) - What did the page look like when it failed? (Read
summary.md, thenstate/if needed) - What network requests happened? (Read
Failed Networkinsummary.md, thennetwork.jsonlif needed) - What's the gap between what the adapter expects and what the page provides?
Step 3: Explore the Current Website
Use opencli browser to inspect the live website. Never use the broken adapter — it will just fail again.
DOM changed (SELECTOR errors)
# Open the page and inspect current DOM
opencli browser open https://example.com/target-page && opencli browser state
# Look for elements that match the adapter's intent
# Compare the snapshot with what the adapter expectsAPI changed (API_ERROR, EMPTY_RESULT)
# Open page with network interceptor, then trigger the action manually
opencli browser open https://example.com/target-page && opencli browser state
# Interact to trigger API calls
opencli browser click <N> && opencli browser network
# Narrow to the request you care about by the fields its body should have
opencli browser network --filter author,text,likes
# Inspect specific API response (key is the `key` field from the default JSON output)
opencli browser network --detail <key>Step 4: Patch the Adapter
Read the adapter source file at adapterSourcePath from the trace summary front matter and make targeted fixes. This path is authoritative — it may be in the repo (clis/) or user-local (~/.opencli/clis/).
Use the Read tool on the exact path from summary.md front matter.
Common Fixes
Selector update:
// Before: page.evaluate('document.querySelector(".old-class")...')
// After: page.evaluate('document.querySelector(".new-class")...')API endpoint change:
// Before: const resp = await page.evaluate(`fetch('/api/v1/old-endpoint')...`)
// After: const resp = await page.evaluate(`fetch('/api/v2/new-endpoint')...`)Response schema change:
// Before: const items = data.results
// After: const items = data.data.items // API now nests under "data"Wait condition update:
// Before: await page.wait({ selector: '.loading-spinner', hidden: true })
// After: await page.wait({ selector: '[data-loaded="true"]' })Rules for Patching
- Make minimal changes — fix only what's broken, don't refactor
- Keep the same output structure —
columnsand return format must stay compatible - Prefer API over DOM scraping — if you discover a JSON API during exploration, switch to it
- Use
@jackwener/opencli/*imports only — never add third-party package imports - Test after patching — run the command again to verify
- Never relax
verify/<cmd>.jsonfixtures to silence a failure. A failingpatterns/notEmpty/mustNotContain/mustBeTruthyrule means the adapter's output is broken. Tighten the adapter so it produces correct values; do not loosen the fixture to accept the broken values. The one legitimate reason to edit a fixture during repair is when the site itself changed shape (e.g. URL format migration) — in that case update the fixture and note the change in~/.opencli/sites/<site>/notes.md. Otherwise editing the fixture is covering up a silent correctness regression.
Step 5: Verify the Fix
# Run the command normally
opencli <site> <command> [args...]If it still fails, go back to Step 1 and collect a fresh trace. You have a budget of 3 repair rounds (trace → fix → retry). If the same error persists after a fix, try a different approach. After 3 rounds, stop and report what was tried.
Step 6: File an Upstream Issue
If the retry passes, the local adapter has drifted from upstream. File a GitHub issue so the fix flows back to jackwener/OpenCLI.
Do NOT file for:
AUTH_REQUIRED,BROWSER_CONNECT,ARGUMENT,CONFIG— environment/usage issues, not adapter bugs- CAPTCHA or rate limiting — not fixable upstream
- Failures you couldn't actually fix (3 rounds exhausted)
Only file after a verified local fix — the retry must pass first.
Procedure:
- Prepare the issue content from the trace summary you already have:
- Title:
[autofix] <site>/<command>: <error_code>(e.g.[autofix] zhihu/hot: SELECTOR) - Body (use this template):
- Title:
## Summary
OpenCLI autofix repaired this adapter locally, and the retry passed.
## Adapter
- Site: `<site>`
- Command: `<command>`
- OpenCLI version: `<version from opencli --version>`
## Original failure
- Error code: `<error_code>`
~~~
<error_message>
~~~
## Local fix summary
~~~
<1-2 sentence description of what you changed and why>
~~~
_Issue filed by OpenCLI autofix after a verified local repair._- Ask the user before filing. Show them the draft title and body. Only proceed if they confirm.
- If the user approves and
gh auth statussucceeds:
gh issue create --repo jackwener/OpenCLI \
--title "[autofix] <site>/<command>: <error_code>" \
--body "<the body above>"If gh is not installed or not authenticated, tell the user and skip — do not error out.
When to Stop
Hard stops (do not modify code):
- AUTH_REQUIRED / BROWSER_CONNECT — environment issue, not adapter bug
- Site requires CAPTCHA — can't automate this
- Rate limited / IP blocked — not an adapter issue
Soft stops (report after attempting):
- 3 repair rounds exhausted — stop, report what was tried and what failed
- Feature completely removed — the data no longer exists
- Major redesign — needs full adapter rewrite via
opencli-adapter-authorskill
In all stop cases, clearly communicate the situation to the user rather than making futile patches.
Example Repair Session
1. User runs: opencli zhihu hot
→ Fails: SELECTOR "Could not find element: .HotList-item"
2. AI runs: opencli zhihu hot --trace retain-on-failure 2>trace-error.yaml
→ Gets trace summary with final state and failed action evidence
3. AI reads summary/state: page loaded but uses ".HotItem" instead of ".HotList-item"
4. AI explores: opencli browser open https://www.zhihu.com/hot && opencli browser state
→ Confirms new class name ".HotItem" with child ".HotItem-content"
5. AI patches: Edit adapter at `adapterSourcePath` — replace ".HotList-item" with ".HotItem"
6. AI verifies: opencli zhihu hot
→ Success: returns hot topics
7. AI prepares upstream issue draft, shows it to the user
8. User approves → AI runs: gh issue create --repo jackwener/OpenCLI --title "[autofix] zhihu/hot: SELECTOR" --body "..."Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

