code-quality

Detect duplicates, unused dependencies, and high-complexity regions in JavaScript and TypeScript codebases.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/tylermorganme/crop_plan_2025 --skill code-quality-tylermorganme
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-quality
Source: https://github.com/tylermorganme/crop_plan_2025/tree/main/.claude/skills/code-quality
Command: npx skills add https://github.com/tylermorganme/crop_plan_2025 --skill code-quality-tylermorganme

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates code quality checks to surface duplicated code, unused dependencies, and high-complexity areas, reducing maintenance time and debugging effort.

Core Features & Use Cases

  • Duplication Detection: Uses jscpd to find copy-pasted blocks across the codebase.
  • Unused Dependencies: Uses depcheck to identify packages that are not imported or used.
  • Complexity Analysis: Scans code to flag functions with high cyclomatic complexity.
  • Use Case: Before a release, run these checks to quickly identify hotspots and cleanup opportunities in a JavaScript/TypeScript project.

Quick Start

Run the following from project root to execute all checks: node .claude/skills/code-quality/scripts/check-duplication.js crop-api/src --threshold 5 --min-lines 10 node .claude/skills/code-quality/scripts/check-deps.js crop-api node .claude/skills/code-quality/scripts/check-complexity.js crop-api/src --max-complexity 10

Frequently Asked Questions about code-quality

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

FAQPage Schema
How do I find duplicated code and unused dependencies in a JavaScript project?

To check code quality in a JavaScript project, run automated Node.js scripts that scan source files to identify duplicates, unused dependencies, and high-complexity areas. This reduces maintenance time and debugging effort before releases.

How do I detect unused npm dependencies in a TypeScript codebase?

To detect unused npm dependencies in a TypeScript codebase, use the depcheck tool via Node.js. It scans the project to identify packages that are not imported or used, emitting actionable findings for cleanup.

What is the best way to analyze cyclomatic complexity in JavaScript files?

The best way to analyze cyclomatic complexity in JavaScript files is using a simple complexity analyzer via Node.js. It scans source code to flag functions with high cyclomatic complexity, helping pinpoint cleanup hotspots.

Can I run static analysis checks for code duplication in a CI pipeline?

Yes, you can run static analysis checks for code duplication in a CI pipeline. The automated Node.js tooling uses jscpd to scan source files and identify copy-pasted blocks, making it suitable for pre-release audits and continuous integration workflows.

Does this code quality tooling require any external dependencies to run?

No, this code quality tooling does not require external dependencies to install. It leverages Node.js tooling through npx commands, executing jscpd, depcheck, and a complexity analyzer directly on your JavaScript or TypeScript source files.