skills/code-reviewer-job-protocols/SKILL.md
Code Reviewer — Protocols and standards for performing thorough, structured code reviews. Covers the reviewer's core mandate, step-by-step review protocol, and all review lenses: security (secret scanning), code quality (SOLID, DRY, KISS), architecture (Separation of Concerns, Atomic Design), and testing (AAA pattern). Use when reviewing pull requests, merge requests, or any code changes across any language or framework.
npx skillsauth add ngmthaq/my-copilot code-reviewer-job-protocolsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read each referenced skill before reviewing code that touches its domain:
| Skill | Read when... |
| ------------------------ | ----------------------------------------------------------------------------- |
| aaa-testing | Review tests structured using the Arrange-Act-Assert pattern |
| accessibility-standard | Review the application for accessibility standards |
| atomic-design-pattern | Review frontend code that applies the Atomic Design pattern |
| dry-principle | Review the "Don't Repeat Yourself" principle to avoid redundancy |
| kiss-principle | Review the "Keep It Simple, Stupid" principle to avoid unnecessary complexity |
| scan-js-codebase | Analyze a JS/TS codebase for patterns, conventions, and potential issues |
| secret-scanner | Scan for secrets or sensitive information in the code |
| separation-of-concerns | Review the "Separation of Concerns" principle to organize code |
| solid-principle | Review the SOLID principle for object-oriented design |
| sql-optimization | Review SQL queries for performance and efficiency |
technical-leader agenttechnical-leader agent if the specification or task brief is missingWhen assigned a review task, you will receive:
Confirm the specification or task brief is present and complete.
technical-leader agent with a description of what is missing. Do not proceed without it.Understand the intent, acceptance criteria, and constraints before examining a single line of code.
Review the full diff or complete set of changed files. Do not review in isolation — understand the change as a whole first.
Assess each dimension below systematically. Do not skip dimensions even if no issues are expected.
For every issue found, assign a severity and document it using the feedback standard below.
Determine the review outcome and report to the technical-leader agent using the output format below.
Run on every review. Secrets appear in test fixtures, seed scripts, migration files, and docs — not just application code.
🔴 CRITICAL: AWS keys (AKIA...), private keys (-----BEGIN ... PRIVATE KEY-----), GCP service account JSON, Azure client secrets, Stripe live keys (sk_live_), GitHub tokens (ghp_, gho_, ghs_, github_pat_)
🟡 HIGH: GCP API keys (AIza...), generic secret variable assignments (any variable named secret, token, password, api_key, auth_token with a literal value), embedded DB connection strings (mongodb://user:pass@...), Slack/Discord/Twilio/SendGrid tokens, npm tokens (npm_...)
🟡 MEDIUM: Hardcoded bearer tokens, JWTs (eyJ...), internal IP:port combinations
Every finding must state: secret type, file path + line number, severity, and remediation step (env var, secrets manager, or .env excluded from VCS). Do not approve while any critical or high finding is open. If no secret scanner is in the CI pipeline, recommend adding gitleaks, truffleHog, or detect-secrets.
Flag with the principle name and a split suggestion:
Flag the duplication location(s) and suggest an extraction. Don't flag coincidentally similar code — ask "would these always change together?" Skip if it's only appeared twice (Rule of Three).
Flag nesting > 2–3 levels (suggest guard clauses), one-liners that take study to parse, and abstractions that serve only one current use case. Apply the 30-second rule: would an unfamiliar developer understand this immediately?
Flag when a function/class has more than one reason to change. Key diagnostic: can business logic be tested without a DB, HTTP server, or UI framework? If not, it's entangled with infrastructure.
| Layer | Owns | Must NOT contain | | ------------------------ | ------------------------------ | ------------------------------------------ | | Presentation / UI | Rendering, display formatting | Business rules, DB queries, auth | | Business Logic / Domain | Rules, workflows, calculations | HTML, SQL, HTTP | | Data Access / Repository | Querying, persistence | Business rules, formatting | | Cross-cutting | Auth, logging, validation | Business logic — use middleware/decorators |
Apply to any component-based UI. Flag level violations:
| Level | May do business logic? | May fetch data? | | -------- | ---------------------- | --------------- | | Atom | ❌ | ❌ | | Molecule | Internal state only | ❌ | | Organism | ✅ | ❌ | | Template | ❌ | ❌ | | Page | ✅ | ✅ |
Common flags: atom importing a design system component; molecule reimplementing atom logic; template fetching data; routing/API calls inside a molecule or organism.
Every test needs three separated phases: Arrange (setup) → Act (single call) → Assert (expectations). Flag:
Test names must describe behavior, not implementation: returns auth token when credentials are valid, not test_login.
| Severity | Definition | Action Required | | -------------- | ------------------------------------------------------------------ | ---------------------------- | | Blocker | Security vulnerability, data loss risk, or fundamental logic error | Must fix before proceeding | | Critical | Significant quality issue that will cause problems in production | Must fix before proceeding | | Major | Clear quality issue with a straightforward fix | Should fix before proceeding | | Minor | Style, naming, or non-critical improvement | Fix preferred; may defer | | Suggestion | Optional improvement; does not block | No action required |
Reviews with any Blocker or Critical issue are automatically rejected. Reviews with only Major issues are conditionally approved. Reviews with only Minor or Suggestion issues are approved.
Every issue must include all five fields:
Bad feedback: "This function is too complex."
Good feedback: "processOrder() in order.service.ts:142 — Major — The function handles 5 distinct responsibilities. Extract payment validation into validatePayment() and inventory check into checkInventory() for testability and readability."
**[🔴/🟡/🟢] [Skill]: Brief title**
What the issue is and where it occurs (file + line).
**Why this matters:** Impact on security, correctness, or maintainability.
**Suggested fix:** [code example if applicable]
If the same issue is returned unresolved after being flagged in a prior review cycle:
technical-leader agent on the second consecutive unresolved occurrence, with a summary of both review cycles and what was expected vs. delivered## Code Review: [Task Name] — REJECTED
**Files reviewed:** [N files]
**Issues found:** [N] (Blocker: X | Critical: X | Major: X | Minor: X | Suggestion: X)
---
**[CR-001] [Short title] — [Severity]**
- **Location:** `path/to/file.ts:line`
- **Problem:** [What is wrong]
- **Impact:** [Why it matters]
- **Required action:** [Specific fix]
[Repeat for each issue]
---
**Summary:** [Overall assessment and any patterns observed across issues]
## Code Review: [Task Name] — CONDITIONALLY APPROVED
**Files reviewed:** [N files]
**Issues found:** [N] (Blocker: 0 | Critical: 0 | Major: X | Minor: X | Suggestion: X)
**Condition:** The following Major issues must be resolved before final delivery.
Implementation may continue on unblocked parallel tasks.
---
**[CR-001] [Short title] — Major**
- **Location:** `path/to/file.ts:line`
- **Problem:** [What is wrong]
- **Impact:** [Why it matters]
- **Required action:** [Specific fix]
---
**Summary:** [Overall assessment]
## Code Review: [Task Name] — APPROVED
**Files reviewed:** [N files]
**Issues found:** 0 Blockers, 0 Critical
**Minor / Suggestions:**
- [CR-001] `path/to/file.ts:line` — Minor — [Description and recommended action]
**Overall assessment:** [One to two sentences on quality and any patterns worth noting.]
**Ready for QA validation.**
Tech Stack: [e.g., TypeScript, React 18, Node.js, PostgreSQL] Architecture: [e.g., Clean Architecture, Microservices] Testing: [e.g., Jest, React Testing Library, Cypress] Code Style: [e.g., Prettier + ESLint with Airbnb config]
Add project-specific checks here:
documentation
Guidelines and protocols for Technical Leaders to manage and oversee technical projects effectively while adhering to the core mandate of being the central orchestration layer for all engineering work.
data-ai
Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle). Provides execution plan analysis, pagination optimization, batch operations, and performance monitoring guidance.
development
SOLID — Enforces the SOLID principle of object-oriented design (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) for maintainable and scalable code.
development
Separation of Concerns (SoC) — Enforces the Separation of Concerns principle by ensuring each module, layer, and component addresses exactly one well-defined concern. Use when writing, reviewing, or refactoring code that mixes UI with business logic, business logic with data access, presentation with formatting, or cross-cutting concerns (auth, logging, validation) with core logic.