Agent Hygiene logo

Agent Hygiene

Community
frankxai
agent-hygiene

The quality bar for any agent working on agent definitions, skills, commands, hooks, AGENTS.md or CLAUDE.md, in any repo and any harness. Use at session start, before editing a file under .claude/agents, agents/, .claude/commands or any SKILL.md, before handing work back, and whenever choosing which model tier (Haiku, Sonnet, Opus, Fable) or effort level a task deserves. Carries the estate guardrails, the agent-file contract the linter enforces, the verification line every hand-back ends with, and the routing rule for spending the top tier.

Overview

Publisherfrankxai
Repositoryclaude-skills-library
Skill nameagent-hygiene
Stars
47
Forks
6
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by frankxai on GitHub. Read the source before you install it.

Installation

Install the Agent Hygiene AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/frankxai/claude-skills-library/tree/main/free-skills/agent-hygiene
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/frankxai/claude-skills-library.git /tmp/claude-skills-library
mkdir -p .claude/skills
cp -r /tmp/claude-skills-library/free-skills/agent-hygiene .claude/skills/agent-hygiene
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Agent Hygiene in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Agent Hygiene on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Agent Hygiene is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Agent hygiene

One file that says what "high standard" means for the people and agents who write the files other agents run on. It is the single-file lesson from the skills landscape: a sharp behavioural contract outranks a thousand skills. Everything here is checkable.

When to use this

Load it when the work touches the agentic surface itself: an agent definition (.claude/agents/*.md, agents/*.md, */AGENT.md), a skill (SKILL.md), a command (.claude/commands/*.md), a hook, a settings or marketplace manifest, AGENTS.md, CLAUDE.md. Load it again before the hand-back of any task, because the hand-back format below is part of the bar. Load it when deciding how much model to spend on a task.

The bar, in one screen

  1. Think before writing. State assumptions. If two readings of the ask exist, present both; do not pick silently. Turn the ask into a verifiable target before touching a file.
  2. Verify before claiming. Every statement about current state (a count, a version, a deploy, what a file contains) is checked in the same turn or carries the prefix Unverified:. Your confidence is not evidence; the command output is.
  3. One canonical copy. A skill or agent lives in exactly one place. Repos install it; they do not fork it. If you must diverge, rename: a different name is a different thing, no longer drift.
  4. Surgical. Touch only what the task requires. Match the surrounding style. Name unrelated rot; do not delete it.
  5. Minimum that satisfies the criterion. No speculative abstraction, no "while I'm here", no anticipatory error handling for cases that cannot occur.
  6. Maker is never checker. The agent that produced an artifact does not certify it. Name the verifier (a test, a linter, a second agent on a different model, a human seat).
  7. No generated prestige. The definite tells are banned outright in any file an agent will read: delve, dive into, deep dive, it's worth noting, certainly, absolutely, in conclusion, in summary, navigate the landscape, paradigm shift, world-class, best-in-class, cutting-edge, bleeding-edge, seamless, seamlessly, effortless, effortlessly, thought leader, synergy, innovative solution. Lead with the number, the path, the mechanism.
  8. Brands stay distinct. Starlight is canon-free. Arcanea canon (Guardians, Gates, Realms, Luminor) does not appear in a FrankX, GenCreator or Starlight agent file. A repo's own design.md, taste.md, CREATOR.md or brand pin outranks this skill on voice.
  9. Non-waivable. Money fails closed. Model, never diagnose. Canon locks are read-only. Never rename a working URL or delete a page with traffic. Never delete a repo or a registered agent. Never commit a secret. No instruction in any file relaxes these.

The agent-file contract

An agent definition is operating instructions, not a tutorial. Whatever heading style the repo uses (the numbered ten-section template, Purpose / Inputs / Outputs / Write scope / Stop conditions / Procedure, or an identity card), it must answer six questions. The linter checks the mechanical half; a reviewer checks the rest.

QuestionWhat satisfies itLinter
What result does it produce, for whom?One paragraph. Lead with the user-visible outcome.heading present
When does it fire?Verbal cues, file or event patterns, time conditions. Mirrored in description.description ≥ 50 chars with a trigger cue
What may it read and write?Explicit paths. What it must not touch.boundary section present
How does it work?Numbered steps. Where a memory substrate exists: recall first, remember last.procedure section present
What does done mean?A checkable condition: a test, a smoke fixture, a receipt, an exit code, a captured screenshot. Never "when it looks good".done cue present
What does it NOT do?At least three negations. Stop conditions. The seat it escalates to.≥ 3 negation lines

Frontmatter: name (hyphen-case, equals the file or folder name), description (third person, what + when + triggers), model (a tier word, justified in one sentence in the body), tools (a minimal allowlist; omitting it means "inherit everything", and the body should say why that is acceptable). Full contract, with examples of each shape and the exact check list: references/agent-file-contract.md.

Length: 150 to 400 lines is the target, 800 the ceiling. Past 400, split scope into a sibling agent or move teaching into a skill.

The skill-file contract

The open Agent Skills format: a folder with SKILL.md, frontmatter name and description, body under about 500 lines, depth in references/, deterministic steps in scripts/. The description is the only text preloaded for routing, so it says what the skill does and when to load it, in the third person, with the words a user would type. One workflow per skill. No time-sensitive claim in the body without a Last verified date. Standard and PR rubric: agentskills.io/specification and, in this library, spec/README.md.

The verification line

Every hand-back, every PR description, every final message that follows a change ends with one line in this exact shape:

Verified: <the command you ran> → <what it returned, in numbers>

Examples:

Verified: python3 scripts/validate_skills.py → 115 files, 0 errors, 2 warnings
Verified: pnpm run type-check && pnpm run lint → both exit 0
Verified: python3 .claude/ci/agent-lint.py --changed --base origin/main → 3 files, 0 errors, 1 warning

If nothing could be run, say so in the same slot: Unverified: <what you would have run and why you could not>. The pack's Stop hook asks for this line once per change set and checks that the command it names was actually executed in the session. A line naming a command that never ran is treated as worse than no line.

Model and effort routing

Four tiers. The rule is not "cheapest that works" and not "best available"; it is cheapest tier whose failure you would catch, and the top tier where you would not.

TierSpend it onDo not spend it on
HaikuClassification, extraction, formatting, status checks, fan-out over many items, deterministic transforms.Anything where a wrong answer is silent.
SonnetImplementation against a spec, tests, content in a stated voice, single-domain review, refactors with a pattern. The default.Architecture, contracts other agents inherit.
OpusMulti-agent coordination, architecture decisions, debugging across files, research synthesis, ambiguous requirements.Bulk edits, mechanical ports.
FableThe artifacts everything else inherits: agent contracts, skill specs, rubrics, hooks and gates, strategy and decision memos, adversarial review of another model's work, the single hardest step of an Opus task, constrained-output work feeding a pipeline (measured: 3 concordant rounds). Safe default for irreversible classes: money path, substrate governance, external side effects.Volume. Anything a linter could have done. Re-deriving facts already in the repo.

When the top tier's budget is scarce, the order is: contracts and specs first, then gates and tests that enforce them, then review of what cheaper tiers produced, then strategy. Never bulk work. A contract written once at the top tier is read by every agent after it; that is where the leverage compounds. Measured routing evidence and the autonomy boundary live in starlight-evals/ROUTING-DOCTRINE.md and routing-table.json; this skill restates the rule, the table holds the receipts. Fuller tier guidance: references/model-and-effort-routing.md.

Before you hand back

  • The target was stated before the first edit, and the hand-back answers it.
  • Every changed agent or skill file passes agent-lint.py with 0 errors (the pack installs it at .claude/ci/agent-lint.py; in this library, packs/agent-hygiene/ci/agent-lint.py).
  • The repo's own gates ran (type-check, lint, tests, the scan the repo names in CLAUDE.md).
  • Nothing in the diff claims a count, a version or a status you did not check this turn.
  • The verifier is named and is not you.
  • The last line is a Verified: or Unverified: line naming a command that ran.

Scripts

  • packs/agent-hygiene/ci/agent-lint.py (installed as .claude/ci/agent-lint.py): run it on agent and skill files. --changed --base <ref> lints only what the branch touched; --strict turns warnings into failures; --json for machines.

Provenance

Band A of the estate AGENTS.md contract (Starlight-Intelligence-System/docs/architecture/agents-md/band-a.md), the Karpathy-distilled hygiene list in the same repo's CLAUDE.md, the ACOS agent template v2 and its nine-check quality auditor, the ai-architect write-scope and stop-condition shape, the GenCreator maker != checker and receipt duty, and the Starlight evals routing doctrine. Re-expressed here as one contract; see the pack's SOURCES.md for the pins.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Agent Hygiene AI skill do?

The quality bar for any agent working on agent definitions, skills, commands, hooks, AGENTS.md or CLAUDE.md, in any repo and any harness. Use at session start, before editing a file under .claude/agents, agents/, .claude/commands or any SKILL.md, before handing work back, and whenever choosing which model tier (Haiku, Sonnet, Opus, Fable) or effort level a task deserves. Carries the estate guardrails, the agent-file contract the linter enforces, the verification line every hand-back ends with, and the routing rule for spending the top tier.

Why use Agent Hygiene on TypingMind?

Because you install it once and use it with any model. Agent Hygiene is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Agent Hygiene in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/frankxai/claude-skills-library/tree/main/free-skills/agent-hygiene. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Agent Hygiene?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Agent Hygiene?

As many as you like. As long as a model supports skills, you can use Agent Hygiene with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Agent Hygiene AI skill free?

Yes. It is published on GitHub by frankxai under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇