agentleFS
maee-comaee-co/cc-autoship/skills/devils-advocate/SKILL.md

devils-advocate

Skill0 starsChanged 5 months agoMITView on GitHub

Review code, designs, and plans as a devil's advocate. Use when you want to deliberately surface blind spots, edge cases, counter-arguments, and shaky assumptions before committing to a design decision, a new feature, or an architecture choice.

30 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use validate-bib, review-r and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • luischanciSkill

    validate-bib

    Validate bibliography entries against citations in all manuscript files. Find missing entries and unused references.

    Also in 4 projects that use this

  • luischanciSkill

    review-r

    Run the R code review protocol on R scripts. Checks code quality, reproducibility, domain correctness, and professional standards. Produces a report without editing files.

    Also in 3 projects that use this

  • shanggqmSkill

    data-analysis

    数据分析技能,提供结构化的数据查询、统计分析和报告生成工作流。当用户需要查询数据库、进行数据统计分析、生成分析报告时使用。按规范输出原始数据、计算结果、Markdown报告和HTML可视化报告。

    Also in 3 projects that use this

  • VercelSkill

    deploy

    Deploy applications to Vercel. Use when the user says "deploy", "deploy to Vercel", "push to production", "deploy my app", or "go live".

    Also in 3 projects that use this

  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 4 projects that use this

  • genomewalkerSkill

    learn

    Learn from web sources, generate SKILL.md, and store key patterns in soul memory. Trigger keywords: learn, skill-gen, web-learn, documentation, tutorial.

    Also in 3 projects that use this

  • +5 more from luischanci

The file

Files
SKILL.md

/devils-advocate

Act as the devil's advocate (the critical reviewer) and point out the risks, edge cases, and pitfalls hiding inside an optimistic proposal. Take an implementation everyone considers finished and go looking for what is wrong with it.

Review angles

1. Edge cases

  • Are boundary-value tests missing?
  • Is null/undefined handled properly?
  • Are empty arrays and empty strings handled?
  • Are timeouts and network errors accounted for?
  • Is there a possible race condition?

2. Performance

  • Do unnecessary re-renders occur?
  • Has this become an N+1 query?
  • Is there a possible memory leak?
  • Was the impact on bundle size considered?
  • Is there a risk of an infinite loop or runaway recursion?

3. Security

  • Are injection attacks (SQL, XSS, command) defended against?
  • Are the authentication and authorization checks correct?
  • Is personal information encrypted or masked?
  • Is the CORS configuration correct?
  • Are API keys and secrets kept out of the source?

4. Maintainability

  • Will the design survive future changes?
  • Is the code too complex (cognitive load)?
  • Is the structure easy to write tests against?
  • Are the error messages understandable?
  • Is the documentation insufficient?

5. Over-engineering

  • Are there abstractions nobody uses?
  • Are there unnecessary features added "for the future"?
  • Does this violate YAGNI (You Aren't Gonna Need It)?
  • Has code that could be simple been made complex?

Review flow

  1. Read the target code or design document — take in what is being proposed
  2. Check it critically — go through the review angles above and surface the problems
  3. Feed the findings back — state the problem, the reason, and a proposed improvement
  4. Assess the risk:
    • Critical: leads to a production incident
    • Major: affects performance or security
    • Minor: a maintainability or readability problem

Example output

Output language: write the findings in the language of the session (the same language you are answering the user in). The sample below is English and is not a set of strings to copy verbatim. docs/rules/output-language.md is the SSoT for the fixed label translations and the language-invariant tokens. Fixed regardless of language (never translate): the severity values Critical / Major / Minor (callers branch on these values).

## Critical Issues

1. **The authentication check is too weak**
   - The `/api/admin` endpoint only checks `user.role === "admin"`
   - There is no JWT verification and no signature check, so anyone can become an admin

2. **N+1 query**
   - `users.map(async user => await getProfile(user.id))` fires a DB query per user
   - 1000 users means 1000 queries

## Major Issues

3. **Insufficient error handling**
   - The `try-catch` swallows the exception and only calls `console.log`
   - The user is never notified, and the log is hard to read

## Minor Issues

4. **Excessive abstraction**
   - A function used only twice has been extracted into `utils/`
   - A YAGNI violation

Related documents

  • ${CLAUDE_PLUGIN_ROOT}/rules/code-review.md: the tech-lead review checklist
  • The project's own coding standards and privacy policy, if it has them

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.