Code Bug and Vulnerability Analyzer
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_b130948c/code-bug-analyzer.
About this skill
Problem
When engineers ask a tool to review a code snippet, the issue is rarely only “is there a bug?” The same input may be a service module, a utility script, a frontend component, or a competitive programming solution. These cases have different priorities: engineering code needs checks for security, dependencies, edge handling, and maintainability, while contest code needs correctness, complexity, overflow, and judge-specific boundary behavior. A generic review template can produce vague advice.
How it works
The skill first performs code-type detection, then follows the matching analysis path:
- Engineering code: identifies language and context, checks logic defects, security issues, and code smells, and labels findings as
Critical/High/Medium/Low. The output explains the impact, shows a before/after fix comparison, and provides copy-ready replacement code with the reason for each change. - Contest code: identifies algorithmic patterns such as
DFS,BFS,DP, binary search, greedy, and graph algorithms, analyzes time and space complexity, checks empty input, negative values, large inputs, integer overflow, division by zero, and out-of-bounds access, and suggests complexity or constant-factor optimizations.
Supported inputs include pasted snippets, source file uploads, and code screenshots. Screenshots use OCR to extract text, but low-quality images may be flagged as unreliable.
Boundaries
This skill is useful for local code review and algorithm diagnostics, but it does not replace full SAST, fuzzing, unit tests, or production audits. It can only analyze the context provided by the user and cannot infer external dependencies, database schemas, or runtime environments automatically. When confidence is low, it should state uncertainty instead of guessing.
Use Cases
- Before a PR, locate SQL injection or unhandled exceptions and generate a ready-to-paste fix.
- While debugging contest code, identify DFS, DP, or binary search, then check complexity and overflow.
- Paste IDE screenshots or error logs to extract code and find empty-input, division-by-zero, or bounds issues.
- Review uploaded Python, JavaScript, or C++ files and get risk levels, impact notes, and fix comparisons.
Best For
- Backend engineers reviewing API code and needing risk-graded vulnerability fixes
- Competitive programmers checking complexity, boundaries, and constant-factor optimizations
- Full-stack developers maintaining multi-language scripts or pages and needing code defects located
- Engineers extracting code from screenshots and verifying edge-case handling
Related Skills
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Restores Lanhu designs to target framework code using schema JSON, design tokens, and image assets.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
Explains enterprise workflow configuration parameters, code lines, condition templates, and unsupported features with privacy-safe standard responses.