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 skills add mthines/agent-skills --skill code-qualitygit clone --depth 1 https://github.com/mthines/agent-skillsWrote 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/mthines/agent-skills/code-quality)<a href="https://agentmods.dev/skills/mthines/agent-skills/code-quality"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/code-quality/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.
<a href="https://agentmods.dev/skills/mthines/agent-skills/code-quality"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/code-quality.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00183 | $0.05525 |
| Opus 5.5 | $0.00073 | $0.02210 |
| Sonnet 5.5 | $0.00037 | $0.01105 |
| Haiku 4.5 | $0.00018 | $0.00553 |
Grade A, and why
code-quality 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.
How it starts
The opening of the file, as written. The whole thing — 317 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Quality Skill
Write code that is easy to review, understand, and change. Optimize for the next developer's mental load before optimizing for machine performance, because readable code is cheaper to change, debug, and trust — and most performance wins come from algorithmic choices and profiling, not micro-optimizations.
The three quality axes this skill targets, in priority order:
- Readability — a reader understands the code top-to-bottom on first pass.
- Maintainability — the next variant of a concept is a one-file, one-edit change; existing utilities are reused rather than re-invented; one concept has one canonical home.
- Pragmatic performance — algorithmic wins by default, micro-optimizations only when a profiler points at them.
This skill applies in four modes:
- Plan mode — invoked with
Skill("code-quality", "plan"), before any code is written. Reads aplan.md(or proposed approach) and the existing codebase, and verifies the plan's structure follows the existing patterns and avoids predictable design-time risks (premature parallel maps, missing branded primitives, untyped error paths, parameter creep, neighbour mismatch). Returns findings only — no code edits. Used byautonomous-workflowPhase 1. Seerules/plan-mode.md. - Authoring mode — when writing new code (e.g., GREEN phase of TDD, new features). Apply principles inline so the first version already meets the bar. Default mode when no argument is passed.
- Review mode — invoked with
Skill("code-quality", "code")orSkill("code-quality", "review"), after code is written. When refactoring, reviewing PRs, or being asked to "clean this up". Diagnose against the rules and propose targeted changes. Returns findings only — no code edits. - Simplify mode — invoked with
Skill("code-quality", "simplify"), after a feature is implemented and tests are green. Runs the review pass, then applies mechanical refactors (Class M recipes fromrules/refactor-recipes.md) one at a time behindSkill("confidence", "code") ≥ 90 %and a scoped fast-check, reverting on failure. Judgment-class recipes (Class J) stay as proposals. Seerules/simplify-mode.md. Variants:simplify aggressivealso auto-applies Medium-impact mechanical recipes;simplify dry-runreports without writing;simplify <path>scopes to a path instead of the diff.
Detect the mode from the $ARGUMENTS first token: plan → plan mode; code or review → review mode; simplify → simplify mode; anything else (including no argument) → authoring mode. The legacy convention "user said review or audit" still routes to review mode for ad-hoc invocations.
What ships with it
29 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/citations.md 4.6 KB
- references/quick-reference.md 6.3 KB
- rules/abstraction.md 7.4 KB
- rules/api-design.md 6.8 KB
- rules/architecture.md 7.4 KB
- rules/cognitive-complexity.md 4.7 KB
- rules/collaboration.md 6.4 KB
- rules/comments.md 10 KB
- rules/control-flow.md 5.1 KB
- rules/correctness.md 8.0 KB
- rules/error-handling.md 12 KB
- rules/functions.md 5.3 KB
- rules/maintainability.md 13 KB
- rules/naming.md 5.2 KB
- rules/output-contract.md 1.7 KB
- rules/performance.md 5.0 KB
- rules/plan-mode.md 9.5 KB
- rules/procedure.md 6.0 KB
- rules/refactor-recipes.md 26 KB
- rules/review-checklist.md 14 KB
- rules/simplify-mode.md 16 KB
- rules/stacks/nextjs/endpoints.md 15 KB
- rules/stacks/react/autosave.md 15 KB
- rules/stacks/react/components.md 13 KB
- rules/stacks/react/data-fetching.md 17 KB
- rules/stacks/react/offline-sync.md 14 KB
- rules/stacks/README.md 2.6 KB
- rules/testability.md 10 KB
- rules/tradeoffs.md 1.4 KB
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.
- 1mo ago First seen · 317 lines · 183 tokens per session scan A e3995d3bff0c
code-quality is a skill published in the GitHub repository mthines/agent-skills (19 stars, last pushed today), licensed MIT. It adds 183 tokens to every session and 5,525 once invoked, about $0.0007 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.
Other skills, from other repositories
ego-lite-simplify
Find and implement evidence-backed simplifications in the ego-lite repository. Use when reviewing the codebase for dead code, duplicated state or APIs, speculative abstractions, unnecessary compatibility layers, hand-written infrastructure, excessive tests or documentation, or when the user asks to reduce code size or…
code-review-and-quality
Runs code review as a change-management process — right-sizing the diff, labeling findings by required-vs-optional severity, applying structural remedies for complexity, and resolving reviewer/author disagreements. Use when a change needs splitting before review, when review comments need severity labels, when a…
code-simplification
Simplifies working code for clarity without changing behavior — reduces nesting, renames vague identifiers, removes dead code and unnecessary abstraction. Use when code works but is harder to read, maintain, or extend than it should be, or when a review flagged accumulated complexity. Not for adding features or fixing…
coding-standards
Cross-language code-quality heuristics -- function size, nesting depth, magic numbers, comment intent, naming -- for reviewing or writing code in any language. Use when reviewing code for maintainability, setting up lint rules, or onboarding conventions. For Go-specific idioms use go-service-idioms, for API contracts…
doubt-driven-development
Subjects a non-trivial decision to a fresh-context adversarial review before it stands, in-flight rather than as a post-hoc PR verdict. Use before an architectural decision under uncertainty, before committing non-trivial code, before asserting a non-obvious fact ("this is safe", "this scales", "this matches the…
best-practices
Apply modern web development best practices for security, compatibility, and code quality. Use when asked to "apply best practices", "security audit", "modernize code", "code quality review", or "check for vulnerabilities".