hf.quality-gate

hf.quality-gate is a command for Claude Code from T-rav/hydraflow. It costs 0 tokens per session (439 once invoked), scanned A, original, Apache-2.0.

A sequence of checks for a Python codebase before work is called complete or committed: linting, type checking, security scanning, and tests.

In plain words
What is it for?
Use it after implementation, before a commit, or whenever you need to verify that the codebase passes its required checks.
Why use it?
It catches formatting problems, type errors, security findings, and broken tests before they are presented as finished work.

Command for Claude Code

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.

agentmods
npx agentmods add commands/t-rav/hydraflow/hf.quality-gate
Clone the repo
git clone --depth 1 https://github.com/T-rav/hydraflow

Made for: Claude Code.

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 hf.quality-gate

README.md
[![agentmods](https://agentmods.dev/badge/commands/t-rav/hydraflow/hf.quality-gate.svg)](https://agentmods.dev/commands/t-rav/hydraflow/hf.quality-gate)
Your own site
<a href="https://agentmods.dev/commands/t-rav/hydraflow/hf.quality-gate"><img src="https://agentmods.dev/badge/commands/t-rav/hydraflow/hf.quality-gate.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 439 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00439
Opus 5 $0.00000 $0.00219
Sonnet 5 $0.00000 $0.00088
Haiku 4.5 $0.00000 $0.00044

Measured 4d ago against content hash 5af56125dc3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hf.quality-gate 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 4d 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.

.claude/commands/hf.quality-gate.md · 75 lines

What it actually says

Quality Gate

Run a comprehensive quality check before declaring work complete or committing. This catches lint errors, type issues, and test failures BEFORE they accumulate.

When to Use

  • After finishing implementation, before committing
  • Anytime you want to verify the codebase is clean
  • Before presenting work as "done" to the user

Instructions

Run these checks sequentially (each depends on the prior passing):

Step 1: Lint (auto-fix)

make lint

If ruff fixes anything, report which files were modified. Re-stage those files if they were already staged.

Step 2: Type Check

make typecheck

If pyright reports errors, fix them immediately. Common issues:

  • Missing imports after ruff auto-removed unused ones
  • Type narrowing needed after refactoring
  • New function missing return type annotation

Step 3: Security Scan

make security

Fix any Medium+ findings from bandit.

Step 4: Tests

make test-fast

If tests fail:

  1. Read the failure output carefully
  2. Determine if it's a test bug or implementation bug
  3. Fix the root cause (not the symptom)
  4. Re-run only the failing test file to verify the fix
  5. Run the full suite again

Step 5: Report

Produce a summary:

QUALITY GATE: PASS/FAIL
- Lint: ✓/✗ (N files auto-fixed)
- Types: ✓/✗ (N errors)
- Security: ✓/✗ (N findings)
- Tests: ✓/✗ (N passed, N failed)

If any step fails and you cannot auto-fix it, stop and report the issue clearly.

Important

  • Do NOT skip steps or declare early success
  • Do NOT use --no-verify to work around failures
  • If lint auto-fixes create type errors, fix the type errors too
  • This is the minimum bar — run make quality for the full parallel check
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. 4d ago First seen · 75 lines · 0 tokens per session scan A 5af56125dc3e

Subscribe to this mod's changes

hf.quality-gate is a command published in the GitHub repository T-rav/hydraflow (5 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 439 tokens. 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.