Code review, Sentry practices
Reviews a change by Sentry's guidelines: runtime errors, performance and N+1 queries, side effects, compatibility, security, design and tests, with a polite tone and approval once only minor issues remain. Use when reviewing a pull request or branch.
code-review- Author
- Sentry
- Source
- getsentry/skills/skills/code-review @ a582c51
- License
- Apache-2.0 · Copyright 2025 Functional Software, Inc. dba Sentry
About this skill
What it does
The skill turns Sentry's reviewer guidelines into instructions: what to look for in a change and how to word the feedback. The checklist covers runtime errors, performance (unbounded O(n²) work, N+1 queries, needless allocations), side effects on other components, backwards compatibility of APIs, costly Django ORM queries, and security: injection, XSS, access-control gaps, exposed secrets. It also asks whether the design fits the architecture and whether tests cover the requirements and edge cases.
Schema changes, API contract changes, a new framework or library, performance-critical paths and security-sensitive code are flagged for a senior engineer. On tone: polite, actionable comments, questions when unsure, approval once only minor issues remain, no blocking over style; the stated goal is less risk, not perfect code. Examples show what to flag: an N+1 query in Django, a missing useEffect dependency in React, SQL built with an f-string.
It has no step for fetching the diff, no report format and no severity scale; the agent decides those. The folder holds only SKILL.md and the licence.
When to use it, and when not
Use it to review a pull request or a branch, especially in Python/Django or TypeScript/React code.
For a deep security or bug hunt it is thin: it names categories, not how to trace them.
How to run it
The install command below puts the folder in place. The agent picks the skill up by its description when you ask for a review; to call it yourself:
- Claude Code:
/code-review, or ask for the skill by name. - Codex:
$code-review. - Cursor: type
/in the Agent chat and pickcode-review.
Example: /code-review Review the changes on this branch against main and say whether you would approve them.
Installed in ~/.claude/skills/code-review, this skill replaces Claude Code's built-in /code-review: the command now runs Sentry's checklist, and the built-in review stays reachable only through its alias /review.
Code review against standards and spec has the same slug: both install into a code-review folder, so only one can be installed at a time.
How it differs from similar skills
Find bugs in branch changes from the same pack is the procedure this skill lacks: it reads the full branch diff, runs an eleven-item security checklist per file and reports each finding with evidence. PR review from our catalog fixes a report format and requires a failure scenario for each bug. Multi-axis code review grades five axes and checks whether the tests would catch a regression. Matt Pocock's skill measures the diff against written standards and the spec. This one is the lightest: a checklist and reviewing etiquette.
Install
Run one command — it saves SKILL.md and the files it uses into your agent's skills folder. Claude Code and Codex pick up a new skill without a restart; if it does not show up, restart the agent.
curl -fsSL --create-dirs -o ~/.claude/skills/code-review/SKILL.md https://anymodel.org/en/skills/sentry/code-review/SKILL.md -o ~/.claude/skills/code-review/LICENSE https://anymodel.org/en/skills/sentry/code-review/LICENSE
curl -fsSL --create-dirs -o ~/.agents/skills/code-review/SKILL.md https://anymodel.org/en/skills/sentry/code-review/SKILL.md -o ~/.agents/skills/code-review/LICENSE https://anymodel.org/en/skills/sentry/code-review/LICENSE
foreach ($f in 'SKILL.md','LICENSE') { $p = Join-Path "$HOME\.claude\skills\code-review" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/sentry/code-review/$f" -UseBasicParsing -OutFile $p }foreach ($f in 'SKILL.md','LICENSE') { $p = Join-Path "$HOME\.agents\skills\code-review" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/sentry/code-review/$f" -UseBasicParsing -OutFile $p }Any other agent: save the file into its skills folder, or give it the link to the file: https://anymodel.org/en/skills/sentry/code-review/SKILL.md
SKILL.md
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
# 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
// Bad: Missing dependency in useEffect
useEffect(() => {
fetchData(userId);
}, []); // userId not in deps
// Good: Include all dependencies
useEffect(() => {
fetchData(userId);
}, [userId]);
Security
# 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
Connect through AnyModel API
This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.
AnyModel