devils-advocate

devils-advocate is a skill for Claude Code, Codex from sananthanarayan/skilldrop. It costs 130 tokens per session (2,566 once invoked), scanned A, original, MIT.

A review guide that examines completed code from the perspective of a critical senior engineer. It looks beyond the normal successful case for missed edge cases, fragile assumptions, review concerns, and gaps in testing.

In plain words
What is it for?
Use it after generating or completing a feature, before requesting code review or opening a pull request, and when checking whether an implementation is ready to merge.
Why use it?
It helps catch problems that can remain hidden when code only works for expected inputs or when everyone stops reviewing after the feature appears finished.

Skill for Claude CodeCodex

Part of the skilldrop plugin — 51 skills, 4 agents shipped together

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.

agentmods
npx agentmods add skills/sananthanarayan/skilldrop/devils-advocate
Any agent
npx skills add sananthanarayan/skilldrop --skill devils-advocate
Clone the repo
git clone --depth 1 https://github.com/sananthanarayan/skilldrop

Made for: Claude Code, Codex.

Or install skilldrop, the plugin that ships this one along with the rest of its 51 skills, 4 agents.

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 devils-advocate

README.md
[![agentmods](https://agentmods.dev/badge/skills/sananthanarayan/skilldrop/devils-advocate.svg)](https://agentmods.dev/skills/sananthanarayan/skilldrop/devils-advocate)
Your own site
<a href="https://agentmods.dev/skills/sananthanarayan/skilldrop/devils-advocate"><img src="https://agentmods.dev/badge/skills/sananthanarayan/skilldrop/devils-advocate.svg" alt="Measured on agentmods" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,566 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00130 $0.02566
Opus 5 $0.00065 $0.01283
Sonnet 5 $0.00026 $0.00513
Haiku 4.5 $0.00013 $0.00257

Measured 3d ago against content hash e93b30553ff9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

devils-advocate 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 3d 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.

skills/devils-advocate/SKILL.md · 143 lines

How it starts

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

devils-advocate

You play the role of a senior engineer in code review who is trying to find what the implementation missed. Code that "works on the happy path" is the default state of newly-generated code — your job is to challenge it through four lenses and surface what the first pass didn't think about.

This skill is the code counterpart to doc-critique — same adversarial framing, applied to code instead of artifacts.

When this skill runs

The trigger is right after an agent (or human) has declared a feature done. The implementation exists, the happy path likely works, tests may even pass — and that's exactly the moment the skill is most useful, because that's the moment everyone stops looking.

Specifically:

  • ✅ After AI code generation for a feature ("here's the implementation")
  • ✅ Before opening a PR / before requesting human review
  • ✅ Before merging
  • ✅ When the user asks "anything I might have missed?" or "is this ready to ship?"
  • ❌ For a one-line fix or trivial change — overkill
  • ❌ For greenfield exploration / spikes — adversarial review wastes effort on code that will be thrown away
  • ❌ As a substitute for actual code review by a human — this is a pre-pass, not a replacement

How to respond

  1. Identify the change under review. In order of preference:

    • The agent / user has just shown you a diff — review that diff.
    • Git working tree has unstaged changes — git diff is the scope.
    • User points to specific files / a PR / a recent commit — that's the scope.
    • User says "the feature I just built" with no diff — ask which files, or run git diff HEAD~1 if a commit was just made.

    Don't review the whole repo. The scope is the just-generated code. Touched files only.

  2. Classify the code shape. What you challenge depends on what was built. Map to one or more:

    Shape Lens emphasis
    HTTP / RPC endpoint, API handler edge-cases (input validation, auth), adversarial (rate limit, error mapping)
    Async handler / queue consumer edge-cases (retries, idempotency, poison messages), future-proofing (ordering)
    DB migration / schema change future-proofing (rollback, online-safe), adversarial (locking, big-table risk)
    State machine / workflow edge-cases (impossible transitions, concurrent updates)
    Parser / data transformation edge-cases (malformed, encoding, huge inputs)
    CLI tool / script edge-cases (missing flags, env, partial runs)
    UI component edge-cases (loading/empty/error states, a11y)
    Background job / cron edge-cases (overlap, missed runs, partial completion)
    Library / pure function edge-cases (boundary inputs), future-proofing (API stability)
    Config / infra change adversarial (blast radius), future-proofing (drift)

Read the full file on GitHub · 143 lines

Files

What ships with it

9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 143 lines · 130 tokens per session scan A e93b30553ff9

Subscribe to this mod's changes

devils-advocate is a skill published in the GitHub repository sananthanarayan/skilldrop (2 stars, last pushed 20d ago), licensed MIT. It adds 130 tokens to every session and 2,566 once invoked, about $0.0006 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-31.

Related

Other skills, from other repositories

openlore-brainstorm

Transform a feature idea into an annotated story using a Domain Sketch or Constrained Option Tree. Use when asked to brainstorm, explore, or shape a feature before implementation.

clay-good/OpenLore · 40 tokens

openlore-debug

Debug with OpenLore structural context, an explicit root-cause hypothesis, and RED/GREEN verification. Use when a bug, failure, or regression needs diagnosis and repair.

clay-good/OpenLore · 39 tokens

openlore-execute-refactor

Apply a confirmed .openlore/refactor-plan.md with a test gate after each change. Use when asked to execute or continue an OpenLore refactoring plan.

clay-good/OpenLore · 41 tokens

openlore-plan-refactor

Identify a high-priority refactoring target, assess its blast radius, and write .openlore/refactor-plan.md without changing code. Use when asked to plan or prioritize a refactor.

clay-good/OpenLore · 46 tokens

openlore-analyze-codebase

Run a full static OpenLore analysis and summarize architecture, call graph, refactoring issues, and duplicate code. Use when asked to analyze, map, or assess a codebase without LLM inference.

clay-good/OpenLore · 48 tokens

team-repair

Re-index OKF v0.2 index.md/log.md files, derive CDR.md, rebuild .skills.json and AGENTS.md in team-ai-directives, migrate v0.1→v0.2 frontmatter, scan for rule conflicts, and verify directive freshness. Use when indexes are inconsistent, orphans are detected, after bulk changes, or for periodic team AI directives…

tikalk/adlc-team-skills · 84 tokens