fake-model-faults

fake-model-faults is a skill for OpenCode from zj-unicom-ai/UniEmployee. It costs 69 tokens per session (679 once invoked), scanned A, original, MIT.

A local test setup that makes a model provider return selected failures, such as refused connections, missing hosts, rate limits, server errors, authentication errors, or interrupted streams. A model provider is the service that supplies an AI model to the desktop app.

In plain words
What is it for?
It is for testing how the desktop app handles model connection and response failures.
Why use it?
Real service outages are difficult and unsafe to reproduce on demand. This lets developers check error messages, retry behaviour, and failure states without waiting for a real outage.

Skill for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: mentions OpenCode.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is CDP_URL=http://127.0.0.1:<cdp> node .opencode/skills/drive-desktop-cdp/scripts/cdp.mjs refresh-providers # expect 200.

Good fit It is for testing how the desktop app handles model connection and response failures.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/zj-unicom-ai/UniEmployee
agentmods
npx agentmods add skills/zj-unicom-ai/uniemployee/fake-model-faults

Made for: OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fake-model-faults

README.md
[![agentmods](https://agentmods.dev/badge/skills/zj-unicom-ai/uniemployee/fake-model-faults/github.svg)](https://agentmods.dev/skills/zj-unicom-ai/uniemployee/fake-model-faults)
Your own site
<a href="https://agentmods.dev/skills/zj-unicom-ai/uniemployee/fake-model-faults"><img src="https://agentmods.dev/badge/skills/zj-unicom-ai/uniemployee/fake-model-faults/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fake-model-faults

Your own site · 80×15
<a href="https://agentmods.dev/skills/zj-unicom-ai/uniemployee/fake-model-faults"><img src="https://agentmods.dev/badge/skills/zj-unicom-ai/uniemployee/fake-model-faults.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 679 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.00679
Opus 5.5 $0.00028 $0.00272
Sonnet 5.5 $0.00014 $0.00136
Haiku 4.5 $0.00007 $0.00068

Measured today against content hash 37c5c5d58605, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fake-model-faults scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/fault-providers.py, scripts/fault-server.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

desktop-workspace/.opencode/skills/fake-model-faults/SKILL.md · 42 lines

How it starts

The opening of the file, as written. The whole thing — 42 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 · model Engine error you get
Fault Refused · refused ConnectionRefused: Unable to connect… (closed port), with retries
Fault DNS · enotfound getaddrinfo ENOTFOUND … (a .invalid host), with retries
Fault Lab · reset ECONNRESET: The socket connection was closed unexpectedly…, with retries
Fault Lab · mid-stream-reset partial reply, then the socket closes
Fault Lab · stall the request never answers
Fault Lab · http-429 / http-500 / http-503 / http-401 / http-402 that HTTP status with a JSON error body
Fault Lab · ok a 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

Read the full file on GitHub · 42 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 42 lines · 69 tokens per session scan A 37c5c5d58605

Subscribe to this mod's changes

fake-model-faults is a skill published in the GitHub repository zj-unicom-ai/UniEmployee (920 stars, last pushed yesterday), licensed MIT. It adds 69 tokens to every session and 679 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-12-04.

Related

fake-model-faults compared with skills from other repositories

fake-model-faults next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fake-model-faultszj-unicom-ai/UniEmployeeSkill920yesterdayMITA69OpenCode
iterate-implementationhumanlayer/humanlayerSkill13kyesterdayApache-2.0A16Claude Code, Codex
potpie-clipotpie-ai/potpieSkill5.8ktodayApache-2.0A60Codex
potpie-debug-memorypotpie-ai/potpieSkill5.8ktodayApache-2.0A41Claude Code, Codex
ascend-moe-optimizer-trace-analyzerXiaoLuoLYG/GODSkill1.3k9d agoApache-2.0A115Claude Code, Codex
harmonyos-dev-suiteXiaoLuoLYG/GODSkill1.3k9d agoApache-2.0A115Codex
ascend-moe-optimizer-auto-traceXiaoLuoLYG/GODSkill1.3k9d agoApache-2.0A170Claude Code, Codex