code-quality-guardian

code-quality-guardian is a skill for Claude Code, Codex from Ow1onp/hermes-agent-skills. It costs 44 tokens per session (1,540 once invoked), scanned A, original, MIT.

A pre-merge code review that checks security, complexity, style, tests, documentation, and dependencies before code enters the main branch.

In plain words
What is it for?
Use it before committing or merging code to look for issues such as secrets, injection risks, overly complex functions, missing tests, and unhealthy dependencies.
Why use it?
It catches common quality and maintenance problems before they become part of the shared codebase.

Skill for Claude CodeCodex

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

Good fit Use it before committing or merging code to look for issues such as secrets, injection risks, overly complex functions, missing tests, and unhealthy dependencies.

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

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-guardian

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ow1onp/hermes-agent-skills/code-quality-guardian"><img src="https://agentmods.dev/badge/skills/ow1onp/hermes-agent-skills/code-quality-guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,540 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.00044 $0.01540
Opus 5 $0.00022 $0.00770
Sonnet 5 $0.00009 $0.00308
Haiku 4.5 $0.00004 $0.00154

Measured 9d ago against content hash df3f9a0ac8ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

code-quality-guardian 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 9d 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.

skills/verify/code-quality-guardian/SKILL.md · 130 lines

How it starts

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

代码质量守护者 (Code Quality Guardian)

1. 概述

代码质量不是可选项——它是软件可维护性的基石。本技能在代码进入主分支之前,执行六轴质量门禁,系统性拦截低质量代码。每个轴都有明确的通过/失败标准,不给 "以后优化" 留借口。

与 Hermes Agent 深度集成:利用 patch 工具自动修复低悬果实,利用 delegate_task 并行审查多个文件,利用 /curator 追踪项目质量趋势。

2. 核心流程

2.1 六轴质量门禁

┌──────────────────────────────────────────────────┐
│         代码质量六轴门禁 (Six-Axis Gate)           │
├──────────┬──────────┬──────────┬─────────────────┤
│ 🔒 安全   │ 📐 复杂度 │ 🎨 风格  │ ✅ 测试覆盖     │
│ Security │Complexity│  Style   │Test Coverage   │
├──────────┼──────────┼──────────┼─────────────────┤
│ 📝 文档   │ 📦 依赖   │          │                 │
│   Docs   │   Deps   │          │                 │
└──────────┴──────────┴──────────┴─────────────────┘

2.2 各轴检查标准

🔒 安全 (Security)

  • 无硬编码密钥/密码/Token
  • 无 SQL 注入风险(使用参数化查询)
  • 无 XSS 风险(输出编码)
  • 敏感操作有授权检查
  • 文件上传有类型/大小限制
# Hermes 工具集成
search_files(pattern="(api_key|password|secret|token)\s*=\s*['"]", target="content")
# 利用 Hermes 的 search_files 进行安全模式扫描

📐 复杂度 (Complexity)

  • 单函数 ≤ 30 行(超过拆分为子函数)
  • 圈复杂度 ≤ 10
  • 嵌套深度 ≤ 3 层
  • 单文件 ≤ 500 行
  • 函数参数 ≤ 5 个(超过用配置对象)

🎨 风格 (Style)

  • 一致的命名规范(snake_case / camelCase)
  • 无注释掉的代码(用 Git 历史)
  • console.log / print 调试残留
  • import 顺序规范(标准库 → 第三方 → 本地)

✅ 测试覆盖 (Test Coverage)

  • 新增代码行覆盖率 ≥ 80%
  • 关键路径有集成测试
  • 无 skip/xfail 的 "临时跳过"

📝 文档 (Documentation)

  • 公开 API 有 docstring/JSDoc
  • 复杂逻辑有行内注释解释 "为什么" 而非 "做什么"
  • README/CHANGELOG 已更新

📦 依赖 (Dependencies)

  • 无已知漏洞的依赖版本
  • 无未使用的依赖
  • 依赖版本锁定(lockfile 已更新)

2.3 Hermes 工具链集成

# 加载技能
/skill code-quality-guardian

# 自动审查流程
# 1. 搜索安全漏洞
search_files(pattern="password\s*=", target="content", path="src/")

# 2. 运行 linter
terminal(command="ruff check src/", timeout=30)

# 3. 运行测试并检查覆盖率
terminal(command="pytest --cov=src/ --cov-report=term-missing", timeout=120)

# 4. 依赖审计
terminal(command="pip-audit", timeout=60)

# 5. 用 patch 工具自动修复低悬果实
patch(path="src/bad.py", old_string="print(f'debug: {x}')", new_string="")

2.4 自进化机制

  1. 质量趋势面板:追踪每次审查的六轴得分,可视化质量变化
  2. 高频违规模式库:自动识别项目中最频繁的质量违规,生成团队培训建议
  3. 门禁阈值自适应:根据项目成熟度动态调整阈值(新项目宽松,核心模块严格)
  4. 自动修复规则积累:将已验证的自动修复模式(如删除 debug print)沉淀为规则

Read the full file on GitHub · 130 lines

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. 9d ago First seen · 130 lines · 44 tokens per session scan A df3f9a0ac8ca

Subscribe to this mod's changes

code-quality-guardian is a skill published in the GitHub repository Ow1onp/hermes-agent-skills (3 stars, last pushed 2mo ago), licensed MIT. It adds 44 tokens to every session and 1,540 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

code-reviewer

6-aspect structured code review (security, architecture, error handling, test gaps, type safety, simplification) with calibrated scoring and per-aspect breakdown. Use when the user asks to review code, check a PR, review a pull request, audit changes before merge, or give code feedback.

nguyenthienthanh/aura-frog · 64 tokens

refactor-expert

Guide safe, incremental refactoring that improves code quality without changing behavior.

nguyenthienthanh/aura-frog · 19 tokens

code-simplifier

Detect and simplify overly complex code. Apply KISS principle - less is more.

nguyenthienthanh/aura-frog · 21 tokens

codex-code-review

Automate code review remediation loops with the codex CLI. Requests reviews from codex, classifies findings by severity (P0-P4), fixes critical issues (P0/P1) through iterative cycles, defers quality improvements to backlog, and escalates after 3 review cycles. Use when working with code that needs structured…

NickCrew/Claude-Cortex · 85 tokens

solid-principles

SOLID principles checklist with Java examples. Use when a class has too many responsibilities, an abstraction leaks, or a dependency points the wrong way, and when the user asks about Single Responsibility, Open/Closed, Liskov, Interface Segregation or Dependency Inversion. For naming, duplication and method length…

decebals/claude-code-java · 73 tokens

tech-debt

Track, categorize, and prioritize technical debt across the codebase. Scans for debt indicators, maintains a debt register, and recommends repayment scheduling.

Donchitos/Claude-Code-Game-Studios · 33 tokens