Home / code-quality

Code Quality

Eight skills for keeping a codebase healthy: a review checklist, refactor planning, dead code and complexity reports, naming and error-handling audits, type coverage for Python and TypeScript, and a test gap finder.

Plugin code-quality, version 0.4.1, 8 skills, MIT licence. Source: claude-dev-skills. Synced .

Install

In Claude Code, add the marketplace and install the plugin:

/plugin marketplace add basitalisandhu/claude-skills
/plugin install code-quality@claude-skills

Or copy the skill files into ~/.claude/skills/ from a clone:

git clone https://github.com/basitalisandhu/claude-skills
cd claude-skills
python3 install.py --user --only code-quality

Skills

SkillWhat it doesScripts
complexity-reportRank the functions in a Python or JavaScript/TypeScript tree by cyclomatic complexity, length and nesting depth with a bundled script, then say which are most tangled and how to simplify them.yes
dead-code-finderShrink a codebase safely: a bundled script lists probably-unused functions, classes, unused methods and exports in a Python or JavaScript/TypeScript tree, each candidate is confirmed by searching for dynamic use, and the skill proposes a safe order to remove them.yes
error-handling-reviewReview how a service or library handles failures: places that swallow an exception, call out without a timeout or retry, errors without context, raw database or internal errors returned to users, inconsistent error types across layers; then propose one consistent error policy and strategy (which error types, what wraps what, what gets retried) with examples.no
naming-auditAudit function, variable, method and module names in a file or diff: are the names any good, consistent with how the project names things, or misleading names that lie about behaviour (a getter that creates), then propose renames with a migration path for public ones.no
refactor-planPlan a safe refactor of a module, package or large file as small, behaviour-preserving commits, with the tests that guard each step and a rollback point: split a 3000-line file into smaller units, untangle packages that import each other in a circle, or clean up code when behaviour must not change.no
review-checklistReview a pull request, diff, patch or branch against a fixed checklist (correctness, tests, error handling, security, performance, readability, compatibility) and give findings with file and line references and a verdict: approve or request changes.no
test-gap-finderFind the source modules that have no tests and prioritise which to cover first by risk: a bundled script maps modules to their tests by naming convention and imports and shows what is missing.yes
type-coverageMeasure how much of a Python or TypeScript codebase is type-annotated with a bundled script (parameter and return annotations per function, explicit any counts), count functions missing annotations, find the least-typed files, and plan a gradual typing rollout with a CI threshold.yes

Plugin README

Eight skills for keeping a codebase healthy: a fixed review checklist, refactor planning, dead code and complexity reports, naming and error-handling audits, type coverage for Python and TypeScript, and a test gap finder.

Find this when you search for: tech debt, code smells, cognitive complexity.

Install

/plugin marketplace add basitalisandhu/claude-dev-skills
/plugin install code-quality@claude-dev-skills

Skills then appear as /code-quality:<skill>. Scripts need Python 3.11 or newer on PATH as python3; they use the standard library only and make no network calls.

Skills

SkillTriggers onProduces
review-checklistreview a PR, diff or branchfindings table with severity and file:line, verdict
refactor-planrefactor, split, untangle, clean upordered behaviour-preserving steps with tests and rollback
dead-code-finderfind unused code, shrink the codebasedead_code_finder.py report, confirmed deletion list
complexity-reportmost complex code, where to start, CI thresholdcomplexity_report.py ranking with simplifications
naming-auditare these names clear, naming conventionsrenames grouped by cost, convention proposals
error-handling-reviewreview error handling, silent failuresfindings plus an error policy per layer
type-coveragehow typed is this, where to add typestype_coverage.py percentages and a ratchet plan
test-gap-finderwhat is untested, did the PR add teststest_gap_finder.py list of modules without tests, prioritised

Tests for every script live in the repository's tests/ directory; run python3 -m pytest -q at the repository root.

Sample output

test-gap-finder on a small package with shop/cart.py, shop/payments.py, shop/_mailer.py, an entry point shop/main.py, and tests/test_cart.py plus tests/test_mailer.py:

$ python3 "${CLAUDE_PLUGIN_ROOT}/skills/test-gap-finder/scripts/test_gap_finder.py" shop
test-gap-finder 0.1.0: 2/3 modules have a test by name or import (66.7%), 2 test files, 1 entry-point or config file(s) not counted
  no test: shop/payments.py
Name and import based. A module listed as covered may still have weak tests; one listed as uncovered may be exercised indirectly.
exit 0