hygiene-audit

hygiene-audit is a skill for Claude Code from justnau1020/claude-os. It costs 51 tokens per session (2,275 once invoked), scanned A, original, Apache-2.0.

A coordinated review of a software repository’s structure, dependencies, inconsistencies, and maintainability, ending in a staged improvement plan.

In plain words
What is it for?
Use it to inspect source and test directories, find files that may need splitting, detect orphaned or poorly organized modules, and plan refactoring work in phases.
Why use it?
It brings together checks that are easy to miss when reviewing a large codebase alone, such as oversized files, missing tests, duplicated organization, and tightly connected modules.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions subagents.

Good fit Use it to inspect source and test directories, find files that may need splitting, detect orphaned or poorly organized modules, and plan refactoring work in phases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/justnau1020/claude-os/hygiene-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 justnau1020/claude-os --skill hygiene-audit
Clone the repo
git clone --depth 1 https://github.com/justnau1020/claude-os

Made for: Claude Code.

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 hygiene-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/justnau1020/claude-os/hygiene-audit/github.svg)](https://agentmods.dev/skills/justnau1020/claude-os/hygiene-audit)
Your own site
<a href="https://agentmods.dev/skills/justnau1020/claude-os/hygiene-audit"><img src="https://agentmods.dev/badge/skills/justnau1020/claude-os/hygiene-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 hygiene-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/justnau1020/claude-os/hygiene-audit"><img src="https://agentmods.dev/badge/skills/justnau1020/claude-os/hygiene-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,275 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.00051 $0.02275
Opus 5 $0.00026 $0.01137
Sonnet 5 $0.00010 $0.00455
Haiku 4.5 $0.00005 $0.00228

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

Security

Grade A, and why

hygiene-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 11d 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-quality/hygiene-audit/SKILL.md · 303 lines

How it starts

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

Codebase Hygiene Audit

Run a full codebase hygiene audit. This skill coordinates a team of agents to analyze the codebase from multiple angles and produce an actionable refactoring plan.

Phase 1: Reconnaissance (Parallel Agents)

Create a team using TeamCreate with a team lead and the following agents. All recon agents run in parallel.

Team Structure

Team name: hygiene-audit Team lead task: Coordinate recon agents, collect reports, synthesize findings, present recommendations.

Agent 1: Structure & Size Recon

Name: structure-recon Task: Analyze the codebase structure, file sizes, and module organization.

  1. Map the full directory tree of source and test directories with file counts per directory
  2. Identify files over 300 lines -- these are candidates for splitting
  3. Identify files over 500 lines -- these are urgent split candidates
  4. Count classes and functions per file to find "god files"
  5. Check for proper __init__.py exports vs star imports
  6. Verify the one-file-per-module convention
  7. Check test file organization mirrors source file organization
  8. Look for orphaned files (source files with no corresponding test, or vice versa)

Output format:

## Structure & Size Report

### File Size Distribution
- Files > 500 lines: [list with line counts]
- Files > 300 lines: [list with line counts]
- Files > 200 lines: [list with line counts]

### God Files (5+ classes or 10+ functions)
[list with counts]

### Module Organization Issues
[list of violations]

### Orphaned Files (no matching test or source)
[list]

### Directory Tree Summary
[tree with file counts]

Agent 2: Dependency & Coupling Recon

Name: dependency-recon Task: Analyze import graphs, coupling between modules, and dependency health.

  1. Map internal imports between subpackages
  2. Identify circular imports or circular dependency chains
  3. Find modules with high fan-in (many importers -- fragile to change)
  4. Find modules with high fan-out (imports many things -- too many responsibilities)
  5. Check for layering violations (lower-level modules importing from higher-level ones)
  6. Audit package manager config for unused or missing dependencies
  7. Check for vendored or duplicated utility code that should be shared
  8. Identify tightly coupled module pairs (always imported together)

Read the full file on GitHub · 303 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. 11d ago First seen · 303 lines · 51 tokens per session scan A ce6b0af6d34b

Subscribe to this mod's changes

hygiene-audit is a skill published in the GitHub repository justnau1020/claude-os (3 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 51 tokens to every session and 2,275 once invoked, about $0.0003 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

resolve-pr-comments

Evaluate, fix, answer, and reply to GitHub pull request review comments and conversation comments. Handles both change requests (fix or skip) and reviewer questions (explain using reasoning recalled from past Claude Code transcripts). Use when the user asks to "resolve PR comments", "fix review comments", "address PR…

tobihagemann/turbo · 95 tokens

review-code

Review code for bugs, security vulnerabilities, API misuse, consistency issues, simplicity problems, or test coverage gaps by running internal reviews and a peer review in parallel and returning combined findings. Single-concern with a type argument, or full review with no argument. Use when the user asks to "review…

tobihagemann/turbo · 144 tokens

assess-technical-debt

Assess project-wide structural technical debt: complexity hotspots, deprecated API usage, duplication clusters, and architecture rot. Ranks findings by impact and refactor effort into a report at .turbo/technical-debt.md. Use when the user asks to "assess technical debt", "find technical debt", "review technical…

tobihagemann/turbo · 108 tokens

map-codebase

Deep architecture report that fans out parallel inspections across different aspects of the codebase (structure, tech stack, APIs, patterns, data flow, dependencies, testing) and synthesizes findings into a comprehensive document at .turbo/codebase-map.md and .turbo/codebase-map.html. Use when the user asks to "map…

tobihagemann/turbo · 106 tokens

peer-review

Run an independent peer review via Codex. Use when the user asks to "peer review", "peer review my code", "peer review my plan", "get a second opinion", or "independent review".

tobihagemann/turbo · 46 tokens

claude-print

Run a non-interactive Claude Code print-mode call from Codex. Use when the user asks to "claude print", "ask claude", "run claude", "consult claude", or when a Codex Turbo skill needs Claude as an independent peer reviewer.

tobihagemann/turbo · 59 tokens