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.
Written by Sentry and published in getsentry/skills under the Apache-2.0 license. Treq shows it unchanged except for heading levels and links to files on GitHub.
Follow these guidelines when reviewing code for Sentry projects.
Look for these issues in code changes:
Every PR should have appropriate test coverage:
Verify tests cover actual requirements and edge cases. Avoid excessive branching or looping in test code.
Flag for senior engineer review when changes involve:
# 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')
// Bad: Missing dependency in useEffect
useEffect(() => {
fetchData(userId);
}, []); // userId not in deps
// Good: Include all dependencies
useEffect(() => {
fetchData(userId);
}, [userId]);
# 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])
Claude Code and Codex keep each installed skill's name and description in context. When a request matches the description, the agent loads the full SKILL.md. You can also run it yourself: type /code-review in Claude Code or $code-review in Codex.
The description says when to use it:
Use when reviewing pull requests, examining code changes, or providing feedback on code quality.
Copy the code-review folder into .claude/skills/ in your project. To use it in every project, copy it into ~/.claude/skills/ instead.
git clone --depth 1 https://github.com/getsentry/skills.git /tmp/getsentry-skills
mkdir -p .claude/skills
cp -r /tmp/getsentry-skills/skills/code-review .claude/skills/
Codex reads skills from .agents/skills/ in your repository, and from ~/.agents/skills/ for every repository. It detects new skills on its own. Restart Codex if code-review does not appear.
git clone --depth 1 https://github.com/getsentry/skills.git /tmp/getsentry-skills
mkdir -p .agents/skills
cp -r /tmp/getsentry-skills/skills/code-review .agents/skills/
Open Settings and select the Skills tab. The tab appears when Skills installation is on under Settings → Feature Preview. Search for code-review and choose Install….
Install for repository writes the skill under .treq/skills/ in the current repository. Install for application makes it available to every repository on this machine. Each new workspace gets a copy in .claude/skills/ and .agents/skills/, so Claude Code and Codex both find it. See Installing Skills from the Library.
code-review ships one file, SKILL.md, shown above.