code-health-audit

code-health-audit is a skill for Claude Code from jerseycheese/agent-skills. It costs 145 tokens per session (1,436 once invoked), scanned A, original, MIT.

A repeatable review of a codebase for dead code, unnecessary complexity, and inconsistent patterns.

In plain words
What is it for?
Use it to find safe cleanup opportunities, reduce code where possible, and validate the resulting changes with the project's tests.
Why use it?
It turns general technical-debt concerns into a short, checked set of simplifications and first verifies that the agent is examining the current branch and worktree.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the workflow-skills plugin — 31 skills shipped together

Good fit Use it to find safe cleanup opportunities, reduce code where possible, and validate the resulting changes with the project's tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jerseycheese/agent-skills/code-health-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jerseycheese/agent-skills --skill code-health-audit
Clone the repo
git clone --depth 1 https://github.com/jerseycheese/agent-skills

Made for: Claude Code.

Or install workflow-skills, the plugin that ships this one along with the rest of its 31 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-health-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/jerseycheese/agent-skills/code-health-audit/github.svg)](https://agentmods.dev/skills/jerseycheese/agent-skills/code-health-audit)
Your own site
<a href="https://agentmods.dev/skills/jerseycheese/agent-skills/code-health-audit"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/code-health-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-health-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/jerseycheese/agent-skills/code-health-audit"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/code-health-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,436 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00145 $0.01436
Opus 5 $0.00072 $0.00718
Sonnet 5 $0.00029 $0.00287
Haiku 4.5 $0.00015 $0.00144

Measured 9d ago against content hash 222f28ea4d92, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

code-health-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/code-health-audit/SKILL.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Health Audit

A repeatable sweep for dead code, overengineering, and embarrassing/inconsistent patterns. The point isn't to list everything wrong — it's to ship a handful of high-value, low-risk simplifications with a net-negative line count and a green test suite.

The distinctive value of this skill is the pre-flight (Phase 0). Most audit rework comes from auditing the wrong branch or a stale worktree copy, then building changes that were already merged or that don't match the live code. Do Phase 0 first, every time — don't skip it because you "know" the state.

Phase 0: Pre-Flight — Get the Working State Right

1. Sync the correct base branch

Audits run against the integration branch, not whatever happens to be checked out. Confirm the base (usually develop; main if there's no develop) and sync it:

git fetch --prune
git rev-parse --abbrev-ref HEAD          # what am I on?
git checkout [BASE_BRANCH]
git pull --ff-only
git rev-list --count HEAD..origin/[BASE_BRANCH]   # 0 == up to date

If that count isn't 0 after a pull, stop and sort out why before auditing. Never audit or build against a stale local checkout — that's the single most common way this work gets wasted.

2. Confirm the active worktree and its dev server

If the repo uses git worktrees, know which one you're in and which dev server is actually live — verification later has to hit the checkout you're editing, not a stale server from another worktree:

pwd
git rev-parse --show-toplevel            # the worktree you're editing
git worktree list
lsof -i -P | grep LISTEN | grep node     # which dev server(s) are up, on which ports

Make sure the dev server you'll verify against is serving this worktree. If it's serving a different checkout, restart it here or note the right URL.

3. List the files in scope and confirm

Before scanning, state what you're auditing (a directory, a domain, the whole src/) and list the files so the user can confirm you're pointed at the right code. A one-line scope check here prevents a whole audit aimed at the wrong area.

Read the full file on GitHub · 100 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 100 lines · 145 tokens per session scan A 222f28ea4d92

Subscribe to this mod's changes

code-health-audit is a skill published in the GitHub repository jerseycheese/agent-skills (1 stars, last pushed 7d ago), licensed MIT. It adds 145 tokens to every session and 1,436 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

chorus-council

Run an LLM council — Claude (correctness), Gemini (edge cases), Cursor (integration), Kilo (maintainability), and you (scope) tackle the same task in parallel. Use when the user wants multiple independent perspectives on a decision, approach, or problem.

valpere/chorus · 62 tokens

chorus-parallel-review

Parallel code review of the current git diff from multiple agents — Claude (correctness/security), Gemini (edge cases), Cursor (integration), Kilo (maintainability), and you (scope/simplicity). Use when the user says "parallel review", "review with all agents", or "chorus review".

valpere/chorus · 69 tokens

install-gemini-code-review-action

Installs, configures, or upgrades Dazbo's PR code review & issue triage GitHub Action (gemini-review-action) in a target repository. Use when the user wants to set up, configure, or update automated AI code reviews, issue triaging, or Gemini model workflows for their GitHub repository.

derailed-dash/dazbo-agent-skills · 73 tokens

pr-sweep

Use when you want to sweep all open pull requests across all repos, triage their status, run code reviews on unreviewed PRs, merge what's ready, fix quick blockers, and produce a full status report. Trigger when the user says "check my PRs", "close out open PRs", "what's the status of my PRs", "sweep my PRs", "PR…

harnessprotocol/harness-kit · 0 tokens

rubber-ducky

Use when you've planned a non-trivial change and are about to implement it, finished a complex or multi-file piece of work, just wrote tests, or are stuck on repeated failures — and any time the user says "rubber duck this", "rubber ducky", "get a second opinion", "sanity-check my plan", "poke holes in this", "what am…

harnessprotocol/harness-kit · 186 tokens

open-pr

Use when wrapping up a development task and getting a PR ready — runs local tests, creates a PR (if one doesn't exist) with a structured description template, conducts a code review via the review skill, and checks CI status with quick fixes. Trigger when the user says they're done with a feature, want to open a PR…

harnessprotocol/harness-kit · 111 tokens