code-quality-standards

code-quality-standards is a skill for Claude Code, Codex from Goldziher/ai-rulez. It costs 126 tokens per session (544 once invoked), scanned A, original, MIT.

A set of coding rules for readability, complexity, duplication, and common design mistakes. It defines limits for line length, function size, nesting, and cyclomatic complexity, which measures how many independent paths code can take.

In plain words
What is it for?
Use it when writing or reviewing code for structure, naming, complexity, duplication, error handling, state management, and asynchronous I/O.
Why use it?
It gives reviews concrete thresholds instead of relying only on personal style preferences. It also discourages unsafe or hard-to-maintain patterns such as global state, silent exception handling, and blocking work in asynchronous code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when writing or reviewing code for structure, naming, complexity, duplication, error handling, state management, and asynchronous I/O.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/goldziher/ai-rulez/code-quality-standards
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.

Any agent
npx skills add Goldziher/ai-rulez --skill code-quality-standards
Clone the repo
git clone --depth 1 https://github.com/Goldziher/ai-rulez

Made for: Claude Code, Codex.

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 code-quality-standards

README.md
[![agentmods](https://agentmods.dev/badge/skills/goldziher/ai-rulez/code-quality-standards/github.svg)](https://agentmods.dev/skills/goldziher/ai-rulez/code-quality-standards)
Your own site
<a href="https://agentmods.dev/skills/goldziher/ai-rulez/code-quality-standards"><img src="https://agentmods.dev/badge/skills/goldziher/ai-rulez/code-quality-standards/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.

agentmods 80×15 button for code-quality-standards

Your own site · 80×15
<a href="https://agentmods.dev/skills/goldziher/ai-rulez/code-quality-standards"><img src="https://agentmods.dev/badge/skills/goldziher/ai-rulez/code-quality-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 544 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00126 $0.00544
Opus 5.5 $0.00050 $0.00218
Sonnet 5.5 $0.00025 $0.00109
Haiku 4.5 $0.00013 $0.00054

Measured today against content hash 55cb6e3d60f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-quality-standards 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 today.

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.

internal/builtins/universal/code-quality/skills/code-quality-standards/SKILL.md · 41 lines

What it actually says

Readability

  • Max 120 character line width.
  • Prefer explicit code over clever tricks — if it needs a comment to explain what it does, rewrite it.
  • No abbreviations in public API names (context not ctx, repository not repo).
  • Keep functions short and focused on a single responsibility.

Complexity limits

Max 20 cyclomatic complexity per function, max 4 levels of nesting depth, max 50 lines per function. Use early returns to flatten conditionals. Break complex functions into well-named helpers that each do one thing.

Anti-patterns

  • No magic numbers — use named constants.
  • No global state — use dependency injection.
  • No inheritance for code reuse — prefer composition.
  • No bare exception handlers — catch specific types.
  • No mocking internal services — use real objects for integration tests.
  • No blocking I/O in async code paths — keep async paths fully async.

Duplication

Extract shared logic after the third repetition, not before. Three similar lines are better than a premature abstraction. When extracting, ensure the shared code has a single reason to change — if two callers would evolve the logic differently, keep them separate. Premature abstraction creates worse coupling than duplication.

Dead code

Remove dead code instead of commenting it out. Version control preserves history; commented-out code creates confusion and maintenance burden.

Suppressions

Fix the cause instead of suppressing a lint rule, type error or test. A necessary suppression (lint-disable, noqa, ts-ignore, #[allow]) is scoped to the narrowest line, names the rule, and gives a one-line reason. Never update a snapshot or baseline just to hide a failure.

Markers

TODO, FIXME, HACK and XXX take the form TODO(PROJ-123): description. The key is an existing open tracker issue for future work, never the issue of the current change (it closes on merge). No bare markers, owners or dates.

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. today Changed · +8 lines · +21 tokens per session 55cb6e3d60f1
  2. 19d ago First seen · 33 lines · 105 tokens per session scan A de266ac4f993

Subscribe to this mod's changes

code-quality-standards is a skill published in the GitHub repository Goldziher/ai-rulez (163 stars, last pushed yesterday), licensed MIT. It adds 126 tokens to every session and 544 once invoked, about $0.0005 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-09-28.

Related

Other skills, from other repositories

printing-press-output-review

Internal sub-skill: agentic review of a printed CLI's sampled command output for plausibility issues that rule-based checks can't encode (substring-match relevance, format bugs, silent source drops, ranking failures). Invoked via the Skill tool by the main printing-press skill at Phase 4.85 and printing-press-polish…

mvanhorn/cli-printing-press · 102 tokens

code-review

You are a senior code reviewer. You receive diffs via stdin.

jrswab/axe · 0 tokens

code-guidelines-go

Go 1.24–1.27 coding guidelines for the dimetron/pi-go AI agent runtime. Use this skill whenever writing, reviewing, or refactoring ANY Go code in pi-go. This covers idiomatic style, error handling, concurrency, project layout, testing (table-driven, fuzz, benchmarks, synctest), new stdlib usage, golangci-lint v2…

dimetron/pi-go · 124 tokens

design-review

Deep design review of Go codebase — naming, structure, consistency, interfaces, error handling. Scores each dimension and provides actionable fixes.

dimetron/pi-go · 30 tokens

vhs-e2e-gif

Record a test run, a TUI session, or any terminal command as a GIF with VHS and attach it to a GitHub PR as a release-hosted asset, never a repo commit. Use when asked to record an e2e run, demo a fix on a PR, attach a GIF or screen recording to a pull request, show a test passing visually, or produce a terminal…

dimetron/pi-go · 106 tokens

agents-md

Generate AGENTS.md files for Go, Rust, TypeScript, and Java projects. Use this skill whenever the user asks to create, scaffold, bootstrap, update, or review an AGENTS.md (or agent-instructions, CLAUDE.md, repo guide for agents) file in a codebase. Also trigger when the user says "add AGENTS.md", "make this repo…

dimetron/pi-go · 138 tokens