code-health-audit

Audit codebases for dead code, unused dependencies, and optimization opportunities.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/Capataina/agent-skills --skill code-health-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-health-audit
Source: https://github.com/Capataina/agent-skills/tree/main/code-health-audit
Command: npx skills add https://github.com/Capataina/agent-skills --skill code-health-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The code-health-audit analyzes the entire repository to identify opportunities to improve code health — dead code, unused dependencies, modularisation opportunities, hardcoded patterns extractable to algorithms, and opportunities for algorithm and memory-layout optimisations, as well as complexity hotspots, inconsistent patterns, API surface bloat, configuration drift, documentation rot, and test-coverage gaps, highlighting active risks. It reads project context and writes diagnostic tests (unit, integration, benchmarks, equivalence checks) to resolve uncertainty before findings are issued, and produces categorised plan files — never editing production source code.

Core Features & Use Cases

  • Repository-wide analysis identifying dead code, dependency hygiene, modularisation opportunities, pattern extraction, algorithm and memory-layout optimisation potential, and risk surface across the codebase.
  • Reads the project context, conducts targeted research per substantive system, and writes diagnostic tests when such tests would resolve uncertainty before reporting findings.
  • Produces fully justified, categorised plan files and includes a live Obligation Evidence Map; does not modify production sources.

Quick Start

Run the audit across the repository to generate a plan with findings and corresponding diagnostic tests.

Frequently Asked Questions about code-health-audit

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

FAQPage Schema
What is a code health audit and how does it handle inconsistent patterns in a codebase?

A code health audit reads project context and conducts targeted research per substantive system to identify complexity hotspots, API surface bloat, and configuration drift, outputting categorized plan files with an obligation-evidence map.

How does a code health audit generate evidence for optimization opportunities like memory-layout improvements?

Yes, the code health audit enforces non-functional-change discipline by never modifying production code, instead writing diagnostic tests like benchmarks and equivalence checks to resolve uncertainty before issuing findings in plan files.

Does a code health audit work for identifying documentation rot and test-coverage gaps in large repositories?

Run the audit across your repository to generate categorized plan files in a dedicated plan folder, including an index, per-system findings, a live obligation-evidence map, and checkpoint documents for all identified optimisation opportunities.

What's the best way to identify test-coverage gaps and documentation rot across a multi-system codebase?

The code health audit never modifies production source code, strictly producing plan files and diagnostic tests instead, meaning all identified code health improvements require separate manual implementation after the audit completes.