Software DevelopmentOfficial · getsentry

Code Review skill for Claude

Perform code reviews following Sentry engineering practices.

When Claude uses it

Use when reviewing pull requests, examining code changes, or providing feedback on code quality. Covers security, performance, testing, and design review.

Code Review SKILL.md

The full skill file from getsentry/skills (Apache-2.0).

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

How to install Code Review

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit getsentry/skills/skills/code-review#main ~/.claude/skills/code-review

Codex

npx degit getsentry/skills/skills/code-review#main ~/.codex/skills/code-review

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Code Review skill do?

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.

+How do I install Code Review in Claude Code?

Copy the skill folder into ~/.claude/skills/code-review, for example with "npx degit getsentry/skills/skills/code-review#main ~/.claude/skills/code-review". Claude Code loads it automatically and uses it when a task matches.

+Does Code Review work with ChatGPT or Codex?

Yes. Code Review uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/code-review. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Code Review free?

Code Review is published on GitHub by getsentry under the Apache-2.0 license, which allows free use.

Related software development skills

  1. Code Review

    Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's…

    mattpocock/skills★ 327k
  2. Using Agent Skills

    Discovers and invokes agent skills. Use when starting a session, or when you need to decide which skill or workflow applies to the piece of…

    addyosmani/agent-skills★ 119k
  3. Build

    Fully automate a coding task with make-plan, do, and babysit.

    thedotmack/claude-mem★ 118k
  4. Create Branch

    Official

    Create a git branch following Sentry naming conventions. Use when asked to "create a branch", "new branch", "start a branch", "make a…

    getsentry/skills★ 1.2k
  5. Document Api Endpoint

    Official

    Document and type a Sentry API endpoint. Write or fix @extend_schema decorators, specify response TypedDicts, type request parameters,…

    getsentry/skills★ 1.2k
  6. Pr Link Issue

    Official

    Append a GitHub issue link and its Linear ticket to the current PR's description.

    getsentry/skills★ 1.2k
  7. Secret Serialization

    Official

    Finds secrets, tokens, passwords, and API keys that can leak through generated serialization: Python dataclass repr and asdict, attrs,…

    getsentry/skills★ 1.2k
  8. Typing Exclusion Worker

    Official

    Python typing exclusion worker: remove assigned mypy exclusion modules in small scoped batches, fix typing issues, run validation, and…

    getsentry/skills★ 1.2k
  9. Youtube Api

    Reach for this when YouTube data is needed and Google's Data API is the obstacle: no quota units, no OAuth consent screens, one Bearer key.

    artemchuikin/youtube-skills★ 275

See all software development skills →

More skills from getsentry

  1. Django Access Review

    Official

    Django access control and IDOR security review. Use when reviewing Django views, DRF viewsets, ORM queries, or any Python/Django code…

    getsentry/skills★ 1.2k
  2. Django Perf Review

    Official

    Django performance code review. Use when asked to "review Django performance", "find N+1 queries", "optimize Django", "check queryset…

    getsentry/skills★ 1.2k

All skills by getsentry →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.