dicklesworthstone/ultimate_bug_scanner/ultimate-bug-scanner
Claude Code and agent skill by dicklesworthstone/ultimate_bug_scanner
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Ultimate Bug Scanner - Pre-commit static analysis for AI coding workflows. 14 languages, including bounded PHP request-flow and PostgreSQL migration analysis, with language-specific detection categories and native or ast-grep analysis. The AI agent's quality gate.
Install
npx vskill@latest install dicklesworthstone/ultimate_bug_scanner/ultimate-bug-scannerSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
UBS - Ultimate Bug Scanner
Static analysis tool built for AI coding workflows. Catches bugs that AI agents commonly introduce: null safety, async/await issues, security holes, memory leaks. Scans JS/TS, Python, Go, Rust, Java, Kotlin, C/C++, Ruby, Swift, C#, Elixir, Bash, and PHP. PHP covers request-derived SQL, command/code execution, includes, deserialization, and unsafe output; it does not provide the async or lifecycle coverage of other modules. Single-file scans take a few seconds; scope scans to changed files (see Speed Tips).
Why This Exists
AI agents move fast. Bugs move faster. You're shipping features in minutes, but:
- Null pointer crashes slip through
- Missing
awaitcauses silent failures - XSS vulnerabilities reach production
- Memory leaks accumulate
UBS is the quality gate: scan before commit, fix before merge.
Golden Rule
Exit 0 = safe to commit. Exit 1 = fix and re-run.
Essential Commands
Quick Scans (Use These)
Full Project Scans
CI/CD Mode
Output Format
Parse: file:line:col → location | 💡 → how to fix | Exit 0/1 → pass/fail
Detection Categories (coverage and numbers differ per module; PHP has five categories, so prefer --skip-<lang>=N)
Critical (Always Fix)
| Category | What It Catches | |
|---|---|---|
| Null Safety | Unguarded property access, missing null checks | |
| Security | XSS, injection, prototype pollution, hardcoded secrets | |
| Async/Await | Missing await, unhandled rejections, race conditions | |
| Memory Leaks | Event listeners without cleanup, timer leaks | |
| Type Coercion | == vs ===, parseInt without radix, NaN comparison |
Important (Production Risk)
| Category | What It Catches | |
|---|---|---|
| Division Safety | Division without zero check | |
| Resource Lifecycle | Unclosed files, connections, context managers | |
| Error Handling | Empty catch blocks, swallowed errors | |
| Promise Chains | .then() without .catch() | |
| Array Mutations | Mutating during iteration |
Code Quality (Contextual)
| Category | What It Catches | |
|---|---|---|
| Debug Code | console.log, debugger, print() statements | |
| TODO Markers | TODO, FIXME, HACK comments | |
| Type Safety | TypeScript any usage | |
| Readability | Complex ternaries, deep nesting |
Language-Specific Detection
| Language | Key Patterns | |
|---|---|---|
| JavaScript/TypeScript | innerHTML XSS, eval(), missing await, React hooks deps | |
| Python | eval(), open() without with, missing encoding=, None checks | |
| Go | Nil pointer, goroutine leaks, defer symmetry, context cancel | |
| Rust | .unwrap() panics, unsafe blocks, Option handling | |
| Java | Resource leaks (try-with-resources), null checks, JDBC | |
| C/C++ | Buffer overflows, strcpy(), memory leaks, use-after-free | |
| Ruby | eval(), send(), instance_variable_set | |
| Swift | Force unwrap (!), ObjC bridging issues |
Profiles
Category Packs (Focused Scans)
Narrows scan to relevant languages and suppresses unrelated categories.
Comparison Mode (Regression Detection)
Useful for CI to detect regressions vs. main branch.
Output Formats
| Format | Flag | Use Case | |
|---|---|---|---|
| text | (default) | Human-readable terminal output | |
| json | --format=json | Machine parsing, scripting | |
| jsonl | --format=jsonl | Line-delimited, streaming | |
| sarif | --format=sarif | GitHub code scanning | |
| html | --html-report=file.html | PR attachments, dashboards |
Inline Suppression
When a finding is intentional, put ubs:ignore in a comment on the flagged line or on the line directly above it (there is no ubs:ignore-next-line marker):
Exit Codes
| Code | Meaning | |
|---|---|---|
0 | No critical issues (safe to commit) | |
1 | Critical issues or warnings (with --fail-on-warning) | |
2 | Environment or usage error (unknown flag, missing ast-grep, unverified module/helper, timeout) | |
3 | Nothing was scanned (no supported language) — not a pass |
Doctor Command
Checks: checksum tool, curl/wget, writable module cache, ast-grep, the toon encoder (--format=toon), and module + helper checksums (refreshed with --fix).
Agent Integration
UBS auto-configures hooks for coding agents during install:
| Agent | Hook Location | |
|---|---|---|
| Claude Code | .claude/hooks/on-file-write.sh | |
| Cursor | .cursor/rules | |
| Codex CLI | .codex/rules/ubs.md | |
| Gemini | .gemini/rules | |
| Windsurf | .windsurf/rules | |
| Cline | .cline/rules |
Claude Code Hook Pattern
The installer registers .claude/hooks/on-file-write.sh as a PostToolUse hook on Edit|Write|MultiEdit (and git_safety_guard.py as a PreToolUse hook on Bash) in .claude/settings.json. The hook reads the tool call from stdin and scans only the file that was written; critical findings come back to Claude as feedback (exit 2):
Git Pre-Commit Hook
Performance
10,000+ lines per second. Use --jobs=N to control parallelism.
Speed Tips
- Scope to changed files:
ubs src/file.ts(< 1s) vsubs .(30s) - Use --staged or --diff: Only scan what you're committing
- Language filter:
--only=js,pythonskips irrelevant scanners - Skip categories:
--skip=11,14to skip debug/TODO markers
Fix Workflow
Bug Severity Guide
- Critical (always fix): Null safety, XSS/injection, async/await, memory leaks
- Important (production): Type narrowing, division-by-zero, resource leaks
- Contextual (judgment): TODO/FIXME, console logs
Common Anti-Patterns
| Don't | Do | |
|---|---|---|
| Ignore findings | Investigate each | |
| Full scan per edit | Scope to changed files | |
Fix symptom (if (x) { x.y }) | Fix root cause (x?.y) | |
| Suppress without understanding | Verify false positive first |
Installation
Custom AST Rules
Excluding Paths
Auto-ignored: node_modules, .venv, dist, build, target, editor caches.
Session Logs
Integration with Flywheel
| Tool | Integration | |
|---|---|---|
| BV | --beads-jsonl=out.jsonl exports findings for Beads | |
| CASS | Search past sessions for similar bug patterns | |
| CM | Extract rules from UBS findings | |
| Agent Mail | Notify agents of scan results | |
| DCG | UBS runs inside DCG protection |
Troubleshooting
| Error | Fix | |
|---|---|---|
| "Environment error" (exit 2) | ubs doctor --fix | |
Partial: [ANALYSIS_INCOMPLETE] (exit 2) | An analyzer hit a coverage limit, not a tooling problem; ubs doctor --fix cannot help. Read the reason (text output or failed_modules[].message in JSON); UBS_ALLOW_PARTIAL=1 accepts the partial result | |
| "ast-grep not found" | brew install ast-grep or cargo install ast-grep | |
| Too many false positives | Use --skip=N or // ubs:ignore | |
| Slow scans | Scope to files: ubs <file> not ubs . |
Security
- Security scanPassed, 40 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingSKILL.md
Popularity
- Repository stars
- 177
- Repository forks
- 28
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 8 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dicklesworthstone/ultimate_bug_scanner/ultimate-bug-scanner)