code-quality

code-quality is a skill for Claude Code from atretyak1985/swarmery. It costs 54 tokens per session (948 once invoked), scanned A, original, Apache-2.0.

A read-only audit of TypeScript and Python code that measures structural issues such as long functions, deep nesting, complex logic, repeated code, and code smells.

In plain words
What is it for?
Use it to review structural code quality before planning fixes or refactoring.
Why use it?
It identifies code that is difficult to understand or maintain, with scores and file-and-line references. It does not change the source code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the core plugin — 37 skills, 8 commands, 13 agents shipped together

Good fit Use it to review structural code quality before planning fixes or refactoring.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/atretyak1985/swarmery/code-quality
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 atretyak1985/swarmery --skill code-quality
Clone the repo
git clone --depth 1 https://github.com/atretyak1985/swarmery

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 37 skills, 8 commands, 13 agents.

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

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

agentmods 80×15 button for code-quality

Your own site · 80×15
<a href="https://agentmods.dev/skills/atretyak1985/swarmery/code-quality"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/code-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 948 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.00054 $0.00948
Opus 5.5 $0.00022 $0.00379
Sonnet 5.5 $0.00011 $0.00190
Haiku 4.5 $0.00005 $0.00095

Measured 1mo ago against content hash 671012874d8a, 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 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.

plugins/core/skills/code-quality/SKILL.md · 99 lines

How it starts

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

Purpose

Score TypeScript or Python source on structural quality: function length, nesting depth, cyclomatic complexity, duplication, code smells, and project-specific anti-patterns. Every finding cites file:line; every category gets a 0–100 score. Audit only — this skill never edits code.

"Does this follow our conventions?" → code-standards, which owns any-type detection, naming, and imports. "Is this too long or too deeply nested?" → here.

Rules (never violate)

  1. Never edit source — findings and scores only; fixes go to @implementation-agent.
  2. Every finding carries a file:line citation and a severity (Error / Warning).
  3. Apply one threshold set per file — TypeScript thresholds never judge Python.
  4. Never grep for any or missing types; that is code-standards' scope.
  5. Skip generated, migration, and vendored files; blank and comment-only lines never count toward function length.
  6. Emit the machine-readable QUALITY-SCORE: header as the report's first line.

Resources

  • Read resources/audit-procedure.md before auditing: the threshold table, the 9-step procedure, the project-specific check list, the scoring formula, the self-check, escalation triggers, and failure modes.
  • Read resources/report-format.md when writing the report: the output template plus two worked examples (a TypeScript route handler, a Python device module).

How to use

What it does

Audits TypeScript or Python source for structural problems — functions that grew too long, blocks nested too deep, duplicated code, project anti-patterns — and returns a 0–100 score per category with every finding cited and a suggested fix. "This file feels messy" becomes a list you can act on.

When to use it

  • A file or module needs checking for function length, complexity, or nesting.
  • A pull request needs a structural quality assessment before review.
  • A periodic quality audit of a repo or module is due.
  • You just refactored and want proof the metrics improved.

Read the full file on GitHub · 99 lines

Files

What ships with it

2 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.

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. 1mo ago First seen · 99 lines · 54 tokens per session scan A 671012874d8a

Subscribe to this mod's changes

code-quality is a skill published in the GitHub repository atretyak1985/swarmery (7 stars, last pushed today), licensed Apache-2.0. It adds 54 tokens to every session and 948 once invoked, about $0.0002 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-03.

Related

Other skills, from other repositories

hone

Audit and improve an existing Quickstop plugin's quality against Claude Code plugin spec.

acostanzo/quickstop · 17 tokens

learn-from-sage

Detection-gap (miss) analysis for Code Review Sage. Learn from shipped fixes, acted-on human comments, and design outcomes to close reviewer blind spots. Inline during review stages a candidate; a human triggers a one-shot AI consolidation into the live ruleset.

kirodotdev/KiroCrew · 56 tokens

code-standards

Code quality standards and style guide for reviewing pull requests.

mastra-ai/mastra · 15 tokens

manage-pull-requests

Manage Harness Code pull requests via MCP. List, create, update, and merge PRs; add reviewers and submit review decisions (approve / request changes); post, update, and delete comments; read the discussion timeline; and check CI status. Use when asked to open a PR, merge a PR, approve a PR, leave a code review…

harness/harness-skills · 123 tokens

sonarqube-mcp

Provides SonarQube and SonarCloud integration patterns via the Model Context Protocol (MCP) server. Enables quality gate monitoring, issue discovery and triaging, pre-push code analysis, and rule education directly in the agent workflow. Use when the user wants to check quality gates, search for Sonar issues, analyze…

giuseppe-trisciuoglio/developer-kit · 127 tokens

audit

Repo audits, one mode or all (codebase, docs, process, perf, tests, threat-model, motion, SEO, debt). Triggers "audit the codebase", "full audit", "perf audit", "audit the tests", "threat model", "motion audit", "seo audit", "debt ledger".

darkroomengineering/cc-settings · 69 tokens