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/mthines/agent-skills/code-qualitynpx skills add mthines/agent-skills --skill code-qualitygit clone --depth 1 https://github.com/mthines/agent-skillsWhat 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.00183 | $0.05525 |
| Opus 5 | $0.00092 | $0.02763 |
| Sonnet 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 2d 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 9.6 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.
- 2d 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 (10 stars, last pushed 3d ago), licensed MIT. It adds 183 tokens to every session and 5,525 once invoked, about $0.0009 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
ego-browser
Skill "ego-browser" from citrolabs/ego-lite, covering ego-browser, quick start, common helpers, task spaces and control handoff.
temporal-developer
Develop, debug, and manage Temporal applications across Python, TypeScript, Go, Java, .NET, Ruby, and Rust. Use when the user is building workflows, activities, or workers with a Temporal SDK, debugging issues like non-determinism errors, stuck workflows, or activity retries, using Temporal CLI, Temporal Server, or…
x-algorithm
Write X (Twitter) posts that the For You algorithm actually rewards. Grounded in the open-sourced X recommendation system — the Grok-based transformer ranker, Phoenix retrieval, Thunder in-network store, and Grox content-understanding pipeline. Use when the user wants to write a post, thread, reply, or quote; plan a…
opencode-memory
Browse local OpenCode history: sessions, messages, plans, prompt history, and prior decisions. Use when the user says history, previous session, last time, remember, recall, plans, prior work, or when resuming/debugging repeated work where earlier OpenCode context may help. Do not use for fresh tasks or when current…
creating-explainers
Use when creating an interactive explainer - a single self-contained HTML page with hand-built Canvas figures. Handles source-file explainers, topic-driven research explainers, and mixed intake where files provide the spine and research adds support. Trigger phrases include "make an explainer", "turn this paper into…
custom-icons
Create or refine custom icon assets as native or traced SVGs and transparent PNG/WebP files. Use when the user asks for a bespoke icon or cohesive icon set, wants an image traced into a clean vector, or needs a detailed or 3D icon with transparency.