zxfccmm4/obsidian-opencode-knowledge/opencli-autofix

Claude Code and agent skill by zxfccmm4/obsidian-opencode-knowledge

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

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

Install

npx vskill@latest install zxfccmm4/obsidian-opencode-knowledge/opencli-autofix

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.

Safety Boundaries

  • `AUTH_REQUIRED` (exit code 77) — STOP. Tell user to log into the site in Chrome.
  • `BROWSER_CONNECT` (exit code 69) — STOP. Tell user to run opencli doctor.
  • CAPTCHA / rate limiting — STOP. Not an adapter issue.
  • Only modify RepairContext.adapter.sourcePath — never modify src/, extension/, tests/
  • Max 3 repair rounds per failure

Step 1: Collect Diagnostic Context

bash
OPENCLI_DIAGNOSTIC=1 opencli <site> <command> [args...] 2>diagnostic.json

Step 2: Analyze the Failure

Error CodeLikely CauseRepair Strategy
SELECTORDOM restructuredExplore current DOM → find new selector
EMPTY_RESULTAPI response schema changedCheck network → find new response path
API_ERROREndpoint URL changedDiscover new API via network intercept
AUTH_REQUIREDLogin flow changed, cookies expiredSTOP — tell user to log in
TIMEOUTPage loads differentlyAdd/update wait conditions
PAGE_CHANGEDMajor redesignMay need full adapter rewrite

Step 3: Explore the Current Website

Use opencli browser to inspect the live website. Never use the broken adapter.

bash
# DOM changed
opencli browser open https://example.com/target-page && opencli browser state
# API changed
opencli browser open https://example.com/target-page && opencli browser network

Step 4: Patch the Adapter

Read the adapter source file at RepairContext.adapter.sourcePath and make targeted fixes.

Common Fixes

Selector update:

typescript
// Before: page.evaluate('document.querySelector(".old-class")...')
// After: page.evaluate('document.querySelector(".new-class")...')

API endpoint change:

typescript
// Before: fetch('/api/v1/old-endpoint')
// After: fetch('/api/v2/new-endpoint')

Response schema change:

typescript
// Before: const items = data.results
// After: const items = data.data.items

Step 5: Verify the Fix

bash
opencli <site> <command> [args...]

If still fails, go back to Step 1. Max 3 rounds.

Step 6: File an Upstream Issue

Only after a verified local fix:

bash
gh issue create --repo jackwener/OpenCLI \
--title "[autofix] <site>/<command>: <error_code>" \
--body "<fix summary>"

Ask the user before filing.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/zxfccmm4/obsidian-opencode-knowledge/opencli-autofix/badge)](https://verified-skill.com/skills/zxfccmm4/obsidian-opencode-knowledge/opencli-autofix)

Something wrong with this skill or its page? Tell us.