Skip to main content
skill CX Codex

code-review · getsentry — Claude Code skill: Sentry-style PR review

A skill that reviews pull requests and code changes against Sentry engineering practices: security, performance, tests, design.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add getsentry/skills --skill code-review -a claude-code
Open on GitHub

What code-review does

The skill hands the agent a checklist to work through on a diff. It starts with defects: possible exceptions, null dereferences, out-of-bounds access, unbounded O(n²) work, N+1 queries, needless allocations. It also looks for side effects that break other components and for breaking API changes with no migration path. Complex Django ORM queries are on the list too.

Design comes next. Do the component interactions make sense, does the change fit the existing architecture, does it conflict with current requirements? Tests get checked for real requirements and edge cases, and heavy branching or looping inside test code is treated as a smell. Database schema changes, API contract changes, new libraries, and performance- or security-sensitive paths get flagged for a senior engineer.

Feedback tone is spelled out: polite, with actionable suggestions, and uncertain points phrased as questions. Approve once only minor issues remain, and don't block a PR over stylistic preference. Worked examples cover Python/Django, TypeScript/React and SQL injection. The checklist is written for Sentry projects, so expect to drop some items in your own repo.

What it helps with

  • catch an N+1 query in Django before merge
  • check whether a change breaks API backwards compatibility
  • spot an injection flaw or a leaked secret
  • judge whether tests cover edge cases
  • route risky changes to a senior reviewer

Example prompts for the agent

  • Review this pull request against the code-review checklist
  • Check the changes in views.py for N+1 queries and performance issues
  • Look at this diff for security problems: injection, XSS, access control

How to install code-review

1Skills CLI (Vercel)

npx skills add getsentry/skills --skill code-review -a claude-code

2Manually: put the files in place

~/.claude/skills/code-review/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/code-review/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about code-review

How do I install code-review in Claude?

Run npx skills add getsentry/skills --skill code-review -a claude-code. The skill lands in ~/.claude/skills/code-review/SKILL.md.

What does code-review do?

It walks a diff through the Sentry checklist: runtime errors, performance, side effects, backwards compatibility, security, design and test coverage. You get concrete suggestions instead of vague criticism.

Does it work outside Sentry projects?

The checklist encodes Sentry's practices and some items tie into their process. In your own repo, keep the parts that match your review rules.

Source text

SKILL.md · Apache-2.0
---
name: code-review
description: Perform code reviews following Sentry engineering practices. Use when reviewing pull requests, examining code changes, or providing feedback on code quality. Covers security, performance, testing, and design review.
---

# Sentry Code Review

Follow these guidelines when reviewing code for Sentry projects.

## Review Checklist

### Identifying Problems

Look for these issues in code changes:

- **Runtime errors**: Potential exceptions, null pointer issues, out-of-bounds access
- **Performance**: Unbounded O(n²) operations, N+1 queries, unnecessary allocations
- **Side effects**: Unintended behavioral changes affecting other components
- **Backwards compatibility**: Breaking API changes without migration path
- **ORM queries**: Complex Django ORM with unexpected query performance
- **Security vulnerabilities**: Injection, XSS, access control gaps, secrets exposure

### Design Assessment

- Do component interactions make logical sense?
- Does the change align with existing project architecture?
- Are there conflicts with current requirements or goals?

### Test Coverage

Every PR should have appropriate test coverage:

- Functional tests for business logic
- Integration tests for component interactions
- End-to-end tests for critical user paths

Verify tests cover actual requirements and edge cases. Avoid excessive branching or looping in test code.

### Long-Term Impact

Flag for senior engineer review when changes involve:

- Database schema modifications
- API contract changes
- New framework or library adoption
- Performance-critical code paths
- Security-sensitive functionality

## Feedback Guidelines

### Tone

- Be polite and empathetic
- Provide actionable suggestions, not vague criticism
- Phrase as questions when uncertain: "Have you considered...?"

### Approval

- Approve when only minor issues remain
- Don't block PRs for stylistic preferences
- Remember: the goal is risk reduction, not perfect code

## Common Patterns to Flag

### Python/Django

```python
# Bad: N+1 query
for user in users:
    print(user.profile.name)  # Separate query per user

# Good: Prefetch related
users = User.objects.prefetch_related('profile')
```

### TypeScript/React

```typescript
// Bad: Missing dependency in useEffect
useEffect(() => {
  fetchData(userId);
}, []);  // userId not in deps

// Good: Include all dependencies
useEffect(() => {
  fetchData(userId);
}, [userId]);
```

### Security

```python
# Bad: SQL injection risk
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")

# Good: Parameterized query
cursor.execute("SELECT * FROM users WHERE id = %s", [user_id])
```

## References

- [Sentry Code Review Guidelines](https://develop.sentry.dev/engineering-practices/code-review/)

© getsentry · Apache-2.0 · getsentry/skills

Similar skills

All skills for Code review and refactoring →

code-review by other authors comes first.

code-review Matt Pocock Reviews changes from a chosen reference point against repository standards and the originating spec. Use it for a branch, PR, or work in progress. 789,521installs code-review official anthropics The skill reviews diffs and pull requests for security, performance and correctness. Useful when a change needs a look before merging. CX Codex +1 9,900installs code-review agno-team Automated code inspection for style violations, bugs, and best-practice gaps. The skill runs linting, identifies issues, and delivers structured feedback with severity levels. CX Codex +1 472installs code-review coderabbitai Runs CodeRabbit CLI reviews and feeds structured findings back to the agent. Helpful for catching bugs, security risks, and code quality issues before merging. CX Codex +1 14,800installs code-review Donchitos A skill that runs architectural review: project standards, SOLID, testability, performance. Useful when you need to go through a file or a whole module. CX Codex +1 452installs find-bugs davila7 Walks the diff on your current branch and reports bugs, security holes and code quality problems. Handy before a merge or a push. 944installs sentry-python-sdk getsentry A skill that scans your Python project and walks you through Sentry setup: errors, tracing, profiling, logs, crons and AI monitoring. CX Codex +1 2,600installs inngest-middleware inngest Teaches your AI assistant how to build Inngest v4 middleware for dependency injection and payload encryption. CX Codex +1 3,600installs sentry-sdk-upgrade getsentry This skill guides major version upgrades for the Sentry JavaScript SDK, like migrating from v7 to v8 or v9. It finds deprecated APIs, updates imports, and verifies the build. CX Codex +1 3,100installs cc-skill-security-review sickn33 Reviews code for SQL injection, XSS, leaked secrets, and authorization flaws. Use it when building APIs, file uploads, or authentication. CX Codex +1 2,100installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. CX Codex +1 57,000installs

From the same set23

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor