Basic code review

From duranserkan/DRN-Project · View interactive version

Basic code review is an AI agent skill from the GitHub repository duranserkan/DRN-Project. Use when reviewing code changes, pull requests, staged diffs, or self-reviewing work for security, correctness, clarity, simplicity, performance, breaking changes, and missing verification.

How to use this skill

Skill file

Code Review Standards

Portable review criteria. Load .agent/repository-profile.md first when present, then apply any local framework rules as an overlay.

Scrutiny Mandate

Review diffs, commits, PRs, and agent output critically. Support claims with repository evidence, static checks, or authorized execution. Do not claim verification without evidence or bypass execution gates.

Repository Context Gate

  1. Read AGENTS.md and .agent/repository-profile.md when present.
  2. Load only relevant scoped skills, such as framework, frontend, testing, or security skills.
  3. Verify source-of-truth files instead of assuming conventions from examples.
  4. Treat generic checklist items as prompts, not proof that a repository uses a specific framework.

Priority Stack Review Gate

Resolve contradictions with TRIZ first. Then evaluate every change in order:

| Priority | Gate | Key Question |

|:--------:|------|--------------|

| 1 | Security | Does this introduce vulnerabilities or weaken safeguards? |

| 2 | Correctness | Does it do what it claims under realistic conditions? |

| 3 | Clarity | Can someone else understand it in 6 months? |

| 4 | Simplicity | Is complexity earned, or accidental? |

| 5 | Performance | Is optimization justified by measurements or clear source evidence? |

Architecture Checks

Diagnostic Suppressions

Prefer suppression attributes when supported. In C#, apply [SuppressMessage] to the narrowest applicable member with the exact rule ID and a concrete Justification. Use the containing method for local-variable diagnostics. Avoid test-class suppressions when a property, fixture type, or method can own them. Use #pragma warning disable only when attributes cannot suppress the diagnostic at the required location. Explain why and restore it immediately afterward. Preserve instance getters used by reflection and interface dispatch coverage.

UI Accessibility

Dependency Injection And Configuration

Test Coverage Expectations

| Change Type | Expected Signal |

|-------------|-----------------|

| Security or authorization change | Focused regression test or explicit security review evidence |

| Public API behavior | Contract/API test or documented compatibility reasoning |

| Business rule | Unit or component test for the rule |

| Persistence/query behavior | Integration or database-backed test where mocks would hide risk |

| Bug fix | Regression test proving the old failure mode is covered |

| Documentation-only change | Link/path validation, drift scan, or targeted review |

Respect repository rules about running builds and tests. If execution is not allowed, report verification as not run instead of implying pass/fail.

Trace boundary-case inputs through constructors, implicit conversions, and property setters before evaluating assertions. Verify dependency constraints against source or version-matched documentation. Use valid configuration for downstream behavior tests. If rejection is intended, assert it at the rejecting boundary. Never bypass validation to create an impossible runtime state. Distinguish fixture validity from unexecuted behavioral assertions.

Breaking Change Detection

Public API

Database And Data

Configuration And Operations

Documentation And Release Notes

Apply the profile's release rules and documentation triggers. Document consumer impact only. Record "not required" when no trigger applies.

Security Review Triggers

Flag for extra scrutiny when changes touch:

Pre-Mortem

Before approving, ask: "If this causes an incident in 6 months, what was the root cause?"

| Failure Mode | What to Look For |

|-------------|------------------|

| Silent security regression | Guard removed, endpoint exposed, policy weakened |

| Data leak | Internal fields, private identifiers, secrets, logs, or entities exposed |

| Unbounded work | Missing pagination, unbounded query, retry storm, large in-memory load |

| Lifetime mismatch | Captive dependency, mutable singleton, leaked disposable |

| Data loss | Destructive migration, overwrite path, missing backup/rollback |

| Broken contract | Removed member, changed response shape, renamed config key |

| False confidence | Test asserts plumbing only, mock hides integration failure |

| Supply-chain risk | Dependency, action, or image that fails the dependency security checks, including canonical digest/provenance verification and full immutable action SHAs |

| Runtime drift | Container image/runtime version no longer matches repository profile or project metadata |

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.