Agent skill

Code Quality Standards

by Goldziher in Goldziher/ai-rulez

Concrete code-quality thresholds and anti-patterns: 120-char lines, max 20 cyclomatic complexity, max 4 nesting levels, max 50 lines per function, no magic numbers, no global state, composition over…

MITAuto-check passedDevelopment

Install Code Quality Standards

skills CLI
$ npx skills add Goldziher/ai-rulez --skill code-quality-standards -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Goldziher/ai-rulez code-quality-standards --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Goldziher/ai-rulez.git skills-src && mkdir -p .claude/skills && cp -r skills-src/internal/builtins/universal/code-quality/skills/code-quality-standards .claude/skills/code-quality-standards && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-quality-standards
GitHub stars
153
Token cost
~486 tokens
SKILL.md length
200 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Concrete code-quality thresholds and anti-patterns: 120-char lines, max 20 cyclomatic complexity, max 4 nesting levels, max 50 lines per function, no magic numbers, no global state, composition over…

  • Tasks that involve Code quality
  • SKILL.md covers Readability, Complexity limits, Anti-patterns and Duplication, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve State management

What it does

Code Quality Standards is an agent skill from Goldziher/ai-rulez. Concrete code-quality thresholds and anti-patterns: 120-char lines, max 20 cyclomatic complexity, max 4 nesting levels, max 50 lines per function, no magic numbers, no global state, composition over inheritance, no bare except, rule-of-three before extracting an abstraction, delete dead code instead of commenting it out. Load when writing a new function or module, reviewing a diff for quality, refactoring a long or deeply nested function, or deciding whether to extract shared logic.

Its SKILL.md is about 490 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code quality, State management and Refactoring. The repository describes itself as: One source of truth for AI assistant configs: 14 built-in presets (Claude, Cursor, Copilot, Codex, Gemini, Xum, …), full-parity custom presets, and distributable plugin bundles… The licence is MIT.

When your agent uses it

  • Tasks that involve Code quality
  • Tasks that involve State management
  • Tasks that involve Refactoring

Example prompts

  • “/code-quality-standards”

What it can do on your machine

Read from SKILL.md and the folder at commit c269bcb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Quality Standards loads about 486 tokens when it runs. Until then it costs about 128 tokens; SKILL.md has 200 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~128
When it runs · the whole SKILL.md, loaded when a task matches
~486

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Goldziher/ai-rulez at commit c269bcb, republished under its MIT licence (© Goldziher). 200 words, ~486 tokens.

Download SKILL.mdSave it as .claude/skills/code-quality-standards/SKILL.md (or your agent's skills folder).
name
code-quality-standards
description
Concrete code-quality thresholds and anti-patterns: 120-char lines, max 20 cyclomatic complexity, max 4 nesting levels, max 50 lines per function, no magic numbers, no global state, composition over inheritance, no bare except, rule-of-three before extracting an abstraction, delete dead code instead of commenting it out. Load when writing a new function or module, reviewing a diff for quality, refactoring a long or deeply nested function, or deciding whether to extract shared logic.

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.

© Goldziher, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in internal/builtins/universal/code-quality/skills/code-quality-standards of Goldziher/ai-rulez.

Open the folder on GitHubat commit c269bcb

Compare with similar skills

Code Quality Standards next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Quality Standards compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Quality Standards this skillGoldziher/ai-rulez153—~486Automated safety check: PassMIT
Eval Code QualityIbrahim-3d/orchestrator-supaconductor380—~1.5kAutomated safety check: PassAGPL-3.0
Systematic Code Refactoringluongnv89/claude-howto42k—~3kAutomated safety check: PassMIT
Dignified Python Standardsdocling-project/docling68k—~1.5kAutomated safety check: PassApache-2.0
Clean Code GuardamElnagdy/guard-skills1.3k2 repos~4.3kAutomated safety check: PassMIT
Code Refactoring Workflowluongnv89/claude-howto42k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Eval Code Quality

    Ibrahim-3d/orchestrator-supaconductor

    Specialized code quality evaluator for the Evaluate-Loop. An agent skill from Ibrahim-3d/orchestrator-supaconductor.

    380 GitHub stars~1.5k tokensUpdated 10 days ago
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    68k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Clean Code Guard

    amElnagdy/guard-skills

    Reviews generated or changed production code against Clean Code, SOLID, DRY, KISS, YAGNI and LLM-specific failure modes before it ships, in any language.

    1.3k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed
  • Code Refactoring Workflow

    luongnv89/claude-howto

    Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.

    42k GitHub stars~3.1k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Nuqs

    trycompai/crm

    nuqs (type-safe URL query state) best practices for Next.js and other React frameworks.

    11k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed

More from Goldziher/ai-rulez

All 11 skills in this repo
  • AI Rulez

    Goldziher/ai-rulez

    Manage AI assistant governance rules across 52 harnesses (Claude Code, Cursor, Codex, Copilot, Gemini CLI, OpenCode, Devin, and more) using ai-rulez.

    153 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Rust Conventions

    Goldziher/ai-rulez

    Rust code conventions covering edition 2024, cargo fmt/clippy, Result-based error handling, unsafe discipline, async with tokio, API-guideline naming, trait implementations, benchmarking, and…

    153 GitHub stars~746 tokensUpdated today
    Auto-check passed
  • Testing Conventions

    Goldziher/ai-rulez

    How to write a good test: behaviour-describing names (shouldreturnerrorwheninputisempty, givenwhenthen), exact-value assertions over truthiness, snapshot and property-based testing…

    153 GitHub stars~473 tokensUpdated today
    Auto-check passed
  • Vite Plus Conventions

    Goldziher/ai-rulez

    vite+ unified TypeScript toolchain conventions: the vp CLI for package/node management, oxlint/oxfmt, type-aware linting, vitest, rolldown/tsdown bundling, task caching, and migration.

    153 GitHub stars~567 tokensUpdated today
    Auto-check passed
  • Bindings

    Goldziher/ai-rulez

    Cross-language binding architecture rules: bindings as minimal glue, canonical API surface ordering (core, ABI, language), per-language test suites in CI, generated-code discipline, and error/async…

    153 GitHub stars~265 tokensUpdated today
    Auto-check passed
  • Cgo Bindings

    Goldziher/ai-rulez

    cgo conventions for linking Go to a C or Rust static library: import "C" directives, type/string conversion, CString memory management, thread safety, and Go pointer pinning.

    153 GitHub stars~371 tokensUpdated today
    Auto-check passed

Categories

Questions about Code Quality Standards

What does Code Quality Standards do?

Concrete code-quality thresholds and anti-patterns: 120-char lines, max 20 cyclomatic complexity, max 4 nesting levels, max 50 lines per function, no magic numbers, no global state, composition over…. Code Quality Standards is an agent skill from Goldziher/ai-rulez. Concrete code-quality thresholds and anti-patterns: 120-char lines, max 20 cyclomatic complexity, max 4 nesting levels, max 50 lines per function, no magic numbers, no global state, composition over inheritance, no bare except, rule-of-three before extracting an abstraction, delete dead code instead of commenting it out.

When should I use Code Quality Standards?

Code Quality Standards fits situations like: tasks that involve Code quality; tasks that involve State management; tasks that involve Refactoring.

How do I install Code Quality Standards in Claude Code?

Run `npx skills add Goldziher/ai-rulez --skill code-quality-standards -a claude-code`. Or copy the skill folder (internal/builtins/universal/code-quality/skills/code-quality-standards in Goldziher/ai-rulez) into .claude/skills/code-quality-standards in your project. Claude Code loads it when a task matches its description.

How do I install Code Quality Standards in Codex?

Run `npx skills add Goldziher/ai-rulez --skill code-quality-standards -a codex`. Or copy the skill folder (internal/builtins/universal/code-quality/skills/code-quality-standards in Goldziher/ai-rulez) into .agents/skills/code-quality-standards in your project. Codex loads it when a task matches its description.

Can I use Code Quality Standards in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Goldziher/ai-rulez --skill code-quality-standards -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-quality-standards, .gemini/skills/code-quality-standards, .github/skills/code-quality-standards and .opencode/skills/code-quality-standards in your project.

What does Code Quality Standards need to run?

SKILL.md names no scripts, command-line tools or credentials: Code Quality Standards is instructions for the agent only.

Does Code Quality Standards access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Quality Standards safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Quality Standards use?

Code Quality Standards is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Quality Standards use?

About 486 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Quality Standards?

Skills that share tags, products or a category with Code Quality Standards: Eval Code Quality (Ibrahim-3d/orchestrator-supaconductor, 380 stars), Systematic Code Refactoring (luongnv89/claude-howto, 42k stars), Dignified Python Standards (docling-project/docling, 68k stars) and Clean Code Guard (amElnagdy/guard-skills, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Quality Standards?

Goldziher (a GitHub user) maintains it in Goldziher/ai-rulez, which has 153 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 7, 2026.

Source: Goldziher/ai-rulez on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.