Code review

From stbenjam/skillsaw · View interactive version

Code review is an AI agent skill from the GitHub repository stbenjam/skillsaw. Review pull request diffs for correctness, security, and style. Use when assessing a code change.

How to use this skill

Skill file

Code Review

Review pull request diffs to identify bugs, security issues, and style

violations.

When to Use This Skill

Use when the user asks to review a PR, check recent changes, or audit

code for quality issues.

Implementation Steps

Step 1: Get the Diff

Fetch the diff for the PR or branch:

gh pr diff $PR_NUMBER

Or for local changes:

git diff main...HEAD

Step 2: Analyze Changes

For each changed file, check for:

Step 3: Produce Review

Format findings as a structured review:

## file.py:42 — Error: Unchecked return value
The return value of `db.execute()` is ignored. If the query fails,
the function continues with stale data.

**Suggestion:** Add error handling:
\`\`\`python
result = db.execute(query)
if result.error:
    raise DatabaseError(result.error)
\`\`\`
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.