adversarial-reviewer
できること
このスキルは、通常の査読では見落としがちな具体的な欠陥を見つけるため、コードの変更を細かく検証します。変更をマージまたは出荷する前に、深いバグ探しをしたい開発者向けです。
使う場面
- ✓変更に対する深いバグ探しや敵対的な査読を明示的に依頼するとき。
- ✓提出前に、自分の変更に隠れた失敗のパターンがないか確認したいとき。
- ✓変更がデータ、エラー、並行性について安全でない前提を持つと疑うとき。
スキルのリンク
https://github.com/emdash-cms/emdash/blob/main/skills/adversarial-reviewer/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
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
- Identify the exact diff, branch, pull request head, or files under review.
- Read the surrounding code needed to understand data flow and invariants.
- Check repository instructions and the tests that define expected behavior.
- 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.
- 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
コメント
- …
このリポジトリの他のスキル
agent-browser
14kエージェントが、実際のブラウザでWebページを検証し、ユーザーに見える内容や操作の結果を確認して、証拠としてスクリーンショットを取れるよう支援します。
building-emdash-site
14kエージェントが、AstroのEmDash CMSプロジェクトのサイト側を構築できるよう支援します。コンテンツ、スキーマ、メニュー、分類、デプロイを扱います。
creating-plugins
14kエージェントが、安全なフック、ルート、ストレージ、管理画面を備えたEmDash CMS用のプラグインを作れるよう支援します。
emdash-cli
14kエージェントが、コマンドラインからEmDashサイトを管理できるよう支援します。コンテンツ、メディア、メニュー、マイグレーション、サイト全体のエクスポートとインポートを含みます。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。