code-hygiene

code-hygiene is a skill for Claude Code from Jartan-LLC/grimoire. It costs 38 tokens per session (1,595 once invoked), scanned A, original, MIT.

A set of general rules for keeping source code necessary, honest, and free of needless duplication.

In plain words
What is it for?
It helps remove unused or commented-out code, avoid reinventing existing solutions, prevent duplication, keep names truthful, and limit warnings suppressions to specific cases.
Why use it?
It prevents dead code, misleading names, copied solutions, speculative features, and broad diagnostic suppressions from accumulating.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the praxis plugin — 16 skills, 7 agents shipped together

Good fit It helps remove unused or commented-out code, avoid reinventing existing solutions, prevent duplication, keep names truthful, and limit warnings suppressions to specific cases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jartan-llc/grimoire/code-hygiene
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 Jartan-LLC/grimoire --skill code-hygiene
Clone the repo
git clone --depth 1 https://github.com/Jartan-LLC/grimoire

Made for: Claude Code.

Or install praxis, the plugin that ships this one along with the rest of its 16 skills, 7 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 code-hygiene

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jartan-llc/grimoire/code-hygiene"><img src="https://agentmods.dev/badge/skills/jartan-llc/grimoire/code-hygiene.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,595 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.00038 $0.01595
Opus 5.5 $0.00015 $0.00638
Sonnet 5.5 $0.00008 $0.00319
Haiku 4.5 $0.00004 $0.00160

Measured 1mo ago against content hash 24010f46a38f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-hygiene 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 1mo 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/praxis/skills/code-hygiene/SKILL.md · 101 lines

How it starts

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

Code Hygiene

Don't leave -- or write -- code that lies, hides, or that git (or an existing solution) already owns. Every line is a permanent liability someone must read, test, and carry forward, so each must earn its place. This skill is language-agnostic and guides both authors and reviewers. This skill only deletes; its constructive siblings shape what survives -- code-structure (the units and their contracts) and readable-code (how a body reads). Comment truthfulness is comment-hygiene's. (Python-specific pitfalls live in pythonica:python-anti-patterns; documentation prose in docs-patterns.)

Dead code & speculative generality

Code no live path needs is dead -- delete it; don't add what isn't needed yet.

Dead / commented-out code

Rule: Delete dead, unreachable, and commented-out code. Git holds the history -- recover it with git log -G if ever needed. Never comment code out to keep it "for later"; version control is the "for later."

Test: unreachable (after return / throw / break), unused (no live caller, import, or reference), or disabled/commented "just in case" -> delete.

Orphaned abstractions / speculative generality

Rule: Don't build for a future that hasn't arrived (YAGNI). A helper, wrapper, config knob, interface, or parameter with no live consumer is dead weight -- remove it, or don't add it.

Test: zero live callers, or added only for a hypothetical future need? -> delete / don't write. Generalize when the second real use appears, not before.

Debug / scaffolding output left behind

Rule: Strip ad-hoc debug and instrumentation output -- print, console.log, debugger, breakpoint(), dbg!, var_dump -- before merge. It was scaffolding to inspect state during development, not shipped behavior.

Test: is this line an ad-hoc trace a developer added to watch state, rather than an intentional logger call? Yes -> delete.

Contrast: a real logger call (logger.*) is the sanctioned channel for output that should ship -- see logging-patterns.

Read the full file on GitHub · 101 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. 1mo ago First seen · 101 lines · 38 tokens per session scan A 24010f46a38f

Subscribe to this mod's changes

code-hygiene is a skill published in the GitHub repository Jartan-LLC/grimoire (2 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 1,595 once invoked, about $0.0002 per session on Opus 5.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

review-arch

Conduct a principal-level architecture review of a system, specification, diagram, or set of design decisions. Use when asked to review an architecture, evaluate a design, assess coupling/cohesion, check for anti-patterns, audit system boundaries, or produce an Architecture Review Board (ARB) style verdict. Also use…

sergeyklay/.agents · 199 tokens

review-impl

Review implementation changes for a given task against architectural standards. Use when reviewing a PR, evaluating recently committed code, assessing whether implementation changes are correct and architecturally sound, or when asked to 'review my changes', 'check this implementation', 'review what I built', 'is this…

sergeyklay/.agents · 155 tokens

design-parity-review

Prove a Compose UI pull request matches its intended design by diffing the rendered code (candidate) against a Figma / Stitch / Claude Design reference and posting a parity verdict. Use when asked to check a PR against a design, wire up a design-parity bot, set up the committed reference cache so runs make zero Figma…

yschimke/skills · 133 tokens

babysit-pr

Resolve reviewer comments on a pull request or pasted feedback using a six-step evidence-grounded protocol. Use when asked to resolve review feedback, address reviewer comments, process PR comments, triage review feedback, apply review suggestions, handle code review feedback, decide which review comments to accept or…

sergeyklay/.agents · 161 tokens

compose-preview-review

Review Compose UI previews and pull requests by rendering base and head, diffing them, and checking catalog design guidelines. Use for a UI design review, a UI PR locally or from a CI agent session (@claude mention), authoring an agent-opened PR that touches UI, or triaging flaky or unstable previews…

yschimke/skills · 98 tokens

verify-impl

Forensic audit of an implementation against its authoritative specification. Use whenever a specification document and an implementation are both in scope and the user asks any conformance question - even when not phrased explicitly: 'does this code match the spec', 'verify this implementation', 'check spec…

sergeyklay/.agents · 157 tokens