本文へ移動
cccskills
無料GitHub で公開

fake-model-faults

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.

インストール方法を見る

含まれるファイル(3)

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

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Add a new feature, put work behind a feature flag, roll something out (per organization, for everyone, cloud or self-hosted), revert or kill a feature, or make a big change to existing behavior such as a new engine. Use BEFORE writing the feature code, and when finishing or removing a rollout.

日本語の概要は準備中です。原文の説明を表示しています。

different-ai/openwork2.4万2026年10月11日 更新

Local OpenWork Electron browser automation with CDP. Use when driving a local Electron dev app, browser_list, browser_snapshot, browser_eval, composer automation, or local UI smoke tests.

日本語の概要は準備中です。原文の説明を表示しています。

different-ai/openwork2.4万2026年10月11日 更新

Flag customer, prospect, partner, or outside-person identities in the diff. Reported in the Warden security summary.

日本語の概要は準備中です。原文の説明を表示しています。

different-ai/openwork2.4万2026年10月11日 更新

Connect the OpenWork MCP Gateway (https://api.openworklabs.com/mcp/agent) to Claude Code, Codex, Gemini CLI, Cursor, VS Code, Claude Desktop, or ChatGPT so the agent can use the user's OpenWork organization skills, plugins, and connections.

日本語の概要は準備中です。原文の説明を表示しています。

different-ai/openwork2.4万2026年10月11日 更新

Screen a pull request from an outside contributor for hidden, obfuscated, or supply-chain-risky changes before any of its code runs.

日本語の概要は準備中です。原文の説明を表示しています。

different-ai/openwork2.4万2026年10月11日 更新

Create an OpenCode plugin for OpenWork. Scaffolds the plugin file with the correct API shape, tool definitions, and hook registration. Use when the user asks to 'create a plugin', 'write a plugin', or 'make a plugin that does X'.

日本語の概要は準備中です。原文の説明を表示しています。

different-ai/openwork2.4万2026年10月11日 更新

different-ai のスキルをすべて見る

このスキルの問題を報告する