ai-hygiene-audit

ai-hygiene-audit is a command for Claude Code from athola/claude-night-market. It costs 28 tokens per session (1,411 once invoked), scanned A, original, MIT.

A code-review command that checks a codebase for quality problems often linked to AI-generated code, such as repeated code, shallow tests, and weak documentation.

In plain words
What is it for?
Use it to inspect Git history, duplicated code, tests, documentation, or other signs of AI-related code debt before a release.
Why use it?
It finds forms of technical debt that ordinary bloat checks may miss, especially after fast AI-assisted development or when reviewing a generated pull request.

Command for Claude Code

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 plugins/conserve/scripts/detect_duplicates.py . --min-lines 5.

Part of the conserve plugin — 15 skills, 6 commands, 5 agents shipped together

Good fit Use it to inspect Git history, duplicated code, tests, documentation, or other signs of AI-related code debt before a release.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/athola/claude-night-market
agentmods
npx agentmods add commands/athola/claude-night-market/ai-hygiene-audit

Made for: Claude Code.

Or install conserve, the plugin that ships this one along with the rest of its 15 skills, 6 commands, 5 agents.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/athola/claude-night-market/ai-hygiene-audit"><img src="https://agentmods.dev/badge/commands/athola/claude-night-market/ai-hygiene-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,411 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.00028 $0.01411
Opus 5 $0.00014 $0.00705
Sonnet 5 $0.00006 $0.00282
Haiku 4.5 $0.00003 $0.00141

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

Security

Grade A, and why

ai-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 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.

plugins/conserve/commands/ai-hygiene-audit.md · 168 lines

How it starts

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

AI Hygiene Audit Command

Detect AI-specific code quality issues that traditional bloat detection misses.

When To Use

Use this command when you need to:

  • Suspected AI-generated code quality issues
  • Before major releases to check for hidden debt
  • Reviewing PRs with suspected AI generation
  • After rapid AI-assisted development sprints

When NOT To Use

  • Quick fixes that don't need structured workflow
  • Already know the specific issue - fix it directly

Why This Exists

AI coding creates different problems than human coding:

  • 2024: First year copy > refactor in git history (GitClear)
  • Tab-completion bloat: Similar code repeated instead of abstracted
  • Happy path bias: Tests verify success, miss failures
  • Slop: Documentation that sounds right but lacks depth

Usage

# Full AI hygiene audit
/ai-hygiene-audit

# Focus on specific area
/ai-hygiene-audit --focus git          # Git history patterns
/ai-hygiene-audit --focus duplication  # Tab-completion bloat
/ai-hygiene-audit --focus tests        # Happy-path-only detection
/ai-hygiene-audit --focus docs         # Documentation slop
/ai-hygiene-audit --focus code-debt    # Code-level AI debt signals

# Generate report file
/ai-hygiene-audit --report ai-hygiene-report.md

# Set pass/fail threshold (0-100)
/ai-hygiene-audit --threshold 70

Options

Option Description Default
--focus <area> Limit to: git, duplication, tests, docs, deps, code-debt all
--report <file> Save detailed report to file stdout
--threshold <score> Fail if hygiene score below threshold none
--json Output structured JSON for CI integration false

What It Detects

Git History Patterns

  • Massive single commits: 500+ line additions (vibe coding signature)
  • Refactoring deficit: <5% of commits involve refactoring
  • Churn spikes: Code revised within 2 weeks of creation

Duplication (Tab-Completion Bloat)

  • Repeated blocks: 5+ line duplicates across files
  • Similar functions: Near-identical function signatures
  • Copy-paste patterns: Same logic with minor variations

Read the full file on GitHub · 168 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 · 168 lines · 28 tokens per session scan A 545f71746f41

Subscribe to this mod's changes

ai-hygiene-audit is a command published in the GitHub repository athola/claude-night-market (337 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 1,411 once invoked, about $0.0001 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-09-03.