Agent skill

Code Review

by espennilsen in espennilsen/pi

Review code for quality, security, performance, and maintainability.

MITAuto-check passedDevelopment

Install Code Review

skills CLI
$ npx skills add espennilsen/pi --skill code-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install espennilsen/pi code-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/espennilsen/pi.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/code-review .claude/skills/code-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-review
GitHub stars
122
Token cost
~771 tokens
SKILL.md length
279 words
Files
1
Skills in repo
36
Repo updated
First seen
Licence
MIT

At a glance

Review code for quality, security, performance, and maintainability.

  • Works in 4 steps: Understand scope — Read the changed… → Read the code — Use the read tool on… → Analyze against checklist — Score each… → …
  • Auditing a codebase
  • SKILL.md covers Process, Review Checklist, Output Format and Common Patterns in Espen's Stack
  • Calls git

What it does

Code Review is an agent skill from espennilsen/pi. Review code for quality, security, performance, and maintainability. Use when reviewing PRs, auditing a codebase, or refactoring. Covers TypeScript, Node.js, infrastructure-as-code, and full-stack web apps.

Its SKILL.md is about 770 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code review, Infrastructure as code and Refactoring. It works with TypeScript and Node.js. The licence is MIT.

When your agent uses it

  • Auditing a codebase
  • Tasks that involve Code review
  • Tasks that involve Infrastructure as code

Example prompts

  • “/code-review”

Requirements

  • Node.js
  • Docker

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Understand scope — Read the changed files or the area under review
  2. Read the code — Use the read tool on each file. Don't guess.
  3. Analyze against checklist — Score each category.
  4. Report — Use the output format below.

What it can do on your machine

Read from SKILL.md and the folder at commit 79d019b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Review loads about 771 tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 279 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~771

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from espennilsen/pi at commit 79d019b, republished under its MIT licence (© espennilsen). 279 words, ~771 tokens.

Download SKILL.mdSave it as .claude/skills/code-review/SKILL.md (or your agent's skills folder).
name
code-review
description
Review code for quality, security, performance, and maintainability. Use when reviewing PRs, auditing a codebase, or refactoring. Covers TypeScript, Node.js, infrastructure-as-code, and full-stack web apps.

Code Review

Systematic code review for Espen's TypeScript/Node.js projects.

Process

  1. Understand scope — Read the changed files or the area under review:

    bash
    # For git changes
    git diff --name-only HEAD~1
    git diff HEAD~1
    
    # For a specific area
    find src/ -name "*.ts" -newer <reference-file>
  2. Read the code — Use the read tool on each file. Don't guess.

  3. Analyze against checklist — Score each category.

  4. Report — Use the output format below.

Review Checklist

Correctness
  • Logic handles edge cases (null, empty, boundary values)
  • Error handling is explicit (no swallowed errors, no bare catch {})
  • Async code handles rejection/cancellation properly
  • Types are accurate (no unnecessary any, proper narrowing)
Security
  • No secrets or credentials in code
  • User input is validated/sanitized before use
  • SQL queries use parameterized statements (no string interpolation)
  • File paths are resolved safely (no path traversal)
  • Auth checks are present where needed
Performance
  • No N+1 queries or unbounded loops over large datasets
  • Heavy operations are async or streamed (not blocking)
  • Database queries use appropriate indexes
  • Large responses are paginated or truncated
Maintainability
  • Functions do one thing with clear names
  • No magic numbers or hardcoded values that should be config
  • Types and interfaces are defined (not inline object shapes)
  • Dead code and unused imports are removed
  • Comments explain why, not what
Project Conventions
  • Follows existing patterns in the codebase
  • File naming and directory structure is consistent
  • Error messages are helpful for debugging
  • Logging is appropriate (not too noisy, not silent on errors)

Output Format

markdown
## Code Review: [scope]

### Summary
One paragraph: what the code does, overall quality assessment.

### Issues

#### 🔴 Critical
- [file:line] Description and fix

#### 🟡 Important
- [file:line] Description and suggestion

#### 🔵 Minor
- [file:line] Nit or style suggestion

### What's Good
- Call out well-written code, good patterns, clever solutions

### Recommendations
- Prioritized list of changes, starting with most impactful

Common Patterns in Espen's Stack

Project TypeKey Things to Check
Pi extensionsTool parameter schemas, error returns, signal/abort handling
Eleventy sitesTemplate data flow, permalink structure, Tailwind purge config
TanStack appsRouter setup, query keys, optimistic updates, Clerk auth guards
InfrastructureTerraform state safety, Docker layer caching, env var handling
SQLiteMigration ordering, prepared statements, WAL mode, index coverage

© espennilsen, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/code-review of espennilsen/pi.

Open the folder on GitHubat commit 79d019b

Compare with similar skills

Code Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Review this skillespennilsen/pi122—~771Automated safety check: PassMIT
ast-grep Codemod Referencewarp-drive-data/warp-drive3.2k—~2.6kAutomated safety check: PassMIT
Coding Agentmastra-ai/mastra29k—~2.3kAutomated safety check: PassCustom licence
Typescript React ReviewerSuFxGIT/scoutarr114—~1.7kAutomated safety check: PassNone
Swpm Code Reviewdeinsoftware/swpm125—~1.1kAutomated safety check: PassMIT
Chat Gun Bff ContractHsienW/chat-gun143—~2.6kAutomated safety check: PassCustom licence

Similar skills

  • ast-grep Codemod Reference

    warp-drive-data/warp-drive

    Reference for writing and debugging TypeScript and JavaScript codemods with @ast-grep/napi: parsing, node queries, meta-variables, rule objects and editing.

    3.2k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Coding Agent

    mastra-ai/mastra

    Authoring playbook for building agents that write, edit, review, or refactor code.

    29k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Expert code reviewer for TypeScript + React 19 applications.

    114 GitHub stars~1.7k tokensUpdated 6 mo ago
    DevelopmentAuto-check passed
  • Swpm Code Review

    deinsoftware/swpm

    Automated code review bash script for SWPM. An agent skill from deinsoftware/swpm.

    125 GitHub stars~1.1k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed
  • Chat Gun Bff Contract

    HsienW/chat-gun

    Apply when creating, modifying, refactoring, debugging, testing, or reviewing TypeScript and Node.js code under bff/ in chat-gun.

    143 GitHub stars~2.6k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Code Reviewer

    LeoYeAI/openclaw-master-skills

    Code review automation for TypeScript, JavaScript, Python, Go, Swift, Kotlin.

    2.2k GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed

More from espennilsen/pi

All 36 skills in this repo
  • GitHub

    espennilsen/pi

    Interact with GitHub repos, PRs, issues, CI, and notifications via the pi-github extension commands and gh CLI.

    122 GitHub stars~1k tokensUpdated 16 days ago
    Auto-check passed
  • Skill Creator

    espennilsen/pi

    Create, review, and improve skills for Pi agents. An agent skill from espennilsen/pi.

    122 GitHub stars~2.1k tokensUpdated 16 days ago
    Auto-check passed
  • Dry Code Review

    espennilsen/pi

    Perform a comprehensive DRY (Don't Repeat Yourself) code review on a codebase.

    122 GitHub stars~1.7k tokensUpdated 16 days ago
    Auto-check passed
  • Extract Design System

    espennilsen/pi

    Reverse-engineer a design system from a live website (public URL or localhost).

    122 GitHub stars~2k tokensUpdated 16 days ago
    Auto-check passed
  • PDF Reader

    espennilsen/pi

    Read and extract content from PDF files — text, tables, metadata, and images.

    122 GitHub stars~1.6k tokensUpdated 16 days ago
    Auto-check passed
  • Google Workspace

    espennilsen/pi

    Manage Google Workspace via the gws CLI — Drive, Gmail, Sheets, Docs, Slides, People, Chat, Meet, Forms, and cross-service workflows.

    122 GitHub stars~3.4k tokensUpdated 16 days ago
    Auto-check passed

Categories

Questions about Code Review

What does Code Review do?

Review code for quality, security, performance, and maintainability. Code Review is an agent skill from espennilsen/pi. Review code for quality, security, performance, and maintainability.

When should I use Code Review?

Code Review fits situations like: auditing a codebase; tasks that involve Code review; tasks that involve Infrastructure as code.

How do I install Code Review in Claude Code?

Run `npx skills add espennilsen/pi --skill code-review -a claude-code`. Or copy the skill folder (skills/code-review in espennilsen/pi) into .claude/skills/code-review in your project. Claude Code loads it when a task matches its description.

How do I install Code Review in Codex?

Run `npx skills add espennilsen/pi --skill code-review -a codex`. Or copy the skill folder (skills/code-review in espennilsen/pi) into .agents/skills/code-review in your project. Codex loads it when a task matches its description.

Can I use Code Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add espennilsen/pi --skill code-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-review, .gemini/skills/code-review, .github/skills/code-review and .opencode/skills/code-review in your project.

What does Code Review need to run?

Going by SKILL.md and its folder, Code Review needs the command-line tools its instructions call (git). Our summary lists: Node.js; Docker.

Does Code Review access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Code Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Review use?

Code Review is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Review use?

About 771 tokens (SKILL.md is roughly 3.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Review?

Skills that share tags, products or a category with Code Review: ast-grep Codemod Reference (warp-drive-data/warp-drive, 3.2k stars), Coding Agent (mastra-ai/mastra, 29k stars), Typescript React Reviewer (SuFxGIT/scoutarr, 114 stars) and Swpm Code Review (deinsoftware/swpm, 125 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Review?

espennilsen (a GitHub user) maintains it in espennilsen/pi, which has 122 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on September 21, 2026.

Source: espennilsen/pi on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.