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.
npx agentmods add skills/jartan-llc/grimoire/code-hygienenpx skills add Jartan-LLC/grimoire --skill code-hygienegit clone --depth 1 https://github.com/Jartan-LLC/grimoireWrote 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.
[](https://agentmods.dev/skills/jartan-llc/grimoire/code-hygiene)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00038 | $0.01595 |
| Opus 5 | $0.00019 | $0.00797 |
| Sonnet 5 | $0.00008 | $0.00319 |
| Haiku 4.5 | $0.00004 | $0.00160 |
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 4d 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.
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.
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.
- 4d ago First seen · 101 lines · 38 tokens per session scan A 24010f46a38f
code-hygiene is a skill published in the GitHub repository Jartan-LLC/grimoire (2 stars, last pushed 17d ago), licensed MIT. It adds 38 tokens to every session and 1,595 once invoked, about $0.0002 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.
Other skills, from other repositories
goutoujunshi
恋爱军师与情绪支持 skill。用于心动、暧昧、追求、聊天记录或截图分析、约会、关系确认、多人选择、冲突、冷淡、投入失衡、分手、复合、出轨、婚姻或家庭问题;也用于分析关系信号、设计主动推进或退出策略、润色可直接发送的话术,以及把冷读、自然流、Blueprint、Mystery 等经典社交体系转译成真实、互惠、可退出的沟通能力。支持分析ChatLab已有数据和经同意可撤销的长期关系档案,不负责导出聊天软件数据。首次使用时为用户及一个或多个目标对象建立包含 MBTI、主观综合评分和关系背景的档案。.
gpt-image
Use this skill whenever a user asks to generate, create, draw, render, or edit images with GPT Image 2 / gpt-image-2, text-to-image, reference-image editing, inpainting, posters, typography, Chinese text, UI mockups, diagrams, or gallery prompts. Analyze the user's prompt, search the bundled Reference Gallery/craft…
tastemaker
Generate genuinely beautiful, on-brand UI instead of generic "AI slop" — use whenever the user asks to build, design, style, or improve a UI, landing page, dashboard, app screen, or component, whenever a PRD/spec needs a design pass before implementation, whenever the user pastes reference images/Pinterest/Dribbble…
codex-autoresearch
Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…
writer
SEO-friendly article writing, audit, and humanization workflow for Markdown content. Use when creating, outlining, editing, auditing, rewriting, or quality-checking blog posts, tutorials, comparisons, listicles, explainers, FAQ sections, excerpts, SEO titles, meta descriptions, tags, or Google-friendly content briefs…
xiaohongshu-conversion-path
《小红书运营手册 · AI工作台》成交路径设计技能。用于用户想把小红书内容、主页承接、置顶笔记、评论区、私信和产品/服务转化串起来时触发,重点处理从刷到内容到私信、预约、购买、体验、反馈或成交的路径。适合服务号、产品号、个人 IP、自由职业者和小程序推广。输入可以是账号定位、产品/服务、客单价、用户顾虑、当前内容和转化目标。输出内容分工、信任路径、私信筛选和成交动作。若用户只想改简介、看主页第一眼或优化置顶表达,应使用 xiaohongshu-profile。.