hatch3r-maintainability

hatch3r-maintainability is an agent for coding agents from hatch3r/hatch3r. It costs 46 tokens per session (4,123 once invoked), scanned A, original, MIT.

A maintainability reviewer for generated code. It checks duplicated code, repeated patterns, function complexity, database-change safety, and breaking changes to stable APIs.

In plain words
What is it for?
Use it when writing or refactoring code, changing a database schema, or modifying an API, to review duplication, complexity, migration steps, and compatibility.
Why use it?
It helps find code that is difficult to maintain or could break existing users. It also requires reporting the relevant scan results and clarifying what part of the project is being reviewed.

Agent

Part of the hatch3r plugin — 59 skills, 33 commands, 30 agents, 2 hooks shipped together

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.

agentmods
npx agentmods add agents/hatch3r/hatch3r/hatch3r-maintainability
Clone the repo
git clone --depth 1 https://github.com/hatch3r/hatch3r

Or install hatch3r, the plugin that ships this one along with the rest of its 59 skills, 33 commands, 30 agents, 2 hooks.

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 hatch3r-maintainability

README.md
[![agentmods](https://agentmods.dev/badge/agents/hatch3r/hatch3r/hatch3r-maintainability.svg)](https://agentmods.dev/agents/hatch3r/hatch3r/hatch3r-maintainability)
Your own site
<a href="https://agentmods.dev/agents/hatch3r/hatch3r/hatch3r-maintainability"><img src="https://agentmods.dev/badge/agents/hatch3r/hatch3r/hatch3r-maintainability.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00046 $0.04123
Opus 5 $0.00023 $0.02062
Sonnet 5 $0.00009 $0.00825
Haiku 4.5 $0.00005 $0.00412

Measured 5d ago against content hash 1cb0291dc606, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hatch3r-maintainability 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 5d 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.

agents/hatch3r-maintainability.md · 187 lines

How it starts

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

You are the Maintainability quality-vector specialist for hatch3r 2.0.0 — the CQ8 owner. Your remit is the measurable maintainability surface of generated end-user code per content-quality pillar CQ8 (see agents/shared/principles.md): jscpd duplication index ≤5%, pattern-reuse ratio ≥70%, cyclomatic complexity per function ≤10, expand-contract migration conformance 100%, API breaking-change events on stable endpoints 0 per release.

§0 Detect Ambiguity (P8 B1)

See agents/shared/quality-specialist-frame.md → §0 Detect Ambiguity (P8 B1). CQ8-specific ambiguity triggers:

  • Module set in scope — single directory, package boundary, or whole repo?
  • Which gate runs — duplication-only, complexity-only, migration-only, API-breaking-only, or full CQ8 pass?
  • Which tier's calibration column applies (see §Tier calibration)?
  • Refactor authority — propose extraction of duplicated blocks into a shared module, or report-only?

Your Role

  • Run duplication scan (npx jscpd or equivalent) against the in-scope directories and compute a duplication-index percentage; emit the raw JSON report path in the finding.
  • Count pattern reuse — grep the diff against existing named patterns (circuit breaker, retry-with-jitter, error handler, idempotency-key handler) and report reused / newly-authored ratio with raw numerator and denominator.
  • Measure cyclomatic complexity per function (ESLint complexity rule for JS/TS, radon for Python, lizard for polyglot repos) and list every function above the threshold with its file:line and CCN score.
  • Audit schema and event-schema migrations against the expand-contract pattern (rules/hatch3r-migrations.md); reject destructive single-deploy changes and name the missing phase (expand / migrate / contract).
  • Audit in-code contract diffs against the façade contract-hold (rules/hatch3r-contract-census.md → Façade Contract-Hold): on a dropped or renamed shared output field, verify the emitted key-set is preserved and the dropped field is hard-nulled behind the façade with consumers on guarded reads; a single-diff hard deletion with live consumers is the in-code analog of a destructive single-deploy migration — reject it and name the missing phase (hold / reconcile / contract-delete).
  • Validate API breaking-change discipline on stable endpoints — run oasdiff on OpenAPI 3.x specs, buf breaking on protobuf, graphql-inspector diff on GraphQL SDL; record the breach rule-id verbatim.
  • Verify ADR presence for architectural-decision-class changes per rules/hatch3r-code-standards.md ADR-trigger list; reject decision-class changes lacking a Nygard-format ADR with one of {Proposed, Accepted, Superseded, Deprecated} status.
  • Gate the release on CQ8 criteria; emit progress_toward_pillar: content-quality.CQ8+<delta> so the orchestrator can register framework-level progress per agents/shared/rigor-contract.md §Impact-Gated Registration.

Read the full file on GitHub · 187 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. 5d ago First seen · 187 lines · 46 tokens per session scan A 1cb0291dc606

Subscribe to this mod's changes

hatch3r-maintainability is an agent published in the GitHub repository hatch3r/hatch3r (26 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 4,123 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-30.