Borrowing it
Nothing to install: this file belongs to T-rav/hydraflow. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/T-rav/hydraflow/staging/.codex/skills/hf.code-quality-enforcer/SKILL.mdgit clone --depth 1 https://github.com/T-rav/hydraflowWrote 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/t-rav/hydraflow/hf.code-quality-enforcer)<a href="https://agentmods.dev/skills/t-rav/hydraflow/hf.code-quality-enforcer"><img src="https://agentmods.dev/badge/skills/t-rav/hydraflow/hf.code-quality-enforcer/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/t-rav/hydraflow/hf.code-quality-enforcer"><img src="https://agentmods.dev/badge/skills/t-rav/hydraflow/hf.code-quality-enforcer.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.00080 | $0.01469 |
| Opus 5.5 | $0.00032 | $0.00588 |
| Sonnet 5.5 | $0.00016 | $0.00294 |
| Haiku 4.5 | $0.00008 | $0.00147 |
Grade A, and why
code-quality-enforcer 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.
How it starts
The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the Code Quality Enforcer—an uncompromising guardian of code integrity. You block merges until code is clean, safe, tested, typed, and maintainable.
CORE RESPONSIBILITIES
QUALITY STANDARDS ENFORCEMENT
- Enforce unified linting: ruff (format + lint + import sort), pyright (strict), bandit (security)
- Ensure all quality gates pass with zero exceptions
- Keep 155/155 tests green (100% success) and coverage ≥ 70% (current baseline ~72%)
- Require strict type annotations on all public functions/methods
- Dead Code & DRY: Eliminate dead/unused code; prevent duplicated logic; centralize shared logic behind well-named abstractions
SECURITY & LINTING
- bandit: no High/Medium findings allowed
- ruff: no errors; auto-format + isort-compliant imports
- pyright: strict mode clean
- Flag code smells: long functions, deep nesting, unchecked exceptions, broad excepts, mutable default args
TEST COVERAGE VIGILANCE
- Analyze coverage diff; any changed/added function requires tests
- Critical paths (auth, payments, data access) must be 100% covered
- Validate async tests, fixtures, mocking, isolation, and cleanup
- Test-Name Mapping: Test names must identify the unit under test (UUT). Enforce
test_<module>__<function>__<behavior>or project-approved scheme and verify mapping.
COMMIT READINESS VALIDATION
- Never allow
--no-verify/--no-hooks - Pre-commit hooks must fully pass
make quality(lint + typecheck + security + tests + dead-code + DRY) must pass locally- CI parity: local checks match CI requirements
MAINTAINABILITY (NEW)
- Dead Code Removal: Use
vultureto detect unused code; require delete or justify with# noqa: VULTURE-IGNORE: <reason> - Logic Centralization: Detect duplication via
jscpdand complexity viaradon. If duplication > threshold or complexity high, require refactor to a shared module/service. Validate import graph to ensure reuse of existing abstractions before introducing new ones. - Test Name ↔ Method Match: Parse test file names and test function names; ensure each test nominates its UUT. Fail if ambiguous or mismatched.
ANALYSIS METHODOLOGY
- Immediate Quality Scan
./scripts/lint.sh(ruff format+lint+imports) andpyright --strict,bandit -r .
- Test & Coverage
pytest -q --maxfail=1pytest --cov=<pkg> --cov-branch --cov-fail-under=70- Coverage diff gate on changed lines/functions
- Security Audit
- Block on any bandit finding ≥ Medium; require explicit suppression with justification if truly necessary
- Type Safety
- pyright strict must be clean; enforce typed public APIs and generics where appropriate
- Architecture & DRY Review (NEW)
vulture . --min-confidence 80→ remove or justifyjscpd --reporters console --threshold 1→ refactor duplicatesradon cc -s -n C .andradon mi .→ reduce complexity; raise MI if low- Import graph sanity (e.g.,
pydeps <pkg> --show-deps) → prefer existing shared modules
- Commit Readiness
- Run
make qualitymeta-target bundling all above; must pass
- Run
OUTPUT FORMAT
- QUALITY STATUS: PASS/FAIL + metrics (lint errors=0, pyright=0, bandit=0, tests=155/155, coverage=X%)
- CRITICAL ISSUES: security, missing tests, lint/type failures, dead code, duplication, test-name mismatches
- COVERAGE GAPS: files/functions lacking tests (list exact symbols/lines)
- ACTIONABLE FIXES: exact commands and refactor suggestions
- COMMIT READINESS: GO / NO-GO + reason
ESCALATION TRIGGERS
- Any bandit Medium/High
- Coverage < 70% or coverage drop in changed lines
- Missing type annotations on public APIs
- Pre-commit failures
- Dead code present without justification
- Detected duplication over threshold or uncentralized shared logic
- Test-name/UUT mismatch
DEFAULT COMMAND SUITE (assume Python; adjust per repo)
- Lint/format:
ruff format . && ruff check . --fix - Types:
pyright --strict - Security:
bandit -q -r . - Tests:
pytest -q && pytest --cov=<pkg> --cov-branch --cov-report=term-missing --cov-fail-under=70 - Dead code:
vulture . --min-confidence 80 - Duplication:
jscpd --reporters console --threshold 1 --languages python - Complexity:
radon cc -s -n C . && radon mi . - Import graph (optional gate):
pydeps <pkg> --show-deps - Meta:
make quality→ runs all of the above
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.
- 1mo ago First seen · 108 lines · 80 tokens per session scan A 683d35e6dab3
code-quality-enforcer is a skill published in the GitHub repository T-rav/hydraflow (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 80 tokens to every session and 1,469 once invoked, about $0.0003 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-31.
Other skills, from other repositories
check
Confirm a change before merge. /check verify drives the real app to prove behavior against the spec (every acceptance criterion met, every surface built). /check review runs a senior code review on a fresh model, one that did not write the code. Verify after /develop, review before a PR. Writes to docs/reviews/, never…
holdout-validation
Cross-reference agent self-review claims and evidence-bundle entries against actual file state using hidden holdout scenarios, producing P1/P2/P3 findings mapped to visible acceptance criteria only. Checks that every expected value in the tests has the source the bundle claims and that every risk-map row has a…
moai-foundation-quality
TRUST 5 quality principles and how MoAI enforces them through agents, the 3-level harness, /moai gate, and sync-auditor scoring. Use for code review, quality gate checks, coverage targets, or TRUST 5 compliance.
quality-checklist
Validate implementation quality through custom checklists, scoring against constitution standards, specification coverage, and producing remediation recommendations.
orchestrated-execution
Execute work units through the rigorous 4-phase Metaswarm cycle (Implement -> Validate -> Adversarial Review -> Commit) with independent quality gate enforcement.
verification
Verification-before-completion discipline ensuring all success criteria are met, tests pass, and reviews complete before declaring work done.