bug-detector
Skill2 starsChanged 4 months agoMITView on GitHub
Detects bugs, logic errors, and edge case handling issues in code. Use when reviewing code for runtime errors, null/undefined handling, type errors, and edge cases. Returns structured bug reports with file paths, line numbers, and suggested fixes.
In this repository40 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-checkerSkill
- accessibility-design-checkerSkill
- agent-capability-assessorSkill
- agent-creatorSkill
- api-implementerSkill
- architecture-reviewerSkill
- best-practices-checkerSkill
- changelog-generatorSkill
- code-documentationSkill
- code-style-analyzerSkill
- color-system-designerSkill
- component-designerSkill
- component-implementerSkill
- config-setupSkill
- conflict-resolverSkill
- convert-to-extensionSkill
- database-implementerSkill
- design-systemSkill
- escalation-handlerSkill
- git-commit-helperSkill
- idea-refinerSkill
- implementation-plannerSkill
- import-formatterSkill
- interaction-designerSkill
- layout-designerSkill
- performance-analyzerSkill
- quality-gate-managerSkill
- requirement-analyzerSkill
- resource-allocation-optimizerSkill
- responsive-design-plannerSkill
- security-scannerSkill
- spacing-system-designerSkill
- specification-checkerSkill
- task-to-agent-matcherSkill
- team-health-checkerSkill
- technical-spec-writerSkill
- test-writerSkill
- typography-designerSkill
- utility-implementerSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Check for null/undefined handling
- Distinctive: line 13
Look for type errors and runtime exceptions
- Distinctive: line 14
Check for off-by-one errors
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bug Detector Skill
Instructions
- Analyze code for potential bugs and logic errors
- Check for null/undefined handling
- Identify edge cases that aren't handled
- Look for type errors and runtime exceptions
- Check for off-by-one errors
- Identify race conditions (if applicable)
- Return structured bug reports with:
- File path and line numbers
- Description of the bug
- Current problematic code
- Suggested fix with code example
- Reason why it's a bug
- Priority (Must-Fix, Should-Fix, Nice-to-Have)
Examples
Input: JavaScript function without null check Output:
### BUG-001
- **File**: `utils.js`
- **Lines**: 15-18
- **Priority**: Must-Fix
- **Issue**: Function will crash if items parameter is null or undefined
- **Current Code**:
```javascript
function calculateTotal(items) {
return items.reduce((sum, item) => sum + item.price, 0);
}- Suggested Fix:
function calculateTotal(items) { if (!items || !Array.isArray(items)) { return 0; } return items.reduce((sum, item) => sum + item.price, 0); } - Reason: Calling reduce on null/undefined will throw TypeError
## Bug Types to Detect
- **Null/Undefined Errors**: Missing null checks before operations
- **Type Errors**: Wrong data types used in operations
- **Logic Errors**: Incorrect algorithm implementation
- **Edge Cases**: Unhandled boundary conditions
- **Off-by-One Errors**: Array/index boundary mistakes
- **Race Conditions**: Concurrent access issues (if applicable)
- **Division by Zero**: Missing zero checks
- **Array/Collection Errors**: Accessing invalid indices
- **Missing Return Values**: Functions that should return but don't
- **Incorrect Comparisons**: Wrong comparison operators
## Priority Guidelines
- **Must-Fix**: Bugs that cause crashes or incorrect behavior
- **Should-Fix**: Bugs that cause minor issues or unexpected behavior
- **Nice-to-Have**: Potential issues that might cause problems in edge casesDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

