code-quality

Analyze code quality and propose refactoring improvements across common programming languages.

8|1|Updated Nov 8, 2025
One-click install
npx skills add https://github.com/wutongci/agentdemo --skill code-quality-wutongci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-quality
Source: https://github.com/wutongci/agentdemo/tree/main/backend/skills-package/skills/code-quality
Command: npx skills add https://github.com/wutongci/agentdemo --skill code-quality-wutongci

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automatically identifies common code quality problems and suggests concrete improvements to reduce bugs and maintenance costs.

Core Features & Use Cases

  • Complexity analysis: Suggests reducing cyclomatic and cognitive complexity with refactoring.
  • Duplication detection: Highlights and eliminates code duplication.
  • Quality improvements: Recommends naming, error handling, and testing improvements.

Quick Start

Please run a code-quality check on the repository and provide actionable refactoring suggestions.

Frequently Asked Questions about code-quality

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify and reduce cyclomatic complexity in my code?

Cyclomatic complexity measures code branching; reducing it simplifies logic and lowers bug risk. This Skill analyzes your code to detect high-complexity functions and suggest refactoring patterns—breaking nested conditionals into smaller functions or extracting decision logic—across Python, Java, JavaScript, and other common languages.

What's the best way to detect code duplication across a repository?

Code duplication increases maintenance burden and bug surface. This Skill scans your codebase to highlight duplicated blocks, functions, and patterns, then proposes consolidation strategies—extracting shared logic into utilities or base classes—to reduce redundancy and improve consistency.

How can I improve error handling and resource management during code review?

Weak error handling and resource leaks cause production failures. This Skill reviews your code for missing exception handlers, unclosed resources, and improper cleanup, recommending try-catch patterns, finally blocks, and resource-management practices tailored to your language and framework.

Can I enforce function length and parameter count limits automatically?

Long functions and excessive parameters reduce readability and testability. This Skill applies measurable thresholds for function size and parameter counts, identifying violations and suggesting refactoring—splitting functions or using parameter objects—to keep code maintainable.

Does code-quality analysis work with my existing CI/CD pipeline?

Yes. This Skill integrates into code review workflows and analysis tasks without requiring special setup. It works across common programming languages and provides actionable feedback during development, fitting directly into your existing review and refactoring practices.

What naming and documentation improvements can reduce maintenance costs?

Unclear names and missing comments slow onboarding and introduce bugs during refactoring. This Skill evaluates naming conventions, identifies ambiguous identifiers, and flags under-commented logic, recommending clearer variable names and essential documentation to improve code clarity.