Agent Skills › deepseek-ai/deepseek-harness › dsh-error-handling

dsh-error-handling

GitHub

规范错误处理设计,定义故障类型、恢复策略及重试机制。指导如何捕获异常、隔离状态、确保事务安全,并生成用户可见且可操作的错误报告,保障系统可靠性与用户体验。

.agents/skills/dsh-error-handling/SKILL.md deepseek-ai/deepseek-harness

Trigger Scenarios

审查代码中的异常处理逻辑 设计后台任务的重试与失败处理流程 优化用户端错误提示信息

Install

npx skills add deepseek-ai/deepseek-harness --skill dsh-error-handling -g -y
More Options

Non-standard path

npx skills add https://github.com/deepseek-ai/deepseek-harness/tree/master/.agents/skills/dsh-error-handling -g -y

Use without installing

npx skills use deepseek-ai/deepseek-harness@dsh-error-handling

指定 Agent (Claude Code)

npx skills add deepseek-ai/deepseek-harness --skill dsh-error-handling -a claude-code -g -y

安装 repo 全部 skill

npx skills add deepseek-ai/deepseek-harness --all -g -y

预览 repo 内 skill

npx skills add deepseek-ai/deepseek-harness --list

SKILL.md

Frontmatter
{
    "name": "dsh-error-handling",
    "description": "Apply error-handling principles when designing or reviewing failures, recovery, retries, background tasks, and user-visible error reports."
}

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.

Catch, recover, or stop

For each failure, define handling and reporting owners, containment, and guarantees in the owning API documentation: valid invariants, absent/partial/committed/unknown effects, and cleanup responsibility. Background work retains these obligations.

Catching limits exception propagation, not mutations. Only the affected state's owner can establish safe continuation. Otherwise stop dependent work, discard invalid state or instances, or escalate. Logging alone is not recovery. Retries require safe repetition, cancellation, and an explicit owner; finite operations need budgets, while continuing supervision needs lifecycle ownership and observable degradation.

Localized, actionable, visible reports

Every final report needs a readable summary, affected operation, and safe next action. Localize through the receiving application's locale mechanism where one exists; other diagnostics use their existing output language. Keep sensitive internal details out of user-facing text.

Untrusted state or unknown outcomes must be visible through UI or default-enabled, accessible logs: report the impact, uncertainty, system disposition, and safe next step. Persistent invalid state needs persistent visibility. Never claim success, rollback, or safe retry without guarantees. Reporting failures need an independent fallback.

Verify resulting state and visible outcomes, not merely that an exception was caught.

Foundations

Meyer's Object-Oriented Software Construction (1997): contracts and invariants; Sutter's Exceptional C++ (1999): exception safety guarantees; Armstrong's thesis (2003): isolation and supervision.

Version History

  • 687f282 Current 2026-10-18 17:46

Same Skill Collection

.agents/skills/agent-experience/SKILL.md
.agents/skills/cordis-styling-nitpicking/SKILL.md
.agents/skills/dsh-archive-agent-notes/SKILL.md
.agents/skills/dsh-ci-test-reliability/SKILL.md
.agents/skills/dsh-client-ui-ux/SKILL.md
.agents/skills/dsh-code-review/SKILL.md
.agents/skills/dsh-create-upgrade-guide/SKILL.md
.agents/skills/dsh-doc-site-sync/SKILL.md
.agents/skills/dsh-doc-standards/SKILL.md
.agents/skills/dsh-find-simplifications/SKILL.md
.agents/skills/dsh-merging-stacked-prs/SKILL.md
.agents/skills/dsh-official-plugin-artwork/SKILL.md
.agents/skills/dsh-pre-push-checks/SKILL.md
.agents/skills/dsh-prose-standard/SKILL.md
.agents/skills/dsh-responsive-ui/SKILL.md
.agents/skills/dsh-speed-up-perf/SKILL.md
.agents/skills/dsh-translate-docs/SKILL.md
.agents/skills/dsh-trim-cot-leakage/SKILL.md
packages/preset/agent-preset/skills/agent-experience/SKILL.md
packages/preset/agent-preset/skills/cordis-composition-reference/SKILL.md
packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md
packages/preset/agent-preset/skills/editing-cordis-compositions/SKILL.md
packages/sandbox/sandbox-windows-acl/assets/diagnose-windows-sandbox-acl/SKILL.md
packages/skill/skill-office/assets/office-docx/SKILL.md
packages/skill/skill-office/assets/office-export-pdf/SKILL.md
packages/skill/skill-office/assets/office-pptx/SKILL.md
packages/skill/skill-office/assets/office-recalculate/SKILL.md
packages/skill/skill-office/assets/office-render/SKILL.md
packages/skill/skill-office/assets/office-xlsx/SKILL.md
packages/skill/skill-office/assets/office/SKILL.md
.agents/skills/dsh-doc/SKILL.md
.agents/skills/record-browser-gif/SKILL.md

Metadata

Files
0
Version
687f282
Hash
fcde7e27
Indexed
2026-10-18 17:46

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-18 20:54
浙ICP备14020137号-1