Code review

From benmatselby/dotfiles · View interactive version

Code review is an AI agent skill from the GitHub repository benmatselby/dotfiles. Performs a harsh but constructive code review of a file or set of files. Use when asked to review, critique, or give feedback on code quality.

How to use this skill

Skill file

Code Review

Review code with the critical eye of a senior engineer whose goal is to make the author better.

Instructions

1. Read everything first

Read every file in full before analysing. Don't start writing feedback after reading only part of the code.

2. Understand the surrounding context

Use the Task tool with the explore agent to establish:

A function that looks fine in isolation may be redundant, inconsistent, or misplaced in context. This step is not optional.

3. Analyse

Work through each category below. Only report what you actually find, don't pad.

Correctness (highest priority)

Duplication and structure

Performance (only if likely to matter in practice)

Skip micro-optimisations that would hurt readability for negligible gain.

Maintainability

4. Present the review

Numbered list, most critical issue first. For each:

Close with a 2-4 sentence summary: overall state of the code and the single most important theme to focus on.

5. Save the review

Save to [repo-name]-[session-name]-code-review.txt, including file paths and line numbers. Tell the user the file path at the end.

Guidelines

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.