Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add mxyhi/ok-skills --skill opencli-autofixgit clone --depth 1 https://github.com/mxyhi/ok-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mxyhi/ok-skills/opencli-autofix)<a href="https://agentmods.dev/skills/mxyhi/ok-skills/opencli-autofix"><img src="https://agentmods.dev/badge/skills/mxyhi/ok-skills/opencli-autofix/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/mxyhi/ok-skills/opencli-autofix"><img src="https://agentmods.dev/badge/skills/mxyhi/ok-skills/opencli-autofix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00061 | $0.03121 |
| Opus 5.5 | $0.00024 | $0.01248 |
| Sonnet 5.5 | $0.00012 | $0.00624 |
| Haiku 4.5 | $0.00006 | $0.00312 |
Grade A, and why
opencli-autofix scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to opencli-autofix — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 298 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 connectivity
When 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.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed 3e2d8bbdc95c
- 1mo ago Changed 6460777a679c
- 3mo ago First seen · 298 lines · 61 tokens per session scan A 5799561d9176
opencli-autofix is a skill published in the GitHub repository mxyhi/ok-skills (518 stars, last pushed 9d ago), licensed Apache-2.0. It adds 61 tokens to every session and 3,121 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to opencli-autofix, differing in 0 lines, and is treated as a copy.
opencli-autofix compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| opencli-autofixmxyhi/ok-skills | Skill | 518 | 9d ago | Apache-2.0 | A | 61 | Claude Code |
| doubt-driven-developmentaddyosmani/agent-skills | Skill | 121k | 6d ago | MIT | A | 96 | Claude Code |
| performance-optimizationaddyosmani/agent-skills | Skill | 121k | 6d ago | MIT | A | 59 | Claude Code |
| debugging-and-error-recoveryaddyosmani/agent-skills | Skill | 121k | 6d ago | MIT | A | 129 | Claude Code |
| systematic-debuggingjnMetaCode/superpowers-zh | Skill | 8.6k | 14d ago | MIT | A | 24 | Claude Code |
| diagnosing-superpowersjnMetaCode/superpowers-zh | Skill | 8.6k | 14d ago | MIT | A | 111 | Claude Code |
| error-handlingDevelopersGlobal/ai-agent-skills | Skill | 220 | 5d ago | MIT | A | 32 | Claude Code, Codex |