opencli-autofix
यह क्या करती है
यह स्किल ऐसे OpenCLI कमांड को ठीक करती है जो इसलिए काम करना बंद कर गया क्योंकि वेबसाइट बदल गई। यह ट्रेस इकट्ठा करती है, एडैप्टर फ़ाइल अपडेट करती है, और कमांड दोबारा चलाती है।
कब इस्तेमाल करें
- ✓जब वेबसाइट का लेआउट या डेटा बदलने से OpenCLI कमांड विफल हो।
- ✓जब साइट अपडेट के बाद कोई कमांड खाली नतीजे दे।
- ✓जब सत्यापित सुधार के बाद आप OpenCLI एडैप्टर ठीक करवाकर ऊपर तक रिपोर्ट करवाना चाहें।
Skill का लिंक
https://github.com/jackwener/OpenCLI/blob/main/skills/opencli-autofix/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस साइट के लिए मेरा OpenCLI कमांड नतीजे देना बंद कर चुका है। इसकी जांच कीजिए, एडैप्टर ठीक कीजिए, और फिर चलाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट पहले जांचता है कि विफलता लॉगिन या कनेक्शन की है, क्योंकि उनके लिए आपको कदम उठाना होगा। बाकी विफलताओं में वह केवल एडैप्टर फ़ाइल पैच करता है, कमांड दोबारा चलाता है, और समस्या बनी रहे तो तीन मरम्मत दौर के बाद रुक जाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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.
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.yaml
On 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 # redac
अक्सर पूछे जाने वाले सवाल
क्या यह लॉगिन की समस्याएँ ठीक करेगी?
नहीं। लॉगिन और कनेक्शन की गलतियाँ मरम्मत रोक देती हैं, और एजेंट आपसे कदम उठाने को कहता है।
यह कितनी मरम्मत कोशिशें करती है?
हर विफलता के लिए ज़्यादा से ज़्यादा तीन दौर, यानी जांच, सुधार और दोबारा चलाना।
यह कौन-सी फ़ाइलें बदल सकती है?
केवल ट्रेस में बताई गई एक एडैप्टर फ़ाइल। मुख्य सोर्स और टेस्ट फ़ाइलें अछूती रहती हैं।
जानकारी
लेखक का मूल विवरण
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.
repo: jackwener/OpenCLI
लोकप्रियता
- GitHub स्टार
- 31k
- रैंकिंग में स्थान
- #9333
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 26/10/2026
कमेंट
- …
इस repository की और skills
opencli-adapter-author
31kयह आपके एजेंट को OpenCLI एडैप्टर बनाने में मदद करती है, जो कमांड को किसी वेबसाइट से भरोसेमंद रूप से डेटा लाने देता है।
opencli-browser
31kयह आपके एजेंट को Chrome चलाकर पेज खोलने, उन्हें पढ़ने, साइटों पर क्लिक करने और ज़रूरी जानकारी लेने देती है।
opencli-usage
31kयह आपके एजेंट को वेबसाइटों और Chrome के लिए OpenCLI कमांड ढूंढने, चलाने और उनके नतीजे सही पढ़ने में मदद करती है।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।