跳到正文
cccskills
免费在 GitHub 公开

fake-model-faults

Reproduce model connection failures and interrupted responses in the desktop app using a local fault server and test providers. Check error messages and retry behavior for refused connections, DNS failures, HTTP errors, stalled requests, and cut streams.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Make the desktop's model provider fail on demand (connection refused, DNS not found, socket reset, 429, 5xx, 401, 402, stalled or cut stream) with a local fault server and test providers. Use when reproducing or designing model error and retry states without a real outage.

查看安装方法

适用场景

  • Checking error messages for model connection failures
  • Testing responses to rate limits and server errors
  • Reproducing stalled requests and interrupted replies
  • Reviewing retry behavior without a real provider outage

包含的文件(3)

  • SKILL.md2.5 KB
  • scripts/fault-providers.py2.6 KB
  • scripts/fault-server.mjs2.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Fake model faults

Real provider errors come from the engine (the opencode sidecar), not from the window, so CDP network throttling cannot produce them. This skill points test providers at failures instead.

Set up

F=.opencode/skills/fake-model-faults/scripts
node $F/fault-server.mjs &                          # 127.0.0.1:55600 (PORT=… to change)
python3 $F/fault-providers.py add                   # backs up runtime.sqlite, adds three providers
CDP_URL=http://127.0.0.1:<cdp> node .opencode/skills/drive-desktop-cdp/scripts/cdp.mjs refresh-providers   # expect 200

Writing the v2 engine config directly does not stick; the server rewrites it from the global runtime config within seconds. refresh-providers saves a dummy fault-lab key so the server mirrors providers immediately.

What each model does

Provider · modelEngine error you get
Fault Refused · refusedConnectionRefused: Unable to connect… (closed port), with retries
Fault DNS · enotfoundgetaddrinfo ENOTFOUND … (a .invalid host), with retries
Fault Lab · resetECONNRESET: The socket connection was closed unexpectedly…, with retries
Fault Lab · mid-stream-resetpartial reply, then the socket closes
Fault Lab · stallthe request never answers
Fault Lab · http-429 / http-500 / http-503 / http-401 / http-402that HTTP status with a JSON error body
Fault Lab · oka normal short reply (checks the pipeline)

A DNS timeout (getaddrinfo ETIMEOUT) and the "OpenWork Cloud is temporarily unavailable" banner need a real network cut: turn Wi-Fi off for about 40 seconds (networksetup -setairportpower en0 off, then on). Ask first; it drops the whole machine, including VPNs.

Clean up

python3 $F/fault-providers.py remove
CDP_URL=… node .opencode/skills/drive-desktop-cdp/scripts/cdp.mjs eval '(async()=>{const w=(location.hash.match(/#\/workspace\/([^/]+)/)||[])[1];const r=await fetch("http://127.0.0.1:"+localStorage.getItem("openwork.server.port")+"/workspace/"+w+"/opencode/auth/fault-lab",{method:"DELETE",headers:{Authorization:"Bearer "+localStorage.getItem("openwork.server.token")}});return r.status})()'
kill %1   # the fault server

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Manage OpenWork feature releases with feature flags, switches that control access to new behavior. Register features before coding, release them by organization and deployment, prepare a global shutdown option, and remove temporary flags after rollout.

中文简介正在准备中。当前显示英语简介。

  • Registering a feature before implementation
  • Releasing a feature to selected organizations
  • Separating cloud and self-hosted availability
different-ai/openwork2.4万2026年10月19日 更新

Connect OpenCode browser tools to a locally running OpenWork Electron app to inspect its UI, enter a task, and check the response. This skill supports exploration and debugging through CDP, Chrome's remote control protocol.

中文简介正在准备中。当前显示英语简介。

  • Connecting browser tools to a local Electron development app
  • Inspecting screen state during debugging
  • Entering a task in the composer and running it
different-ai/openwork2.4万2026年10月19日 更新

Check added lines in a change for information identifying customers, prospects, partners, or outside individuals. Report locations and generic remediation without reproducing identities, and escalate cases where the information is already public.

中文简介正在准备中。当前显示英语简介。

  • Checking changes for customer and partner identities
  • Reviewing documents and test data for identifying details
  • Reporting disclosure locations without repeating identities
different-ai/openwork2.4万2026年10月19日 更新

Connects supported AI clients, including Claude Code and Codex, to OpenWork through MCP, a protocol for accessing external tools. It guides account sign-in and verifies that tools for finding and running organization capabilities are available.

中文简介正在准备中。当前显示英语简介。

  • Connecting an AI client to OpenWork organization resources
  • Signing in and verifying available MCP tools
  • Switching organizations or troubleshooting authentication
different-ai/openwork2.4万2026年10月19日 更新

Review an outside contributor’s pull request before running its code. Identify concealed behavior, obfuscated code, risky dependencies, and build hooks, with file locations and specific checks for maintainers to follow up.

中文简介正在准备中。当前显示英语简介。

  • Screening an outside contributor’s pull request before execution
  • Checking encoded code and unexplained network calls
  • Reviewing dependency changes and installation scripts
different-ai/openwork2.4万2026年10月19日 更新

Create an OpenCode plugin for OpenWork with custom tools and hooks, which run code at specific events. The skill builds the plugin file and adds its entry to the project configuration.

中文简介正在准备中。当前显示英语简介。

  • Adding custom tools to OpenWork
  • Creating a plugin to save and list notes
  • Running custom code before or after tool execution
different-ai/openwork2.4万2026年10月19日 更新

查看 different-ai 的全部技能

报告此技能的问题