modules/home/programs/cli-agents/shared/skills/bug-finder/SKILL.md
Find bugs and verify correctness in code changes. Use when reviewing a PR, staged diff, or specific code the user points at. Hunts for logic errors, security flaws, race conditions, resource leaks, and API misuse. Produces evidence-based findings with concrete failure scenarios. Does NOT flag style, formatting, or naming issues.
npx skillsauth add not-matthias/dotfiles-nix bug-finderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find bugs. Verify correctness. Ignore style.
Iron law: never report a bug without a concrete trigger, a real failure mode, and a severe consequence.
Hard cap: 15 findings max per review. If you find more, keep only the highest severity. Inflation erodes trust.
Hunt these (ordered by severity):
Ignore these (they belong to linters and minimal-diff):
Adapt to what the user gives you:
gh pr diff. Read the PR description. Identify what the change is supposed to do.git diff --staged (or git diff for unstaged). Understand the intent from recent commits or user description.Before hunting, identify the critical paths — code that handles auth, payments, data writes, user input, or concurrency. These get the most scrutiny.
Scope rule for diff-based reviews: only flag issues in changed or new code. Pre-existing issues in untouched code are out of scope unless the change makes them reachable in a new way.
Walk through the code change systematically. For each issue found, record:
file:line)The failure scenario is mandatory. If you cannot construct one, the finding is not real — drop it.
Boundary analysis:
Feynman technique — for each non-obvious function or block, ask:
Flow-divergence analysis — look for two code paths that should behave identically but don't. Check: do both paths handle errors the same way? Do both paths update the same state? If one path has a guard, should the other?
For language-specific pitfalls, consult the references:
Re-examine every finding. For each one, ask:
Common false-positive anti-patterns — drop findings that match these:
Drop any finding that fails the skeptic check. False positives waste the user's time and erode trust.
Assign severity to surviving findings:
| Severity | Meaning | Examples | |----------|---------|---------| | CRITICAL | Will break in production. Data loss, security breach, crash. | SQL injection, use-after-free, auth bypass | | HIGH | Likely to break under realistic conditions. | Race condition on shared state, missing null check on user input | | MEDIUM | Breaks under edge cases or degrades correctness. | Off-by-one in pagination, resource leak on error path | | LOW | Unlikely to cause user-visible issues but still wrong. | Redundant check, minor perf issue on cold path |
Output findings sorted by severity (worst first). One line per finding:
file:line — [CRITICAL] Description. Breaks when: scenario.
file:line — [HIGH] Description. Breaks when: scenario.
End with a summary line:
N findings: X critical, Y high, Z medium, W low
If zero findings survive the skeptic pass, say so:
No issues found.
Issue: Too many findings — review feels noisy.
Issue: User disagrees with a finding.
Issue: Not enough context to judge correctness.
development
Emulates not-matthias's technical blog writing style. Use when writing blog posts, technical articles, README content, or any long-form technical prose. Produces investigation-driven, first-person narratives with dry humor, practical code examples, and concrete takeaways.
development
Create and manage Git worktrees for parallel feature development. Use when user wants to work on multiple features simultaneously or needs isolated development environments.
development
Systematic technical research and brainstorming. Given a question, recursively explores attached specifications, source code, documentation, GitHub repositories, and authoritative online sources to build comprehensive, accurate answers. Surfaces edge cases, caveats, and implementation details that matter.
development
Converts a research paper (PDF path, uploaded PDF, or URL) into a reusable skill that stores distilled knowledge for future sessions. Use when a user asks to "turn this paper into a skill", "make this PDF reusable", "encode this research", or wants project-specific decisions backed by a specific paper without re-uploading it.