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.
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
| Skill | What it does | Scripts |
|---|---|---|
| complexity-report | Rank 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-finder | Shrink 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-review | Review 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-audit | Audit 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-plan | Plan 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-checklist | Review 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-finder | Find 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-coverage | Measure 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
| Skill | Triggers on | Produces |
|---|---|---|
review-checklist | review a PR, diff or branch | findings table with severity and file:line, verdict |
refactor-plan | refactor, split, untangle, clean up | ordered behaviour-preserving steps with tests and rollback |
dead-code-finder | find unused code, shrink the codebase | dead_code_finder.py report, confirmed deletion list |
complexity-report | most complex code, where to start, CI threshold | complexity_report.py ranking with simplifications |
naming-audit | are these names clear, naming conventions | renames grouped by cost, convention proposals |
error-handling-review | review error handling, silent failures | findings plus an error policy per layer |
type-coverage | how typed is this, where to add types | type_coverage.py percentages and a ratchet plan |
test-gap-finder | what is untested, did the PR add tests | test_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