Review AI-generated code
Reviews code written by an AI assistant for hallucinated APIs, over-engineering, swallowed errors, weakened tests and copy-paste drift. Use before merging a change an agent produced.
Code from an AI assistant fails differently from code a colleague wrote. It compiles and reads fluently, so reviewers skim it, but it often calls functions or options that do not exist in the installed library version, adds layers and configuration nobody asked for, catches and discards errors so the happy path "works", edits or deletes tests until they pass, and repeats a pattern across files with small inconsistencies. It also changes files outside the task. This review looks for those failure modes specifically, on top of normal correctness.
Review this change:
Only if [TASK_DESCRIPTION] is given: The assistant was asked to:
Check, in this order:
- Scope. Compare the files and behaviour changed with the task. List changes the task did not call for (renames, reformatting, new dependencies, unrelated refactors, edited config). If no task description was given, say scope could not be checked.
- Hallucinated or misused APIs. For every imported symbol, method, option, flag, environment variable and config key that the diff introduces, check that it exists in the code base or in the dependency version the project pins. If you can read the repository, look in lockfiles, vendored types or the dependency source. If you cannot verify one, list it as "unverified" rather than calling it wrong.
- Tests. Flag deleted or skipped tests, loosened assertions (exact value replaced by "not null", snapshot regenerated wholesale), mocks that replace the unit under test, tests that assert the implementation instead of the behaviour, and special cases in production code that only exist to satisfy a test.
- Error handling. Flag catch-all handlers that log and continue, empty catch blocks, default values that hide failures, retries without limits, and errors converted to success responses.
- Over-engineering. Flag abstractions with one implementation, factories, strategy patterns and options objects for a single call site, speculative configuration, and new dependencies for a few lines of standard library code. Propose the simpler shape.
- Copy-paste drift. Where similar blocks appear more than once, compare them line by line and flag the ones that differ in ways that look accidental (a different field name, a missing await, an off-by-one in one copy).
- Normal correctness and security issues you find along the way: trace the input that triggers each one.
- Every finding cites
path:lineand names the concrete failure or cost. Drop anything you cannot tie to a line. - Do not object to code just because an AI wrote it, and do not comment on formatting or naming unless it causes a defect.
- Report at most 12 findings, ranked by severity: blocker, major, minor.
- Mark each API finding "confirmed missing", "wrong signature" or "unverified", and say how you checked.
- Read the relevant code before making a claim about it. Do not guess what a file, function or config contains.
- If the information you need is not available, say what is missing and how to get it instead of inventing it.
- Separate what you verified from what you inferred. Mark inferences as such.
- When you do not know, say "I don't know" once and state what would settle it.
Verdict
One line: approve | approve-with-changes | request-changes, and the single most important reason.
Findings
A table: severity, path:line, category (scope, api, tests, errors, over-engineering, drift, correctness, security), the problem, the fix.
Scope check
Bullets of out-of-scope changes to revert or split out, or "Within scope" or "Not checked: no task description".
Questions for the author
Up to 5 questions the human who ran the assistant must answer before merge.
1 required value still a placeholder; the assistant will ask for it.
details
- kind
- Prompt: a task you run by name to get one finished thing back
- domain
- Software engineering
- category
- Code review
- level
- Intermediate
- made for
- Software engineer, Tech lead / staff engineer, Open-source maintainer, Engineering manager
- needs
- repo-read
- risk
- read-only
- version
- v1.0.0 · incubating
- reviewed
- 2026-10-03
- works in
- Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md
use in
npx @hermes-hq/hodios install review-ai-generated-code --target claude-codenpx skills add hermes-hq/hodios-dist --skill review-ai-generated-code -a claude-codeclaude plugin marketplace add hermes-hq/hodios-distclaude plugin install hodios-software-engineering@hodiosThe plugin brings every entry in this domain at once.
pairs well with
All of Code reviewCode reviewer
Reviews changes like a senior engineer who blocks only on real defects, backs every finding with a triggering input, and keeps style opinions out. Use as a reviewer persona or subagent.
code-reviewerReview a pull request
Reviews a pull request diff for correctness bugs, risky changes and missing tests, and returns ranked findings. Use before merging a PR, branch or diff.
review-pull-requestReview a coding agent transcript
Reviews a coding agent session transcript for where it went wrong (bad assumptions, skipped verification, scope creep, looping) and turns each failure into an instruction-file or prompt change.
review-agent-transcriptReview test quality
Reviews a test suite or diff for weak assertions, over-mocking, hidden coupling, sleeps, nondeterminism and tests that cannot fail, with a concrete rewrite for each problem. Use when reviewing tests.
review-test-qualityRespond to code review comments
Triages each review comment as fix, discuss or decline with a reason, drafts the replies, and applies the agreed fixes. Use when a pull request comes back with reviewer feedback.
respond-to-review-commentsReview an API change for breaking changes
Reviews an API diff or spec for changes that break existing clients, such as removed fields, changed semantics, new defaults, error changes and versioning gaps. Use before releasing.
review-api-breaking-changes