Find bugs in branch changes
Reviews the commits on the current branch for security holes, bugs and quality issues with an eleven-item checklist and reports verified findings with file, line, severity and fix, without editing code. Use when you want a security-first pass before a PR.
find-bugs- Author
- Sentry
- Source
- getsentry/skills/skills/find-bugs @ a582c51
- License
- Apache-2.0 · Copyright 2025 Functional Software, Inc. dba Sentry
About this skill
What it does
The skill reviews the commits on the current branch and reports bugs, security holes and quality problems without touching the code. It reads the whole git diff <default>...HEAD, file by file if the output is cut off. For each changed file it first maps the attack surface — user input, database queries, auth checks, session state, external calls, cryptography — and then runs an eleven-item checklist: injection, XSS, authentication, authorization and IDOR, CSRF, race conditions, sessions, cryptography, information disclosure, DoS, business logic.
A suspected issue is checked before it is reported: is it handled elsewhere in the change, does a test cover it, does the surrounding code confirm it. Before the verdict the agent lists the files it read in full, the outcome of every checklist item and what it could not verify. Findings are ordered security, bugs, quality, each with file and line, a severity from Critical to Low, the problem, the evidence, a fix and, where relevant, an OWASP or RFC reference. Style is skipped, and an empty report is a valid result.
The folder holds only SKILL.md and the licence.
When to use it, and when not
Use it on a feature branch before a PR, when you want a security-first pass with a record of what was checked.
It sees committed work only. It needs an authenticated gh to find the default branch. It fixes nothing — the instructions end with "I'll decide what to address" — and has nothing to say about design or naming.
How to run it
The install command below puts the folder in place. The agent picks the skill up by its description when asked to find bugs or review the branch; to call it yourself:
- Claude Code:
/find-bugs, or ask for the skill by name. - Codex:
$find-bugs. - Cursor: type
/in the Agent chat and pickfind-bugs.
Example: /find-bugs Check this branch before I open the PR, especially the new export endpoint.
How it differs from similar skills
Code review, Sentry practices from the same pack is the general reviewer: design, tests, tone of comments, when to approve. Security review, Sentry goes deeper into vulnerabilities, with per-topic references, data-flow tracing and only high-confidence findings; find-bugs is a lighter checklist that also catches ordinary bugs. PR review from our catalog puts correctness first and wants a concrete failure scenario for every bug; find-bugs starts from security and goes item by item. Security review from our catalog covers security only: it traces each untrusted input the change touches to a dangerous sink and reports only findings with an attacker, an input and an outcome. Self-review before PR is the author's pass before opening the PR: it also reads uncommitted and untracked files and checks debug leftovers, scope and migrations.
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/find-bugs/SKILL.md https://anymodel.org/en/skills/sentry/find-bugs/SKILL.md -o ~/.claude/skills/find-bugs/LICENSE https://anymodel.org/en/skills/sentry/find-bugs/LICENSE
curl -fsSL --create-dirs -o ~/.agents/skills/find-bugs/SKILL.md https://anymodel.org/en/skills/sentry/find-bugs/SKILL.md -o ~/.agents/skills/find-bugs/LICENSE https://anymodel.org/en/skills/sentry/find-bugs/LICENSE
foreach ($f in 'SKILL.md','LICENSE') { $p = Join-Path "$HOME\.claude\skills\find-bugs" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/sentry/find-bugs/$f" -UseBasicParsing -OutFile $p }foreach ($f in 'SKILL.md','LICENSE') { $p = Join-Path "$HOME\.agents\skills\find-bugs" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/sentry/find-bugs/$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/find-bugs/SKILL.md
SKILL.md
Find Bugs
Review changes on this branch for bugs, security vulnerabilities, and code quality issues.
Phase 1: Complete Input Gathering
- Get the FULL diff:
git diff $(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')...HEAD - If output is truncated, read each changed file individually until you have seen every changed line
- List all files modified in this branch before proceeding
Phase 2: Attack Surface Mapping
For each changed file, identify and list:
- All user inputs (request params, headers, body, URL components)
- All database queries
- All authentication/authorization checks
- All session/state operations
- All external calls
- All cryptographic operations
Phase 3: Security Checklist (check EVERY item for EVERY file)
- Injection: SQL, command, template, header injection
- XSS: All outputs in templates properly escaped?
- Authentication: Auth checks on all protected operations?
- Authorization/IDOR: Access control verified, not just auth?
- CSRF: State-changing operations protected?
- Race conditions: TOCTOU in any read-then-write patterns?
- Session: Fixation, expiration, secure flags?
- Cryptography: Secure random, proper algorithms, no secrets in logs?
- Information disclosure: Error messages, logs, timing attacks?
- DoS: Unbounded operations, missing rate limits, resource exhaustion?
- Business logic: Edge cases, state machine violations, numeric overflow?
Phase 4: Verification
For each potential issue:
- Check if it's already handled elsewhere in the changed code
- Search for existing tests covering the scenario
- Read surrounding context to verify the issue is real
Phase 5: Pre-Conclusion Audit
Before finalizing, you MUST:
- List every file you reviewed and confirm you read it completely
- List every checklist item and note whether you found issues or confirmed it's clean
- List any areas you could NOT fully verify and why
- Only then provide your final findings
Output Format
Prioritize: security vulnerabilities > bugs > code quality
Skip: stylistic/formatting issues
For each issue:
- File:Line - Brief description
- Severity: Critical/High/Medium/Low
- Problem: What's wrong
- Evidence: Why this is real (not already fixed, no existing test, etc.)
- Fix: Concrete suggestion
- References: OWASP, RFCs, or other standards if applicable
If you find nothing significant, say so - don't invent issues.
Do not make changes - just report findings. I'll decide what to address.
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