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.
npx skills add Ow1onp/hermes-agent-skills --skill code-quality-guardiangit clone --depth 1 https://github.com/Ow1onp/hermes-agent-skillsWrote 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.
[](https://agentmods.dev/skills/ow1onp/hermes-agent-skills/code-quality-guardian)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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 自进化机制
- 质量趋势面板:追踪每次审查的六轴得分,可视化质量变化
- 高频违规模式库:自动识别项目中最频繁的质量违规,生成团队培训建议
- 门禁阈值自适应:根据项目成熟度动态调整阈值(新项目宽松,核心模块严格)
- 自动修复规则积累:将已验证的自动修复模式(如删除 debug print)沉淀为规则
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.
- 9d ago First seen · 130 lines · 44 tokens per session scan A df3f9a0ac8ca
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.
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.
refactor-expert
Guide safe, incremental refactoring that improves code quality without changing behavior.
code-simplifier
Detect and simplify overly complex code. Apply KISS principle - less is more.
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…
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…
tech-debt
Track, categorize, and prioritize technical debt across the codebase. Scans for debt indicators, maintains a debt register, and recommends repayment scheduling.