adversarial-reviewer
Skill này làm gì
Skill mổ xẻ một thay đổi code để tìm các lỗi cụ thể mà một đánh giá thông thường có thể bỏ sót. Skill dành cho lập trình viên muốn một đợt săn lỗi sâu trước khi thay đổi được hợp nhất hoặc phát hành.
Khi nào nên dùng
- ✓Khi bạn yêu cầu rõ ràng một đợt săn lỗi sâu hoặc một đánh giá đối kháng cho một thay đổi.
- ✓Khi bạn muốn kiểm tra thay đổi của chính mình về các kiểu lỗi ẩn trước khi gửi đi.
- ✓Khi bạn nghi ngờ một thay đổi có giả định không an toàn về dữ liệu, lỗi hoặc đồng thời.
Liên kết skill
https://github.com/emdash-cms/emdash/blob/main/skills/adversarial-reviewer/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể thực hiện một đánh giá đối kháng cho thay đổi mới nhất của tôi và tìm bất kỳ lỗi thật hoặc giả định không an toàn nào không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent xác định mục đích của thay đổi, đọc code xung quanh nó, và coi mỗi giả định là điều cần xác minh. Nó tìm các trường hợp biên, lỗ hổng xử lý lỗi và các vấn đề trạng thái, rồi chỉ báo cáo những vấn đề có bằng chứng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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.
Câu hỏi thường gặp
Nó tìm những loại vấn đề nào?
Các trường hợp biên như đầu vào rỗng, lỗ hổng xử lý lỗi và dọn dẹp, cùng các vấn đề về trạng thái hoặc thời gian.
Nó có sửa code của tôi không?
Không. Nó chỉ rà soát và báo cáo, không sửa code hay đăng nhận xét trừ khi được yêu cầu.
Nó khác gì với một đánh giá code thông thường?
Nó dành cho việc săn sâu hơn các lỗi vượt qua đánh giá thông thường, chứ không phải nhận xét về phong cách.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 14k
- Vị trí xếp hạng
- #11244
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-browser
14kCho phép agent của bạn kiểm thử trang web trong trình duyệt thật, kiểm tra người dùng thấy gì, xác minh hành động và chụp ảnh màn hình làm bằng chứng.
building-emdash-site
14kGiúp agent của bạn xây dựng phần website của một dự án EmDash CMS trên Astro, gồm nội dung, schema, menu, taxonomy và triển khai.
creating-plugins
14kGiúp agent của bạn tạo plugin cho hệ thống CMS EmDash, với hook, route, lưu trữ và giao diện quản trị an toàn.
emdash-cli
14kCho phép agent của bạn quản lý trang EmDash từ dòng lệnh, gồm nội dung, media, menu, migration và xuất hoặc nhập toàn bộ trang.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.