
Opencli Repair
Diagnose and patch OpenCLI site adapters when DOM, API, or auth changes break your terminal automations.
Install
npx skills add https://github.com/jackwener/opencli --skill opencli-repairWhat is this skill?
- Maps failure modes: SELECTOR, EMPTY_RESULT, API_ERROR, NETWORK, PAGE_CHANGED, COMMAND_EXEC, TIMEOUT
- OPENCLI_DIAGNOSTIC=1 emits RepairContext JSON between ___OPENCLI_DIAGNOSTIC___ markers
- Starts with opencli doctor for extension and daemon connectivity
- Browser automation to discover DOM/API drift and patch adapters
- allowed-tools: Bash(opencli:*), Read, Edit, Write for in-repo adapter fixes
Adoption & trust: 664 installs on skills.sh; 23.8k GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Lark Drivelarksuite/cli
Lark Sharedlarksuite/cli
Lark Minuteslarksuite/cli
Tzstxixu-me/skills
Runcomfy Cliagentspace-so/runcomfy-agent-skills
Caveman Helpjuliusbrussee/caveman
Journey fit
Primary fit
Adapters are built and maintained as integration glue; repair is the canonical shelf where you fix selector and API contracts. OpenCLI commands are external-site integrations, not frontend components or ship-time security audits.
Common Questions / FAQ
Is Opencli Repair safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Opencli Repair
# OpenCLI Repair — AI-Driven Adapter Self-Repair When an adapter breaks because a website changed its DOM, API, or auth flow, use this skill to diagnose the failure and patch the adapter. ## Prerequisites ```bash opencli doctor # Verify extension + daemon connectivity ``` ## When to Use This Skill Use when `opencli <site> <command>` fails with errors like: - **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 ## Step 1: Collect Diagnostic Context Run the failing command with diagnostic mode enabled: ```bash OPENCLI_DIAGNOSTIC=1 opencli <site> <command> [args...] 2>diagnostic.json ``` This outputs a `RepairContext` JSON between `___OPENCLI_DIAGNOSTIC___` markers in stderr: ```json { "error": { "code": "SELECTOR", "message": "Could not find element: .old-selector", "hint": "The page UI may have changed." }, "adapter": { "site": "example", "command": "example/search", "sourcePath": "/path/to/clis/example/search.ts", "source": "// full adapter source code" }, "page": { "url": "https://example.com/search", "snapshot": "// DOM snapshot with [N] indices", "networkRequests": [], "consoleErrors": [] }, "timestamp": "2025-01-01T00:00:00.000Z" } ``` **Parse it:** ```bash # Extract JSON between markers from stderr output cat diagnostic.json | sed -n '/___OPENCLI_DIAGNOSTIC___/{n;p;}' ``` ## Step 2: Analyze the Failure Read the diagnostic context 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 | Walk login flow with operate | | TIMEOUT | Page loads differently, spinner/lazy-load | Add/update wait conditions | | PAGE_CHANGED | Major redesign | May need full adapter rewrite | **Key questions to answer:** 1. What is the adapter trying to do? (Read the `source` field) 2. What did the page look like when it failed? (Read the `snapshot` field) 3. What network requests happened? (Read `networkRequests`) 4. What's the gap between what the adapter expects and what the page provides? ## Step 3: Explore the Current Website Use `opencli operate` to inspect the live website. **Never use the broken adapter** — it will just fail again. ### DOM changed (SELECTOR errors) ```bash # Open the page and inspect current DOM opencli operate open https://example.com/target-page && opencli operate state # Look for elements that match the adapter's intent # Compare the snapshot with what the adapter expects ``` ### API changed (API_ERROR, EMPTY_RESULT) ```bash # Open page with network interceptor, then trigger the action manually opencli operate open https://example.com/target-page && opencli operate state # Interact to trigger API calls opencli operate click <N> && opencli operate network # Inspect specific API response opencli operate network --detail <index> ``` ### Auth changed (AUTH_REQUIRED) ```bash # Check current auth state opencli operate open https://example.com && opencli operate state # If log