failure-path-review

failure-path-review is a skill for Claude Code from zuoyebang/aiweave. It costs 64 tokens per session (1,592 once invoked), scanned A, original, Apache-2.0.

A review tool for checking how a service method handles failures. It compares the method's error branches with documented failure paths and their tests.

In plain words
What is it for?
Use it to audit changed service code, an entire module, or one method for documented and tested failure coverage. It reports findings but does not generate code.
Why use it?
It helps reveal failures that are neither described in the design documents nor tested. This makes it easier to find missing handling for database, Redis, message-queue, or downstream-service errors.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it to audit changed service code, an entire module, or one method for documented and tested failure coverage. It reports findings but does not generate code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zuoyebang/aiweave/failure-path-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add zuoyebang/aiweave --skill failure-path-review
Clone the repo
git clone --depth 1 https://github.com/zuoyebang/aiweave

Made for: Claude Code.

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 failure-path-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/zuoyebang/aiweave/failure-path-review/github.svg)](https://agentmods.dev/skills/zuoyebang/aiweave/failure-path-review)
Your own site
<a href="https://agentmods.dev/skills/zuoyebang/aiweave/failure-path-review"><img src="https://agentmods.dev/badge/skills/zuoyebang/aiweave/failure-path-review/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 failure-path-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/zuoyebang/aiweave/failure-path-review"><img src="https://agentmods.dev/badge/skills/zuoyebang/aiweave/failure-path-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,592 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.00064 $0.01592
Opus 5 $0.00032 $0.00796
Sonnet 5 $0.00013 $0.00318
Haiku 4.5 $0.00006 $0.00159

Measured 9d ago against content hash 6158b11ccd1a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

failure-path-review 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 9d 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.

templates/skills/failure-path-review/SKILL.md · 128 lines

How it starts

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

审计 service 方法失败路径覆盖完整性。范围:$ARGUMENTS

公共步骤模板见 skills-spec/01_skill_authoring_guide.md §A-§E。本 Skill 不生成代码。

第 0 步:🚫 模块 + 启用状态检查

  1. BUILD_STATUS.md §0 —— 命中 🚫 模块跳过
  2. INDEX.md §0 —— 如 docs-spec/21 未启用 → 跳过本 Skill

第 1 步:读约束源

按顺序读:

  1. docs/service/transaction_design.md §6 —— 失败路径全景图(ASCII 图 + 分支清单)
  2. docs/architecture/cross_service_contract.md §4 —— 故障传播矩阵
  3. docs/service/{module}_service.md §4.N.7 —— 单方法的边界情况
  4. docs/testing/testing_design.md §4.7 / §5.5 —— 故障注入 framework API + 高级用例 3 类
  5. docs/architecture/ai_dev_guide.md §8.2 / §8.9 —— 事务一致性 / 跨服务合约约束总清单

第 2 步:扫描代码范围

$ARGUMENTS 确定扫描范围:

  • 空:git diff main..HEAD --name-only 取新增/修改的 service / controller 文件
  • {module}service/{module}/**/*.go
  • {module}/{Method}:聚焦该方法

第 3 步:5 项审计

审计 1:失败分支提取

对每个被扫描方法,静态分析提取所有"失败返回点":
  - 所有 `return ..., err` 或 `return ..., Error{...}` 语句
  - 所有 panic / log.Fatal(应该 = 0)
  - 所有调用下游 / DB / Redis / MQ 的错误处理路径

每个失败分支命名为 F-N(按代码出现顺序)

审计 2:失败路径文档覆盖

对每个 F-N:
  1. 查 transaction_design.md §6 失败路径全景图 是否包含该分支
  2. 如涉及下游故障 → 查 cross_service_contract.md §4 故障传播矩阵
  3. 文档未覆盖 → 标 🔴 严重(结构性问题:失败路径无据可查)

审计 3:失败分支测试覆盖

对每个 F-N:
  1. 在 test/cases/{audience}/{module}_*_test.go 中搜索是否有触发该分支的测试用例
  2. 缺失 → 标 🔴 严重(按 PRINCIPLES §8 测试是验收唯一标准)
  3. 有 stub 但断言不完整(如只断言 err != nil 而无 errNo / 副作用)→ 标 🟡 待复核

审计 4:故障注入测试覆盖

对涉及下游调用的 F-N:
  1. 测试用例是否使用 framework.InjectRedisFailure / InjectMysqlFailure / 
     InjectKafkaFailure / ForceCircuitOpen 等 §4.7 故障注入 API
  2. 仅靠"巧合性测试"(如下游真的失败时)覆盖 → 标 🟡 待复核(不稳定)

审计 5:HOT-PATH 失败路径优先级

对带 [HOT-PATH] 标记的方法的 F-N:
  1. 失败路径必须无锁内 IO、无大对象分配(错误对象 < 1kB)
  2. 错误日志必须有限频 / 采样
  3. 违反 → 标 🟡 待复核(与 performance-review R-PERF-* 协作判断)

第 4 步:输出格式

按严重程度分组:

🔴 严重 — 失败分支未覆盖
  - [F-3 doc] {Module}.{Method}: line {N}  → return ErrorXyz
            transaction_design.md §6 未列出该分支,建议补 §6
  - [F-5 test] {Module}.{Method}: line {N}  → MySQL INSERT failed
            test/cases/{audience}/{module}_*_test.go 无对应用例

🟡 待复核 — 测试断言不完整 / 故障注入缺失
  - [F-2 weak] {Method}: 测试仅断言 err != nil,未断言 errNo
  - [F-7 unstable] {Method}: 测试依赖下游真的失败,未用 framework.InjectXxxFailure

🟢 通过 — 全部分支文档 + 测试覆盖完整

📊 统计
  - 扫描方法数:N
  - 失败分支数:M(按方法分布)
  - 文档覆盖率:{N}/{M} = {P}%
  - 测试覆盖率:{N}/{M} = {P}%
  - 故障注入使用率:{N}/{M} = {P}%

Read the full file on GitHub · 128 lines

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. 9d ago First seen · 128 lines · 64 tokens per session scan A 6158b11ccd1a

Subscribe to this mod's changes

failure-path-review is a skill published in the GitHub repository zuoyebang/aiweave (20 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 64 tokens to every session and 1,592 once invoked, about $0.0003 per session on Opus 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-08-30.

Related

Other skills, from other repositories

verify-against-rubric

Spawn a stateless sub-agent (Claude Code Task tool, Cursor agent mode, or equivalent) with ONLY the artifact path plus the locked rubric plus read-only tools. Sub-agent returns a structured verdict (satisfied, needsrevision, or failed) plus per-criterion feedback. Distinct from self-critique-and-revise (same-context…

Mozurok/fhorja.dev · 188 tokens

gentle-ai-bench

Trigger: bench, journey, journeys, driven mode, gentle-ai-bench, journey corpus, j-numbers, bench axis. Author and verify gentle-ai bench journeys; go test ./bench never proves driven execution.

Gentleman-Programming/gentle-ai · 49 tokens

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

gentle-ai

Use Gentle AI harness discipline for Pi work: clarify first, preserve OpenSpec artifacts, use strict TDD where available, delegate through subagents when useful, and protect review workload.

Gentleman-Programming/gentle-pi · 40 tokens

include-test-files-that-assert-on-behavior-being-changed-in-decl

When delegating a task affected by this skill, include.

ZaxbyHub/opencode-swarm · 29 tokens

witness

Independently witness that an Allium loop's convergence claim is true and was reached honestly. Use when the user wants to verify a loop's self-report, confirm tests really pass and no generated test was weakened, produce a convergence certificate or witness record, gate CI on a trustworthy signal, or check that an…

juxt/allium · 75 tokens