AI change review
Why this skill exists
Code that compiles and passes the requested task is not necessarily secure. AI-generated changes must meet the same security requirements and pass the same assurance activities as code written by a developer. This skill makes that explicit before a human is asked to approve.
This self-review supports human review. It never replaces it.
Rules
- Stay in scope. Change only what the task needs. List every file you touched that was not strictly required and explain why.
- No silent weakening. Do not remove or loosen validation, authentication, authorisation, rate limits, tests, linters or security checks to make something pass. If a check fails, report it.
- No invented APIs. Every function, flag, endpoint and configuration key you use must exist in the version the project actually has. Verify against the installed version or official documentation.
- Tests are evidence, not decoration. Do not write tests that assert nothing, mock the thing under test, or are skipped.
- Say what you did not check. Unknowns are stated, not hidden.
Procedure
Go through the diff and answer each question. "Not applicable" is a valid answer; silence is not.
- Input handling: is every new external input validated, and are queries, commands, paths and templates built without string concatenation of untrusted data?
- Authentication and authorisation: does every new endpoint, job or function enforce who may call it and on what objects?
- Data exposure: can new responses, logs or error messages reveal personal data, secrets or internals?
- Cryptography: are only the project's approved libraries and algorithms used, with no hard-coded keys, IVs or salts?
- Error handling: do failures fail closed?
- Dependencies: any manifest or lockfile change? If yes, apply the
secure-dependenciesskill. - Secrets: apply the
secrets-and-sensitive-dataskill to the diff. - Build, deployment, CI/CD and infrastructure: any change to pipelines, permissions, IAM, network rules, Dockerfiles or agent configuration? These always need human approval.
- Agent behaviour: if the change adds or alters an AI agent, tool or prompt, apply
agent-permissionsanduntrusted-content. - Checks run: run the project's tests, static analysis, dependency scan and secret scan. Record tool, version and result. If a tool is not available, say so.
Stop and ask a human when
- a security check fails and the fix is not obvious
- the change touches authentication, authorisation, cryptography, payment, personal-data processing, CI/CD, infrastructure or agent permissions and the next gated action is outside existing explicit authorisation; drafting within authorised scope may continue, while acceptance/activation still needs the required human decision
- the diff is larger than a reviewer can realistically read, as a rule of thumb more than about 400 changed lines excluding generated files (suggest splitting it)
- a required check is unavailable and a decision is needed before acceptance; record the gap and prepare a draft without claiming approval
Output
Produce a review note for the pull request:
## AI change review
Scope: <what was asked> / <what was changed>
Out-of-scope edits: <list or none>
Security-relevant areas touched: <list or none>
Checks run: <tool: result>, …
Checks not run: <tool: reason>
Open questions for the reviewer: <list>
Human approval required for: <list or "standard review">
Then hand over to the change-evidence skill.
References
- ENISA, Technical Advisory on AI-assisted software development (version 0.4, draft for public consultation, September 2026), sections 3.1, 3.3, 4.3 and 4.4
- OWASP Top 10 for Agentic Applications 2026: ASI09 Human-Agent Trust Exploitation