DeepSeek Harness is an open-source framework for building and running AI agents, organized so that its functionality is provided through plugins. Developers use it to launch agent workflows through a local web interface or from source, while the catalogue add-ons extend the harness as plugins.
Borrowing it
Nothing to install: this file belongs to deepseek-ai/deepseek-harness. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/deepseek-ai/deepseek-harness/master/.agents/skills/dsh-error-handling/SKILL.mdgit clone --depth 1 https://github.com/deepseek-ai/deepseek-harnessWrote 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.
[](https://agentmods.dev/skills/deepseek-ai/deepseek-harness/dsh-error-handling)<a href="https://agentmods.dev/skills/deepseek-ai/deepseek-harness/dsh-error-handling"><img src="https://agentmods.dev/badge/skills/deepseek-ai/deepseek-harness/dsh-error-handling/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.
<a href="https://agentmods.dev/skills/deepseek-ai/deepseek-harness/dsh-error-handling"><img src="https://agentmods.dev/badge/skills/deepseek-ai/deepseek-harness/dsh-error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.01976 |
| Opus 5.5 | $0.00015 | $0.00790 |
| Sonnet 5.5 | $0.00008 | $0.00395 |
| Haiku 4.5 | $0.00004 | $0.00198 |
Grade A, and why
dsh-error-handling 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 16d ago.
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- alego-error-handling — 98% identical, 65 lines differ
How it starts
The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
DeepSeek Harness Error Handling
Define failures, their owners, and what remains safe after failure.
Typed, structured failures
Expected failures need declared types, stable discriminants, and handling-relevant details. Reuse package error conventions, preserve causes, and separate machine identity from display text. Never route handling by parsing messages. Unexpected defects such as assertNever may remain plain Error; containment must never turn them into success.
An error class that carries a machine code extends HarnessError from dsh-error (also re-exported by dsh-llm), directly or through its package's error class, never bare Error. Prefer one error class per owning package or domain over a class per failure; a separate class is justified when callers catch it by type or it carries its own structured fields, such as ToolArgsError.violations. name is the class name, except for cancellation (below), and code values are stable UPPER_SNAKE_CASE strings, usually prefixed by the domain and declared as a union or constants beside the class. A code names the failure class its consumers act on, not the call site; add a code rather than reuse one whose meaning differs. The error class and code guide defines class choice, naming, the standard conditions, declaration, foreign-error conversion, and compatibility.
Convert foreign failures where the dependency is owned. Node errno, SDK, protocol, native, worker, and cross-realm errors become the owning package's error with the original as cause; a foreign numeric or vendor code belongs in the message, not in code. Preserve structure across layers: never re-wrap a HarnessError in a plain Error, store only its message for a later rethrow, or drop its name and code while redacting text. A process or worker boundary transports name and code and reconstructs the error.
Tool failures
The tool registry keeps error.name and error.code on tool/result when the producer supplies them: a HarnessError thrown by the tool body, a pre-execute deny, guard denial, or post-execute block with info (including the registry's approval denials, ApprovalError with APPROVAL_REJECTED, APPROVAL_CANCELLED, or APPROVAL_UNAVAILABLE), the registry's own cancellation result (AbortError with ABORTED or ABORTED_BEFORE_DISPATCH, also applied to a signal reason or an Error named AbortError that the body or a tools/execute wrapper throws after cancellation), or a tools/execute wrapper result such as the timeout policy's TOOL_TIMEOUT. Any other thrown value, and a guard denial or block without info, persist only text that retry policy, UI, and analytics cannot route on. Every expected failure reachable from a tool body therefore throws a HarnessError, normally the owning domain's subclass:
What ships with it
1 file 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.
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.
- 16d ago Changed · +42 lines 0663f5d34580
- 18d ago Changed · +17 lines · +8 tokens per session f48da246d885
- 1mo ago First seen · 31 lines · 30 tokens per session scan A fcde7e278056
dsh-error-handling is a skill published in the GitHub repository deepseek-ai/deepseek-harness (288,790 stars, last pushed 2d ago), licensed MIT. It adds 38 tokens to every session and 1,976 once invoked, about $0.0002 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-10-10.
dsh-error-handling compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dsh-error-handlingdeepseek-ai/deepseek-harness | Skill | 289k | 2d ago | MIT | A | 38 | Claude Code, Codex |
| diagnosing-bugsgongyijie85/mattpocock-skills-dsh | Skill | 33 | 12d ago | MIT | A | 40 | Claude Code, Codex |
| doctoromagents/omagents | Skill | 361 | 2d ago | MIT | A | 56 | Codex |
| refactoromagents/omagents | Skill | 361 | 2d ago | MIT | A | 55 | Codex |
| ast-grepomagents/omagents | Skill | 361 | 2d ago | MIT | A | 55 | Codex |
| remove-ai-slopsomagents/omagents | Skill | 361 | 2d ago | MIT | A | 53 | Codex |
| remove-deadcodeomagents/omagents | Skill | 361 | 2d ago | MIT | A | 55 | Codex |