Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

code-quality-audit

БесплатноБез исполняемых скриптовНе проверен

Run code quality audits covering test coverage, cyclomatic complexity, module sizes, dependency structure (cycles, fan-in/out), and mutation testing. Produces…

mhylleот mhylle★ 20 звёзд на GitHub

Об этом скилле

Code Quality Audit

Contents

Reference files (open one when a step points to it):

  • references/javascript.md: JavaScript / Node.js — code quality audit reference
  • references/python.md: Python — code quality audit reference
  • references/typescript.md: TypeScript / Node.js — code quality audit reference

Systematic audit of a codebase along five axes: test coverage, cyclomatic complexity, module size, dependency structure, and mutation testing. Produces a single prioritized report and, when invoked as a gate, returns a pass/fail verdict.


Scope — what this audits and what it doesn't

This skill measures mechanical code-quality metrics on the current source tree. That's it. Keep this distinction sharp because many user prompts bundle unrelated questions under words like "gate" or "quality":

In scope:

  • Test coverage (line + branch, measured by a coverage tool)
  • Cyclomatic complexity per function (measured by a static analyzer)
  • Module/file size in LOC
  • Dependency graph cycles and fan-in/out
  • Mutation score (tests actually kill injected mutations)

Out of scope — do not attempt:

  • Plan-vs-code auditing ("is phase 3 of PLAN.md actually implemented?") — that's a different task, not this skill
  • Architectural drift from design docs / ADRs
  • Business-logic correctness review
  • Security review (there's a separate security-review skill)
  • Lint / type-check errors (there's verification-loop for that)
  • Whether tests pass — a 100%-failing test suite with 80% coverage still passes this audit's coverage axis. The gate is about measured metrics, not CI health.

If a user's prompt mixes scopes (e.g. "is phase 3 shippable?"), interpret it as: "are my five code-quality metrics within threshold for the code as it stands?" That's the only question this skill answers. Surface the narrow framing in the report's preamble if the prompt was broader, so the user knows what they did and didn't get.


Design Philosophy

Why these five axes?

Each catches a different class of problem that the others miss:

Axis Catches Why it matters
Coverage Untested code paths You can't trust code you haven't exercised
Complexity Hard-to-reason-about functions Complex code hides bugs and resists change
Module size Over-stuffed files Large modules accrete responsibilities and become change-amplifiers
Dependencies Cycles, tight coupling, god-modules Structural debt is expensive to unwind later
Mutation Tests that run code but don't assert meaningfully High coverage with weak assertions is a false sense of safety

Coverage alone can be gamed (run it, don't assert it). Complexity alone misses the "it's simple but untested" case. Mutation testing is the most expensive check but the only one that directly measures whether tests would catch regressions. That's why it's worth running even when slow — the user has explicitly chosen to run everything each time.

Universal thresholds, project overrides

Defaults apply across languages because the underlying phenomena are language-agnostic — a function with cyclomatic complexity 25 is hard to reason about whether it's Python or Java. Projects can override via a .code-quality.json file at the repo root when their context calls for different bars (legacy codebases, research code, etc.).

Warn vs fail

Two threshold tiers per metric:

  • Warn: reported, never blocks
  • Fail: blocks in gate mode, reported in on-demand mode

The purpose is to surface emerging problems (warn) without crying wolf, and hard-stop genuine regressions (fail).


When to use this skill

Automatically — when in

Полный SKILL.md на GitHub

Установить code-quality-audit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Glob
Grep
Bash
Write

Вложенные файлы

code-quality-audit.skillevals/evals.jsonreferences/javascript.mdreferences/python.mdreferences/typescript.md

FAQ

Что делает скилл code-quality-audit?

Run code quality audits covering test coverage, cyclomatic complexity, module sizes, dependency structure (cycles, fan-in/out), and mutation testing. Produces a prioritized report and acts as a quality gate. Use whenever the user wants to audit code quality, check coverage, find complex or oversized modules, detect dependency cycles, run mutation tests, assess technical debt, or gate a phase on quality thresholds. Triggers on "audit code quality", "check coverage", "run mutation testing", "find complex modules", "check for cycles", "/code-quality-audit", or automatically before marking an implementation phase complete.

Как установить скилл code-quality-audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл code-quality-audit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить code-quality-audit с