跳到正文
Skillpedia
测试14k · #11244

adversarial-reviewer

它能做什么

这项技能对代码变更进行深入剖析,找出普通审查可能遗漏的具体缺陷。适合希望在变更合并或发布之前进行深入缺陷排查的开发者。

适用场景

  • ✓当你明确要求进行深入的缺陷排查或对抗式审查的时候。
  • ✓当你想在提交自己的变更之前,检查其中隐藏的故障模式的时候。
  • ✓当你怀疑某项变更对数据、错误或并发做了不安全的假设的时候。

技能链接

https://github.com/emdash-cms/emdash/blob/main/skills/adversarial-reviewer/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/emdash-cms/emdash/blob/main/skills/adversarial-reviewer/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请对我最新的变更做一次对抗式审查,找出任何真正的缺陷或不安全的假设?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会确定变更的目的,阅读其周围的代码,并把每个假设都当作需要验证的对象。它会寻找边界情况、错误处理漏洞和状态问题,且只报告有证据支持的问题。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Adversarial code review

Look for defects that survive an ordinary review. Treat the implementation's assumptions as claims to verify, while keeping every finding tied to evidence.

Establish the review boundary

  1. Identify the exact diff, branch, pull request head, or files under review.
  2. Read the surrounding code needed to understand data flow and invariants.
  3. Check repository instructions and the tests that define expected behavior.
  4. Compare the change with its stated purpose. Trace the scenario and configuration from the issue, discussion, or accepted design it addresses through the real code, and treat each claim in the description and changeset as something to verify.
  5. Separate defects introduced by the reviewed change from unrelated observations. Report an out-of-scope issue only when it materially affects the change's safety.

Do not modify code, post a review, or expand the review target unless the user asks.

Hunt for failures

Choose the checks that fit the change instead of mechanically applying every category.

  • Logic and boundaries: empty and single-item inputs, pagination edges, invalid state transitions, locale handling, Unicode, maximum values, and repeat invocation.
  • Errors and cleanup: swallowed failures, partial cleanup, misleading status codes, exposed internals, missing timeouts, and unbounded retries.
  • State and concurrency: stale reads, lost updates, time-of-check/time-of-use races, duplicate delivery, non-idempotent retries, leaked listeners, and shared mutable state.
  • Authorization and trust: missing permission checks, confused caller identity, CSRF, unsafe redirects, injection, path traversal, secret exposure, and trust transferred across a boundary without validation.
  • Data integrity: partial writes, migration restart behavior, dialect differences, uniqueness assumptions, destructive cascades, and old/new version compatibility.
  • Resources and performance: unbounded collections, repeated round trips, retained resources, logged-out hot-path regressions, and work that scales with attacker-controlled input.
  • Scope: the same defect left in place elsewhere, such as sibling call sites, other storage backends or render paths, and data already stored in the old shape.
  • Interfaces: exported types, generated schemas, generated types, and documentation that no longer match the new behavior.

Trace concrete inputs and event sequences through the real implementation. Run focused tests or a minimal reproduction when that is the fastest way to establish a claim. Do not infer a bug solely from an unfamiliar pattern.

Findings standard

A finding needs all of the following:

  • the violated behavior or invariant;
  • the exact code location;
  • a concrete trigger or execution path;
  • the observable consequence;
  • a proportionate fix direction.

Use calibrated language. State confirmed defects directly. Label an unresolved concern as uncertain and explain what evidence is missing. Do not turn naming, formatting, optional hardening, or personal design preference into a correctness finding.

Prioritize by impact and likelihood:

  • Critical: exploitable security issue, unrecoverable data loss, or broad production outage.
  • High: likely user-visible wrong behavior, authorization bypass, or recoverable data corruption.
  • Medium: real failure under a plausible edge case, race, or sustained load.
  • Low: limited correctness issue with small impact. Omit purely cosmetic observations.

Report

Lead with findings, ordered by severity. For each finding, include a short title, file and line, the failing scenario, impact, and fix direction. Keep line ranges tight.

If no actionable defects are supported by the evidence, say so. Mention meaningful residual risks or untested boundaries, but do not manufacture findings to make the review appear thorough.

常见问题

它会找哪些类型的问题?

空输入等边界情况、错误处理和清理方面的漏洞,以及状态或时序问题。

它会修改我的代码吗?

不会。它只进行审查并报告,除非你要求,否则不会修改代码或发布审查意见。

它和普通的代码审查有什么不同?

它旨在深入排查那些普通审查中遗漏的缺陷,而不是提供风格方面的反馈。

详情

作者的原始描述

Stress-test a code change for concrete correctness defects, unsafe assumptions, and failure modes. Use when the user explicitly asks for an adversarial review, a deep bug hunt, or to tear a change apart, or to check your own change before submitting it. Do not use for ordinary review, style feedback, or general improvement suggestions.

repo: emdash-cms/emdash

热度

GitHub 星标
14k
排名
#11244
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能