- Home
- Skills
- Code Quality & Review
- adversarial code review
adversarial code review
by Holistis
Reviews code through four adversarial passes before it ships: does it work, would a critical maintainer reject it, does weird input break it, does it expose anything it should not.
$9
adversarial code review
Example session with this skill installed
Review this PR for a new password reset endpoint. It takes an email, generates a token, and sends it via an external provider. I've updated the User model and added the controller.
- Read your context and instructions
- Compiled the adversarial code review
I have audited the password reset implementation across four adversarial passes.
Adversarial Review Report
| Pass | Result | Findings |
|---|---|---|
| 1. Verifier | PASS | Happy path verified: User.find_by(email:) correctly triggers the TokenService. Manual trace confirms the token is stored in the reset_tokens table before the mailer is invoked. |
| 2. Skeptic | FAIL | Blocking: The diff includes an unrelated change to the User#login method (extra logging) which is scope creep. Blocking: No unit tests were added for the TokenService expiration logic. |
| 3. Edge-case | PASS | Handled empty email string (returns 200 to prevent enumeration). Traced rapid repeat requests; the existing before_action handles basic record locking. |
| 4. Safety Gate | FAIL | Auth: Pass. Data: Pass (parameterized query). Exposure: FAIL. The API response returns the full User object on success, exposing the password_digest hash. Rate: FAIL. No rate limiting on the external mailer call; vulnerable to cost-exhaustion. |
Detailed Blocking Issues
- Information Leak: The
PasswordResetsController#createreturnsrender json: @user, which includes sensitive fields. It must be scoped toemailonly. - Resource Exhaustion: There is no cooldown between reset requests. An attacker could trigger thousands of emails to a single address, incurring costs and potential IP blacklisting.
- Scope Creep: Revert changes to
app/models/user.rb:42regarding login logging; it belongs in a separate PR.
DO NOT SHIP YET
Next steps
- Update the controller to return a generic success message instead of the User object.
- Implement a 60-second cooldown per email/IP in the
PasswordResetsController. - Add tests covering token expiration and malformed email inputs.
Connects securely to your tools. The creator never sees your data.
About this skill
Standard code reviews often default to passive approval or nitpicking style instead of catching critical logic failures. This skill runs four separate adversarial passes before anything ships: a Verifier that traces the actual logic instead of trusting the diff, a Skeptic that plays a maintainer actively looking for a reason to reject it, an Edge-case user that tries empty input, corrupted data, and double-submissions, and a Safety gate that checks auth, data handling, information exposure, and rate limits. Each pass reports separately and ends in one clear verdict: ship it, ship with notes, or do not ship yet.
Requires surrounding code context for logic tracing. Not suitable for non-code files or pure CSS/formatting reviews.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 month ago
Permissions
No special permissions declared or detected
What's inside
Frequently Asked Questions
New in Code Quality & Review
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.