Code Analysis and Improvement Roadmaps
Paste the following prompt into your AI chat to install this skill:
Follow https://skillhub.cn/install/skillhub.md and install @user_15292d5a/yjkj-code-analysis.
About this skill
Problem
When a codebase grows and legacy modules accumulate, manual code review struggles to cover dependencies, complexity, performance hot spots, security boundaries, and test blind spots at the same time. code-analysis addresses this by turning scattered checks into a structured result set and a prioritized improvement roadmap.
How It Works
The skill reads the provided code files or directory, then selects one or more analysis dimensions based on the request:
- Knowledge Graph Generation: maps component relationships, dependency paths, and architectural patterns.
- Code Quality Evaluation: focuses on cyclomatic complexity, cognitive complexity, maintainability, technical debt, and duplication.
- Performance Analysis: identifies bottlenecks, memory usage patterns, algorithmic complexity, and database query optimization suggestions.
- Security Review: checks vulnerabilities, input validation, authentication/authorization, and sensitive data handling.
- Architecture Review: assesses design pattern adherence, SOLID compliance, coupling/cohesion, and module boundaries.
- Test Coverage Analysis: reports coverage, untested paths, test quality, and missing edge cases.
It then produces a comprehensive report and ranks optimization items by business impact and maintenance cost. It is best treated as an analysis assistant rather than an automatic fixer; result quality depends on the completeness of the input code and the project context supplied.
Use Cases
- After taking over an unfamiliar repository, map module dependencies, architecture patterns, and technical debt before prioritizing refactors.
- Before release, review input validation, authentication/authorization, and sensitive data vulnerabilities, then produce actionable fixes.
- When optimizing API latency, pinpoint algorithmic complexity, memory usage patterns, and database query bottlenecks.
- Before expanding test coverage, identify untested paths, missing edge cases, and high-risk code modules.
Best For
- Backend engineers maintaining legacy services who need to assess complexity, technical debt, and refactoring priority quickly.
- Engineering leads responsible for release security reviews who need input validation, authentication, and sensitive data checks in a report.
- SREs or backend engineers preparing performance work who need to locate memory, algorithm, and database query bottlenecks.
- QA engineers building test strategies who need to identify uncovered paths and missing edge cases.
Related Skills
Automatically indexes Gradle-cached AAR/JAR dependency classes and returns library coordinates, versions, and public APIs by fully qualified name, using only the Python standard library.
Codifies AMT and YourMT3 training conventions, script patterns, hyperparameters, precision, checkpoints, and NaN safeguards.
Retrieve relevant chunks from a customer-managed PKM dataset by dataset_id and return concise, source-annotated answers.
Convert PRDs, user stories, or functional specs into prioritized test-point checklists covering functional, business-rule, boundary, exception, and non-functional dimensions.