Skip to content
RHL AISkillsCode Reviewer

AGENT SKILL

v1.0.1

Code Reviewer

Expert AI code reviewer for strict TypeScript, architecture, and performance.

code-reviewtypescriptarchitecturesecurity
then /code-reviewer in Claude Code

Install & use

  1. 01

    Install it into Claude Code

    Copies the skill folder to ~/.claude/skills/code-reviewer. Use --target .claude/skills to add it to one repository for your whole team, or leave out --target to install into ~/.agents/skills for agents that read that folder.

  2. 02

    Start a new session and call it

    /code-reviewer

    Type the slash command (you can add instructions after it), or just describe the task: the agent loads the skill automatically when it matches. In other agents, name the skill in your prompt, e.g. “Use the code-reviewer skill to …”.

  3. 03

    Keep it up to date

    Also published on npm as @rhl-ai/skill-code-reviewer.

What the agent follows (SKILL.md)

Overview

This skill guides agents through rigorous, multi-dimensional code reviews across TypeScript and modern web applications. The goal is to surface actionable, high-confidence feedback that catches subtle bugs, security vulnerabilities, performance degradation, and architectural violations before code reaches production.

Decision Framework

When reviewing code, categorize feedback into three strict severity tiers:

  1. Blocking (Must Fix):

    • Type unsafety: use of any, unsafe casts, unhandled null/undefined.
    • Security issues: injection vulnerabilities, exposed secrets, unvalidated user input.
    • Correctness bugs: race conditions, unhandled promise rejections, memory leaks.
    • Breaking API changes without backward compatibility or deprecation notices.
  2. Non-Blocking (Should Fix):

    • Performance optimizations: unnecessary re-renders, redundant allocations, N+1 patterns.
    • Architectural cohesion: violation of layer boundaries, missing unit tests.
    • Code readability: overly complex expressions, cryptic naming.
  3. Nitpick (Optional):

    • Purely stylistic suggestions (prefer relying on automated linter/prettier rules).

Workflows

1. Context Orientation

  • Review the pull request description, changed files, and associated issue tickets.
  • Understand the intent: is this a bug fix, performance patch, or new feature?

2. Systematic Code Inspection

Evaluate the diff against five core dimensions:

  • Correctness & Edge Cases: What happens on network failure? Empty arrays? Concurrent calls?
  • Type Safety: Are interfaces well-defined? Are discriminating unions leveraged? Is any absent?
  • Architecture & Boundaries: Does this change violate package or module responsibilities?
  • Security & Privacy: Are inputs sanitized? Are permissions enforced?
  • Performance & Scalability: What is the asymptotic complexity of new loops or queries?

3. Synthesizing Feedback

Format each review comment with:

  • File & Line: Exact location.
  • Observation: What is problematic and why.
  • Suggested Solution: Concrete replacement code snippet.
  • Severity: Blocking, Non-Blocking, or Nitpick.

Constraints

  • Never approve code containing implicit or explicit any types.
  • Never suggest subjective stylistic rewrites when existing code matches established project conventions.
  • Never approve modifications to authentication or database layers without automated test coverage.

References