Find bugs, security vulnerabilities, and code quality issues in local branch changes. Use when asked to review changes, find bugs, security review, or audit code on the current branch. Use when this capability is needed.
Review changes on the current branch for bugs, security vulnerabilities, and code quality issues.
Important: Gather any relevant context (project conventions, related code, what the changes are meant to do), then delegate the full review below to a subagent. Pass the subagent the diff, the list of changed files, and any context that would help it distinguish intentional behavior from bugs.
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.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: find-bugs3description: Find bugs, security vulnerabilities, and code quality issues in local branch changes. Use when asked to review changes, find bugs, security review, or audit code on the current branch. Use when this capability is needed.4---56# Find Bugs78Review changes on the current branch for bugs, security vulnerabilities, and code quality issues.910**Important:** Gather any relevant context (project conventions, related code, what the changes are meant to do), then delegate the full review below to a subagent. Pass the subagent the diff, the list of changed files, and any context that would help it distinguish intentional behavior from bugs.1112## Phase 1: Complete Input Gathering13141. Determine the base branch:15 - Try `gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'`16 - If that fails, fall back to `main` or `master` (whichever exists)172. Gather all changes to review:18 - Committed branch diff: `git diff <base>...HEAD`19 - Staged local diff: `git diff --cached`20 - Unstaged local diff: `git diff`21 - Untracked files: `git ls-files --others --exclude-standard`223. If any output is truncated, read each changed file individually until you have seen every changed line.234. Build one unified file list from committed, staged, unstaged, and untracked changes before proceeding.2425## Phase 2: Attack Surface Mapping2627For each changed file, identify and list:2829- All user inputs (request params, headers, body, URL components)30- All database queries31- All authentication/authorization checks32- All session/state operations33- All external calls34- All cryptographic operations3536## Phase 3: Data Flow Analysis3738Trace untrusted data across function and file boundaries:3940- For each user input identified in Phase 2, follow it through the code until it is consumed (rendered, queried, stored, returned, logged).41- Flag any path where the data is used without validation or sanitization.42- Note cases where data crosses a trust boundary (e.g., user input passed to a different module that assumes it's safe).4344## Phase 4: Security Checklist (check EVERY item for EVERY file)4546- [ ] **Injection**: SQL, command, template, header injection47- [ ] **XSS**: All outputs in templates properly escaped?48- [ ] **Authentication**: Auth checks on all protected operations?49- [ ] **Authorization/IDOR**: Access control verified, not just auth?50- [ ] **CSRF**: State-changing operations protected?51- [ ] **Race conditions**: TOCTOU in any read-then-write patterns?52- [ ] **Session**: Fixation, expiration, secure flags?53- [ ] **Cryptography**: Secure random, proper algorithms, no secrets in logs?54- [ ] **Information disclosure**: Error messages, logs, timing attacks?55- [ ] **DoS**: Unbounded operations, missing rate limits, resource exhaustion?56- [ ] **Business logic**: Edge cases, state machine violations, numeric overflow?5758## Phase 5: Verification5960For each potential issue:6162- Check if it's already handled elsewhere in the changed code63- Search for existing tests covering the scenario64- Read surrounding context to verify the issue is real6566## Phase 6: Pre-Conclusion Audit6768Before finalizing:69701. List every file you reviewed and confirm you read it completely712. List every checklist item and note whether you found issues or confirmed it's clean723. List any areas you could NOT fully verify and why734. Only then provide your final findings7475## Output Format7677**Prioritize**: security vulnerabilities > bugs > code quality7879**Skip**: stylistic/formatting issues8081For each issue:8283- **File:Line** — Brief description84- **Severity**: Critical / High / Medium / Low85- **Problem**: What's wrong86- **Evidence**: Why this is real (not already fixed, no existing test, etc.)87- **Fix**: Concrete suggestion88- **References**: OWASP, RFCs, or other standards if applicable8990If you find nothing significant, say so — don't invent issues.9192Do not make changes — just report findings.9394---95> Converted and distributed by [TomeVault](https://tomevault.io/claim/cthacker) — claim your Tome and manage your conversions.96<!-- tomevault:4.0:skill_md:2026-04-13 -->
Run npx skillmds@latest add tomevault-io/find-bugs in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Find bugs, security vulnerabilities, and code quality issues in local branch changes. Use when asked to review changes, find bugs, security review, or audit code on the current branch. Use when this capability is needed. It is listed under Security on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.