Preface¶
Before committing code, you often need to switch between two kinds of tasks: on the engineering side you check for SQL injection, credential leaks, and exception handling; on the competitive programming side you watch for complexity, edge cases, and causes of WA. General conversational models can give broad suggestions, but they rarely classify by risk level, attach before/after fix comparisons, or simultaneously cover “security review” and “algorithm diagnosis.” This article introduces the community Skill on SkillHub, “Code Vulnerability and BUG Analysis Tool,” which distinguishes competitive and engineering scenarios within the same workflow, outputs fixes directly during analysis, and emphasizes runnable, reusable outputs during generation.
What Is This¶
Code Vulnerability and BUG Analysis Tool (identifier @user_b130948c/code-bug-analyzer, version 1.0.0) is a community skill in the SkillHub category dev-programming, published by user_b130948c, tagged requires_api_key=false, so no additional API key is required.
Official page: https://www.skillhub.cn/skills/user_b130948c/code-bug-analyzer
API URL: https://api.skillhub.cn/user_b130948c/code-bug-analyzer
Positioning can be summarized as: it helps write code and also review existing code; it automatically recognizes competitive or engineering scenarios; generation focuses on directly runnable outputs; analysis focuses on directly copyable fixes.
Core Functions¶
Code Analysis¶
Engineering Code Review¶
- Automatically identifies the programming language.
- Scans for security vulnerabilities and code defects, labeling risk in four levels: Critical, High, Medium, Low.
- For each issue, explains: the problem, possible consequences, and the fix, and provides a before/after comparison; fix code can be copied directly.
- Coverage items officially listed include: SQL injection, resource leaks, plaintext passwords, hardcoded credentials, improper exception handling, and more.
Competitive Code Diagnosis¶
- Automatically identifies the algorithm type.
- Provides time and space complexity analysis.
- Detects edge cases likely to cause WA: empty input, integer overflow, large datasets, multiple edges, etc.
- Reconstructs the problem-solving approach and offers specific optimization directions.
Code Generation¶
Competitive Algorithms (C++ by default)¶
Covers segment trees, Fenwick (Binary Indexed) trees, union-find, KMP, tries, Dijkstra, knapsack DP, fast exponentiation, matrix exponentiation, etc. Each code sample annotates complexity, applicable scenarios, and interface usage. For the same algorithm, both basic and advanced versions are provided (e.g., lazy propagation for segment trees, range updates for Fenwick trees). The built-in algorithm knowledge base includes a complexity quick reference, sorting comparisons, graph theory templates, DP taxonomies, and string/math algorithms.
Engineering Code¶
Automatically selects languages and frameworks by domain, covering nine areas: Web backend, frontend, mobile, data science, scripting tools, game development, embedded systems, DevOps, and databases. Generated code includes error handling, security protections, and type annotations. The template library spans Python, JS/TS, Java, Go, as well as secure coding standards, RESTful API design, and database operations.
When requirements are unclear, it will provide both competitive and engineering solutions, indicating default languages and applicable scenarios for you to choose.
Input Methods¶
Supports four modes: paste code snippets, upload code files, screenshot with OCR to extract code, natural language description of requirements.
Design Philosophy (Official Statement)¶
- Honesty: If uncertain, state so; do not guess or fabricate.
- Security first: Engineering code always considers security; analysis focuses on vulnerability review.
- Complexity awareness: Competitive code focuses on time and space constraints and provides complexity analysis.
- Directly reusable: Generated code includes complete interface documentation; analyzed fixes are directly copyable.
Installation and Activation¶
The installation prompt provided on the SkillHub page is: first follow the official installation documentation, then install this skill identifier.
Please install `@user_b130948c/code-bug-analyzer` according to https://skillhub.cn/install/skillhub.md.
1. Check or Install the SkillHub CLI¶
First confirm whether skillhub exists on your machine:
command -v skillhub && skillhub --version
If it is not installed, you can follow the SkillHub documentation to run a full installation (CLI + default Skill):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
To install only the CLI:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
2. Install into the Current Agent’s skills Directory¶
When installing the skill, you must use --dir to point to the skills directory recognized by your Agent; installing to the default ./skills/ may not be loaded and typically requires a client restart.
skillhub install user_b130948c/code-bug-analyzer --dir <skills directory>
Common paths (from the SkillHub installation documentation):
| Environment | skills directory |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ under the project |
Example in Cursor:
skillhub install user_b130948c/code-bug-analyzer --dir ~/.cursor/skills/
Alternatively, send the above “Please install according to skillhub.md” prompt in a conversation so the Agent can complete the installation per the documentation; whether a restart is required depends on your client.
Typical Usage¶
Official guidance: use this Skill when the user submits code for review, looks for vulnerabilities, or analyzes algorithms. Below are directly reproducible interactions (consistent with the official input methods).
Engineering: Paste a Fragment for Security Review¶
In a conversation with the Skill enabled, paste the code to review and specify intent, e.g.:
Please use the Code Vulnerability and BUG Analysis Skill to review the following backend code, list issues by Critical/High/Medium/Low, include consequences and fixes, and provide before/after comparisons.
(Paste code here)
Expected output shape (per official capabilities): language identification, risk-graded list, each item including a fix plan and copyable fixed code.
Competitive: Diagnose WA and Complexity¶
This competitive code keeps getting WA. Please identify the algorithm type, analyze time/space complexity, check edge cases such as empty input, overflow, large datasets, and multiple edges, and give optimization directions.
(Paste code or upload file here)
Generation: Describe Requirements in Natural Language¶
I need a C++ template for a Fenwick tree that supports range updates, with complexity annotations, interface usage, and both a basic and a range-update version.
Or for engineering:
Write a Go skeleton for a RESTful user login API with error handling and security validation; explain types and basic protection measures.
Screenshot OCR¶
Upload screenshots from an IDE or problem statement, and state “extract code from the screenshot and perform a vulnerability scan” or “extract then run competitive diagnosis,” aligning with the OCR path among the four official input methods.
Applicable Scenarios and Notes¶
Who It’s For
- Developers who need a structured security and defect scan before a PR or delivery.
- Contestants in algorithm competitions who need complexity explanations and edge-case checks.
- Teams who want a single Skill to switch between “writing templates/business skeletons” and “reviewing code” without maintaining multiple prompt sets.
Usage Notes
- Source and version: Community-sourced; the current page version is 1.0.0. To upgrade, use
skillhubunder the appropriate--dirfollowing the SkillHub process (per documentation). - Not a replacement for formal security audits: The Skill’s output is suitable for assisting in discovering common issues, but it is not equivalent to penetration testing, compliance audits, or CI static analysis pipelines.
- OCR and screenshots: Recognition errors may affect analysis conclusions; for critical logic, it is recommended to paste or upload source files.
- Honesty principle: Officially emphasizes not guessing when uncertain; for high-risk fixes, it is still recommended to run tests locally and perform code review.
- Page data: In the SkillHub fetched data, the rating is 100000 and downloads are approximately 4070 (subject to page display; values change over time).
Closing¶
Code Vulnerability and BUG Analysis Tool consolidates engineering-side graded vulnerability explanations, competitive-side complexity and boundary diagnosis, and code generation for both sides into a single Skill. The installation identifier is @user_b130948c/code-bug-analyzer, with no API key required. If you frequently switch between review, vulnerability hunting, and algorithm analysis, you can install it from the official page and pin it to the skills directory in environments like Cursor.
Official URL: https://api.skillhub.cn/user_b130948c/code-bug-analyzer
SkillHub page: https://www.skillhub.cn/skills/user_b130948c/code-bug-analyzer