checking-code-quality

checking-code-quality is a skill for Claude Code, Codex from telagod/code-abyss. It costs 45 tokens per session (1,114 once invoked), scanned A, original, MIT.

A code-review checklist for measuring complexity, repeated code, naming, file and function size, and related readability issues. Its thresholds are guidelines that still require engineering judgment.

In plain words
What is it for?
Use it to run quality gates, identify code smells, check lint-related rules, and decide which complex or repetitive code should be split or revised.
Why use it?
It turns common code-quality concerns into repeatable checks, making problems easier to find after refactoring, during reviews, or before a commit.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present.

Part of the code-abyss plugin — 39 skills shipped together

Good fit Use it to run quality gates, identify code smells, check lint-related rules, and decide which complex or repetitive code should be split or revised.

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

Made for: Claude Code, Codex.

Or install code-abyss, the plugin that ships this one along with the rest of its 39 skills.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/telagod/code-abyss/checking-code-quality"><img src="https://agentmods.dev/badge/skills/telagod/code-abyss/checking-code-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,114 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00045 $0.01114
Opus 5.5 $0.00018 $0.00446
Sonnet 5.5 $0.00009 $0.00223
Haiku 4.5 $0.00005 $0.00111

Measured 1mo ago against content hash a3ddb3610496, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/quality_checker.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/checking-code-quality/SKILL.md · 103 lines

How it starts

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

代码质量校验关卡

阈值是 heuristic,不是判决。主动判断哪些超标值得拆,哪些是合理复杂度。

何时使用

场景 跑 判据
重构完成 ✅ 验证拆分有效,未引入新异味
复杂模块新增 ✅ 早期发现可读性问题
提交前(>30 行变更) ✅ 防腐烂
PR review ✅ 客观度量替代主观争论
紧急修复 ❌ 优先稳定,质量在收口阶段补
算法/性能关键路径 ⚠ 工具阈值不适用,按性能基准判断

abyss 集成

如果 abyss 可用,质量检查时额外使用 hotspot 数据:

abyss map --json  # 获取热点文件列表
  • hotspot_score > 10000 的文件:标记为「高风险热点」,优先拆分
  • change_count > 20 且 complexity > 100:建议拆分为更小的文件/函数
  • coupling_score > 80%:提醒耦合文件需要同步审查

阈值与处置

指标 阈值 超标处置 何时容忍
圈复杂度 ≤10 拆分函数、引入策略模式 有限状态机/解析器(结构性复杂)
函数长度 ≤50 行 提取子函数 配置/常量声明、大型 switch
文件长度 ≤500 行 拆分模块 自动生成代码、protobuf
参数数量 ≤5 封装参数对象 构造函数(builder 模式更佳)
嵌套深度 ≤4 早返回、提取函数、查表 罕见情况下的状态机
行长度 ≤120 换行 长字符串字面量、SQL

例外说明:bin/ 下带 Node shebang 的 CLI 入口按命令编排层处理,不参与文件长度阈值;其业务逻辑仍应优先下沉到 bin/lib/。

代码异味

异味 严重度 处置
重复代码 >10 行 High 提取公共函数;判断是否真重复(结构相似但语义不同时不要强抽)
参数 >5 个 Medium 封装参数对象
魔法数字 Medium 提取常量;常见数(0, 1, 2)可豁免
死代码/注释代码块 Low 删除;用 git history 追溯,不要靠注释保留

命名规范

实体 规则
类 PascalCase
函数 snake_case (Python/Rust) / camelCase (JS/TS/Go)
常量 UPPER_SNAKE
变量 snake_case / camelCase(按语言)

跨语言项目按主语言定,不混搭。

判断式重构

# 深嵌套 → 早返回
def process(data):
    if not c1: return
    if not c2: return
    # 主逻辑

# 重复 → 提取
def common(): ...
def f1(): common()
def f2(): common()

重构红线:测试不绿不重构。先把测试补齐,才有改动的安全网。

与其他 skill 联动

使用

node scripts/quality_checker.js <路径>
node scripts/quality_checker.js <路径> -v       # 详细
node scripts/quality_checker.js <路径> --json   # CI 用

收口

报告以 quality_checker.js 实际输出为准。超标项要么修复,要么在 DESIGN.md 留「为何接受」的说明。不允许悄悄忽略。

Read the full file on GitHub · 103 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 · 103 lines · 45 tokens per session scan A a3ddb3610496

Subscribe to this mod's changes

checking-code-quality is a skill published in the GitHub repository telagod/code-abyss (244 stars, last pushed 2mo ago), licensed MIT. It adds 45 tokens to every session and 1,114 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-08-30.

Related

Other skills, from other repositories

silent-failure-hunter

Audits error-handling code in a pull request for silent failures, broad catch blocks, unjustified fallbacks, and unactionable error messages. Surfaces hidden failures users would otherwise hit in production. Use when reviewing PRs that add or modify try/catch, error callbacks, or fallback logic.

jasmedia/cc-pr-reviewer · 67 tokens

aitask-explorechat

Chat-native explore flow for a bug report — machine-spawned by the chatlink gateway, every decision routed through the file-spool Q&A relay instead of AskUserQuestion, ending in a task-creation payload.json. Not a user task command.

beyondeye/aitasks · 57 tokens

quaere-evidence

This skill should be used whenever the user asks to investigate unclear bugs, defend or reject PR review comments, triage CI failures or flaky tests, review risky/security/database/concurrency/external-API changes or multi-file refactors, or make any claim that needs evidence before patching. It enforces a falsifiable…

haru0416-dev/quaere · 98 tokens

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

audit

Fast quality gate — detects stack, runs static analysis, checks cross-layer consistency, fixes issues. Run between every pipeline phase, before every commit push, after every feature batch. Lighter than /analyze but catches the same critical issues.

skillmds/skillmd · 50 tokens

logic-lens

AI-powered Claude Code skill that performs deep code review using formal logic and reasoning frameworks to detect bugs, anti-patterns, and security risks beyond what linters catch.

skillmds/skillmd · 37 tokens