/aimate:code-reviewfrom aimate
Reusable core for structured code review findings on diffs, commits, patches, or snippets. Framework-agnostic; invoked by other skills, not directly.
Ships in aimate. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Find what stands between a code change and safe, maintainable delivery, and say how to fix it:
Report every finding that meets the finding standard, and nothing that does not.
This skill is read-only and framework-agnostic. It analyzes the supplied code, diff, patch, commit, snippet, or changed files and returns structured findings and report text to the caller. The calling skill owns every provider-specific action; see Guardrails.
The calling skill or user request must provide as much of this context as is available:
submission:
type: pull-request | merge-request | commit | patch | diff | snippet | local-scope
title: optional short title
description: optional intent, linked issues, or acceptance criteria
author: optional author
source_ref: optional branch, commit, file path, or snippet label
target_ref: optional base branch, previous commit, or comparison target
code_input:
diff: optional unified diff or provider diff
files: optional changed file list with added / modified / deleted status and added / deleted line counts when known
snippets: optional code snippets with language and path hints
repository_path: optional local checkout path
review_baseline: optional project conventions already gathered by caller
review_context:
existing_feedback: optional prior comments, review threads, or known unresolved findings
constraints: optional user or repository constraints
focus_areas: optional requested focus such as security, performance, tests, docs
output_target: chat | inline-comments | report | calling-skill
chunk_context: # optional; present only for chunk execution or integration
phase: chunk | integrate
plan: effective chunk_plan for the agreed scope
completed_results: ordered structured results from completed chunks
Minimum viable input:
chunk_context. Full diffs need not be resent; inspect the relevant code when checking cross-file concerns.There are two output modes:
calling-skill or inline-comments; the two behave identically): return the full structure below and show nothing in chat.chat or report; the two behave identically): show report to the user. Ask the user directly when a question or the size check is needed.chunking_required: optional boolean
confirm_scope: optional boolean
counted_lines: optional number
chunk_plan:
- chunk: sequential number
files: ordered list of file paths
counted_lines: number of counted lines in this chunk
clarification_question: optional string
summary:
submission: short description of reviewed input
scope: reviewed files, snippets, or change set
review_complete: boolean
residual_gaps: optional review gaps, missing context, or tests not run
cross_file_context: compact contract facts and unresolved cross-file concerns with source locations
totals:
security-violation: number
request-for-change: number
optional: number
findings:
- id: path/to/file:123:rule-slug
severity: security-violation | request-for-change | optional
category: syntax | logic | security | style | documentation | maintainability | scope-consistency
title: short constructive label
body: 1-2 sentences describing the issue and why it matters
location:
file: path/to/file
line: precise line number or diff coordinate when available
line_type: added | deleted | context | unknown
suggestion: optional code block or concise remediation guidance
report: formatted findings report
comment_bodies: provider-neutral comment text keyed by finding id
Field rules:
chunking_required: true only when the change needs a chunked review and the caller must run it chunk by chunk. counted_lines and chunk_plan are present when it is true and omitted otherwise.confirm_scope: true when the change exceeds 5,000 counted lines; omitted otherwise. The caller decides whether full scope is already authorized; see the size check.clarification_question: present only when the review cannot start without more input; see Asking for missing input.summary.review_complete: true only for a completed normal review or a completed integration of the agreed scope. It is false for preflight, clarification, and per-chunk results, and whenever coverage is incomplete.summary.residual_gaps: see Residual gaps.summary.cross_file_context: required for per-chunk results, as a list that may be empty; omitted otherwise.report: always rendered in the chat format, in both modes.comment_bodies: always present in machine mode, as a map that may be empty; omitted in chat mode.location.line: never invent a precise line number. Use the best available location and state the limitation in residual_gaps.Early return. A preflight response (chunking_required: true) and a clarification response (clarification_question present) are not reviews. Both set review_complete: false, return zero totals, empty findings, and an empty comment_bodies map in machine mode, and use report to explain why the review has not run. A preflight records the counted line total and why chunking was needed in residual_gaps. Callers act on chunk_plan, confirm_scope, and clarification_question, never by parsing residual_gaps or report.
Run Steps 1–6 in order. A chunk or integration pass changes some steps, as described in Large reviews.
submission.type and the available code input.If the input is too ambiguous or incomplete to review safely, ask for the missing scope or code. In chat mode, ask the user and end the response. In machine mode, return an early-return response with the question in clarification_question. The caller asks the user and invokes the core again with the answer.
If some context is missing but a useful review is still possible, continue and record the gap instead of asking. Asking for missing input is allowed at any size; it is separate from the size check.
Use the provided review_baseline when available. Otherwise, inspect the repository or supplied files enough to understand the project conventions relevant to the reviewed code:
When using an exploration subagent, direct it specifically:
"Explore the repository path or supplied files. Focus primarily on the modules and adjacent dependencies affected by the review scope, while briefly checking for global configs such as framework config, README, linting configs, and repository instructions. Report: language, framework, architectural patterns, naming conventions, and test strategy relevant to the changed files."
If the project states no conventions, use common practice for the language as background only, and note the assumption.
code_input.files list when supplied; otherwise list each changed or reviewed file with its change type when known. Every file in the requested scope must be reviewed; never skip a file silently.Check the code in each review area and keep only what meets the finding standard.
Build the canonical findings list using the Output Interface fields. This list is the only source for totals, report text, and comment bodies.
Order findings by severity (security-violation, request-for-change, optional), then file path, line when known, and id.
Check each finding before returning it, and rewrite or drop any that fails:
Then recompute totals and render report and any required comment_bodies from the final findings, never separately. Set summary.review_complete by the field rules, and deliver by output mode.
These rules apply to every review area.
optional finding still needs an identifiable benefit and a proportionate fix.body or suggestion. Include focused verification guidance when needed to evaluate the proposed fix. Keep the reasoning in review feedback; do not require a tutorial or extra source comments to teach the author.security-violation: a reachable or plausibly reachable vulnerability with a concrete attack path, or sensitive-data exposure.request-for-change: a demonstrated correctness failure, unsafe behavior, broken stated or existing contract, or concrete maintenance hazard that materially obstructs safe changes. Name the affected behavior, contract, or change and its consequence; reviewer discomfort alone is not enough.optional: an evidence-backed, non-blocking improvement with an identifiable benefit that a reasonable author could decline.Category does not decide severity: maintainability, style, and documentation findings can require changes when their consequences meet this standard.
summary.residual_gaps holds what the review could not establish: missing context, tests not run, line numbers that could not be derived, and files left unreviewed. For each unverified concern, state what is unverified, the missing evidence, and how to check it.
An unverified security concern is a residual gap, never an optional finding: uncertainty is not a severity.
Always include the residual gaps in report, whether or not there are findings. Keep unverified concerns clearly apart from demonstrated defects, and never imply that a completed review proved the absence of security issues.
Check for parse errors, invalid language constructs, broken imports, type mismatches visible from the code, malformed config, and obvious build-breaking changes.
Check for incorrect conditions, missing error handling, boundary mistakes, invalid state transitions, broken assumptions, concurrency issues, data loss, and unhandled null/empty/error cases.
Assess regression protection for the affected behavior. Check existing tests before reporting a coverage gap, and name the specific changed behavior and failure risk left unprotected. Do not request new tests merely because behavior changed or no test file was added.
Check for injection flaws, exposed credentials, auth bypasses, authorization gaps, unsafe deserialization, path traversal, SSRF, XSS, CSRF, insecure randomness, sensitive logging, privacy risks, and OWASP Top 10 issues where applicable.
Maintainability is readability and the cost of the next change. Judge whether a competent teammate who has never seen this code could read it directly, find the behavior they need to change, change it in one place, and be confident they broke nothing else. Every finding here must trace back to that cost.
Apply the lenses below to what the change actually touches, and skip the rest silently. They show where to look; they are not a checklist or rules to enforce for their own sake.
switch/if chain that enumerates known types?not supported throws, or quietly different semantics?Rules specific to this area:
Check for comments that repeat what the code says, stale documentation or comments that contradict behavior, changed public or operational contracts, missing translations for changed user-visible content, prior feedback that still applies, and mismatch between the submitted changes and stated intent.
Code must be self-explanatory. Aside from tooling or type-checker directives and required public API contract docs, comments are allowed only when the code could reasonably be read differently or when extra context is needed to understand why it behaves as it does (such as an external constraint, non-obvious invariant, or deliberate trade-off that the code itself cannot express). Flag comments in the submitted scope that repeat or narrate what the code already says (they add reading noise and drift as code changes), and flag comments that compensate for hard-to-read code (direct the author to make the code readable through clearer names, focused functions, explicit types, or simpler control flow and remove the comment). Do not flag valid tooling directives, required public contract docs, or untouched comments that were not made stale by the change. Never ask an author to add comments that narrate behavior or excuse unclear code.
Report missing documentation only when you can identify an unmet public or operational contract, an explicit project requirement, or an important constraint that cannot reasonably be expressed in code. Name who relies on it and the concrete consequence of its absence. Keep concise rationale for such constraints when the code alone could be misread without it.
A change above 1,500 counted lines is reviewed in chunks, then finished with one integration pass. Scope has three stages: the requested scope, the agreed scope after any narrowing (the effective plan), and the reviewed scope, meaning the code actually covered.
Size the review by changed lines, not by file count. Review quality drops with the amount of changed code held at once; many files with small edits are an easy review, and splitting them apart hides cross-file bugs.
Count added plus deleted lines per file from the diff, or take them from code_input.files when the caller supplies them. With no diff, such as a folder or full-file review, count every line of the reviewed files. Leave lock files, generated files, vendored dependencies, minified bundles, and snapshot files out of the count; they are still reviewed.
In chat mode, follow the chunked review protocol yourself. In machine mode, do not ask about size or review any chunk: return the preflight response defined under Early return, and let the calling skill run the protocol.
The only size question is a single one, asked before the first chunk and only above 5,000 counted lines: narrow the scope, or review every chunk. Skip it when the caller or user has explicitly authorized the full scope; a generic request to review the change does not count.
Use this shared protocol for every chunked review. Calling skills own execution, not analysis or aggregation.
confirm_scope is true and the full scope is not explicitly authorized, present the preflight warning and plan, ask once whether to narrow the scope or review every chunk, and end the response. Otherwise start immediately. If the user narrows the scope, keep an effective plan for the selected files and record the excluded files as unreviewed.chunk_context with phase: chunk, the effective plan, and prior completed results. Retain each result, including its reviewed scope and summary.cross_file_context.phase: integrate, the effective plan, all completed results, and the original file inventory and repository context. This is not another full review.summary.review_complete: true as the final result. Do not concatenate rendered reports or sum pre-integration totals. If a selected chunk fails, retain the completed results for resumption; do not integrate or publish the successful subset. Resume the missing work, or report the reviewed scope and gaps as incomplete. Do not publish findings, approve, request changes, or pass a self-review gate before integration finishes.When chunk_context.phase is chunk, or the caller has otherwise already established chunking, run Steps 1–6 with these changes:
summary.cross_file_context, or an empty list when there are none.summary.review_complete stays false.When chunk_context.phase is integrate, run Steps 1–6 with these changes:
review_complete: false, the reviewed scope, and the missing work in residual_gaps. Leave findings and comment bodies empty rather than publishing unreconciled candidates, and say in report that the review is incomplete, not clean.Derive report and comment_bodies from the same canonical findings. Keep the evidence, consequence, classification, and remediation the same in both.
Render each finding in report in this chat format:
**Finding #N — <id> <severity>**
**<title>**
<body>
*Relevant lines: <file path and line reference>*
Suggested approach: <suggestion or concise remediation guidance>
After the findings, include the residual gaps. If there are no findings, say so explicitly, without hiding the gaps.
Each comment_bodies entry is the same rendered finding without the Finding #N — <id> <severity> prefix. Do not add a separate severity line or label; classification stays in the structured finding.
Style rules:
Observation: or Impact:.To change this skill's rules, see evals/README.md.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dawn-technology/aicelerate --plugin aimate22 skills in this plugin
/asvs-auditStatic OWASP ASVS 5.0 Level 1 security audit of a codebase. Checks all 70 Level 1 requirements plus other security issues found on the way, verifies every finding against the code to remove false positives, runs the package manager's dependency audit, and writes a report to docs/. Use this when asked for a security audit, ASVS audit, security compliance review, or a code-level vulnerability scan. It reads code only; it is not a live penetration test./configure-mcpValidate and configure project- or client-specific GitHub, GitLab, Jira/Confluence, Figma, Sentry, and Playwright tooling through a short interactive wizard, choosing CLI or MCP where both support the capability. Use when a user asks to install, set up, configure, repair, change, or onboard Aimate integrations or save project tool routing./Other plugins' skills for the same job