← Back to LÖVE · project planning pack
See how it helps
Contextual code review
Follows a gameplay change through validation, transformations and storage to find introduced regressions. Checks existing defenses before reporting a missing guard or treating an old issue as new.
contextual-code-review
Agents using this skill
When is it useful?
Use when a small diff affects shared contracts, state transitions or high-risk data.
What does it help you do?
- Checks existing upstream validation before reporting a supposedly missing guard.
- Follows input through domain rules, persistence and serialization.
- Focuses findings on introduced or worsened defects with concrete consequences.
Try asking this
Review a change that allows buying several upgrade levels at once. Follow quantity validation, price calculation and the balance update through all callers. Check whether an upstream limit already blocks negative quantities, then report only newly introduced failures with an input that reaches the affected code.
Detailed documentation
Read the skill’s original instructions, examples and checks in their authored language.
Show less
Contextual Code Review
Reading only the green and red lines of a diff misses the most dangerous bugs. A change is safe only in the context of its callers, dependencies, data contracts, and runtime environment (Michael Feathers & Michael Fagan).
Thinking Sequence for Every Review
- What must this change achieve?
- What is the accepted scope and expected behavior?
- Where does the code implement it?
- What happens on the main path, error paths, and boundary cases?
- What does it alter in existing system behavior?
- Which claims are backed by real checks?
- Is there a concrete, actionable defect that requires a fix?
Workflow
- Expand context beyond the modified lines:
- Inspect all callers of any modified function, hook, component, or endpoint to verify their assumptions about arguments, return values, nullability, and thrown errors still hold.
- Inspect all callees and existing guards (upstream middleware, schema validators, database constraints, transactions) before claiming a check is missing.
- Trace control flow and data transformations end to end:
- Follow data from entry point (HTTP request, CLI arg, UI event, queue payload) through validation, domain logic, persistence, and response serialization.
- Check for off-by-one errors, inverted boolean conditions, unhandled
null/undefined, mutated shared references, unawaited promises, and resource leaks.
- Separate new regressions from pre-existing technical debt:
- Introduced or worsened by this change: In scope for blocking or targeted review findings.
- Pre-existing issue in untouched code: Only flag if the current change directly triggers or amplifies it, and explicitly label it as pre-existing rather than blaming the diff.
- Calibrate review depth to risk:
- Spend deep analytical effort on state transitions, permissions, financial/usage math, migrations, and public contracts; never pad a review with subjective naming or formatting nitpicks.
Included files 1
SKILL.md
