opencli-autofix

opencli-autofix is a skill for Claude Code from mxyhi/ok-skills. It costs 61 tokens per session (3,121 once invoked), scanned A, a copy of opencli-autofix, Apache-2.0.

A repair workflow for broken OpenCLI website adapters. An adapter is the code that translates a website's pages or responses into commands an agent can use.

In plain words
What is it for?
Diagnosing and repairing an OpenCLI adapter after a website change, checking the repaired command, and preparing an upstream GitHub issue if the repair does not work.
Why use it?
Websites can change their page structure, interfaces, or response formats, causing commands to fail. This skill collects a trace, updates only the designated adapter, retries up to three times, and stops for login, browser-connection, CAPTCHA, or rate-limit problems.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Diagnosing and repairing an OpenCLI adapter after a website change, checking the repaired command, and preparing an upstream GitHub issue if the repair does not work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mxyhi/ok-skills/opencli-autofix
Install

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.

Any agent
npx skills add mxyhi/ok-skills --skill opencli-autofix
Clone the repo
git clone --depth 1 https://github.com/mxyhi/ok-skills

Made for: Claude Code.

Wrote 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.

agentmods badge for opencli-autofix

README.md
[![agentmods](https://agentmods.dev/badge/skills/mxyhi/ok-skills/opencli-autofix/github.svg)](https://agentmods.dev/skills/mxyhi/ok-skills/opencli-autofix)
Your own site
<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.

agentmods 80×15 button for opencli-autofix

Your own site · 80×15
<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>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,121 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash 3e2d8bbdc95c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

Origin

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.

opencli/opencli-autofix/SKILL.md · 298 lines

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 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

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 but opencli 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.

Read the full file on GitHub · 298 lines

Changes

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.

  1. 1mo ago Changed 3e2d8bbdc95c
  2. 1mo ago Changed 6460777a679c
  3. 3mo ago First seen · 298 lines · 61 tokens per session scan A 5799561d9176

Subscribe to this mod's changes

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.

Related

opencli-autofix compared with skills from other repositories

opencli-autofix next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
opencli-autofixmxyhi/ok-skillsSkill5189d agoApache-2.0A61Claude Code
doubt-driven-developmentaddyosmani/agent-skillsSkill121k6d agoMITA96Claude Code
performance-optimizationaddyosmani/agent-skillsSkill121k6d agoMITA59Claude Code
debugging-and-error-recoveryaddyosmani/agent-skillsSkill121k6d agoMITA129Claude Code
systematic-debuggingjnMetaCode/superpowers-zhSkill8.6k14d agoMITA24Claude Code
diagnosing-superpowersjnMetaCode/superpowers-zhSkill8.6k14d agoMITA111Claude Code
error-handlingDevelopersGlobal/ai-agent-skillsSkill2205d agoMITA32Claude Code, Codex