hydraflow: Agent for Claude Code

.claude/agents/hf.test-audit.md

test-audit is an agent for Claude Code from T-rav/hydraflow. It costs 57 tokens per session (8,084 once invoked), scanned A, original, Apache-2.0.

A test-code reviewer that checks whether tests are clear, consistent, and aligned with the project's own patterns. It looks at naming, the Arrange-Act-Assert structure, reusable factories and builders, assertions, and mock usage.

In plain words
What is it for?
Use it to audit test files, check that each test has a clear purpose, spot opportunities for factories or builders, and identify patterns such as multiple assertions or excessive mocking.
Why use it?
It finds tests that are hard to understand, too broad, overly dependent on mocks, or missing reusable setup helpers. This helps keep the test suite easier to maintain.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; positional $N argument.

This is T-rav/hydraflow's own configuration. It tells Claude Code how to work on hydraflow itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything hydraflow configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/T-rav/hydraflow/staging/.claude/agents/hf.test-audit.md
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 test-audit

README.md
[![agentmods](https://agentmods.dev/badge/agents/t-rav/hydraflow/hf.test-audit/github.svg)](https://agentmods.dev/agents/t-rav/hydraflow/hf.test-audit)
Your own site
<a href="https://agentmods.dev/agents/t-rav/hydraflow/hf.test-audit"><img src="https://agentmods.dev/badge/agents/t-rav/hydraflow/hf.test-audit/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 test-audit

Your own site · 80×15
<a href="https://agentmods.dev/agents/t-rav/hydraflow/hf.test-audit"><img src="https://agentmods.dev/badge/agents/t-rav/hydraflow/hf.test-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 8,084 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.00057 $0.08084
Opus 5.5 $0.00023 $0.03234
Sonnet 5.5 $0.00011 $0.01617
Haiku 4.5 $0.00006 $0.00808

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

Security

Grade A, and why

test-audit 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.

.claude/agents/hf.test-audit.md · 1,155 lines

How it starts

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

Test Audit Agent

Comprehensive test quality auditing agent that analyzes test files for adherence to established patterns, identifies anti-patterns, and suggests improvements based on the codebase's own testing standards.

Agent Purpose

Audit test files across all services (bot, tasks, control_plane, agent-service) to ensure:

  1. Naming conventions - Files and tests follow established patterns
  2. 3As structure - Arrange, Act, Assert clarity
  3. Single responsibility - One logical assertion per test
  4. Builders & Factories - Proper use and identification of missing opportunities
  5. Anti-pattern detection - Multiple assertions, over-mocking, incomplete setups

Established Standards (From Codebase Analysis)

1. Factory Pattern

Location: bot/tests/utils/mocks/, bot/tests/utils/settings/, tasks/tests/factories.py

Pattern:

class LLMProviderMockFactory:
    """Factory for creating mock LLM provider objects"""

    @staticmethod
    def create_mock_provider(response: str = "Test response") -> MagicMock:
        """Create basic mock LLM provider"""
        provider = MagicMock()
        provider.get_response = AsyncMock(return_value=response)
        provider.model = "test-model"
        return provider

    @staticmethod
    def create_provider_with_error(error: Exception) -> MagicMock:
        """Create LLM provider that raises errors"""
        provider = LLMProviderMockFactory.create_mock_provider()
        provider.get_response = AsyncMock(side_effect=error)
        return provider

Standards:

  • Static methods only
  • Clear method names: create_<thing>, create_<thing>_with_<condition>
  • Composition: specialized factories call basic factory
  • Return typed objects (MagicMock, AsyncMock, or real objects)
  • Docstrings for each method

2. Builder Pattern

Location: bot/tests/utils/builders/

Pattern:

class MessageBuilder:
    """Builder for creating message objects with fluent API"""

    def __init__(self):
        self._role = "user"
        self._content = "Test message"

    def as_user(self):
        """Set role as user"""
        self._role = "user"
        return self

    def as_assistant(self):
        """Set role as assistant"""
        self._role = "assistant"
        return self

    def with_content(self, content: str):
        """Set message content"""
        self._content = content
        return self

    def build(self) -> dict[str, Any]:
        """Build the message"""
        return {"role": self._role, "content": self._content}

Read the full file on GitHub · 1,155 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. 1mo ago First seen · 1,155 lines · 57 tokens per session scan A 1db8d645a5de

Subscribe to this mod's changes

test-audit is an agent published in the GitHub repository T-rav/hydraflow (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 57 tokens to every session and 8,084 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-31.

Related

Other agents, from other repositories

qa-tester

The QA Tester of the aSPARK team. Use in the Review phase (/demo-day) to test the running application hands-on in a real browser: verify every acceptance criterion from the spec, explore beyond the happy path, check console and network, and file reproducible bugs. Requires a browser integration (Claude in Chrome…

a-lottes/aSPARK · 79 tokens

bf-replay-auditor

Cites the decision that sanctions each behavioural replay divergence, or says none exists.

chan4lk/specclaw · 23 tokens

goal-evaluator-judge

Specialized loop-time verdict judge for the FlowGoal evaluator. Judges goal satisfaction by evaluating the embedded goal contract, the deterministic check report, and the evidence ledger (all delivered inline in the prompt under >> fences) — then returns a structured verdict of {achieved, notachieved, blocked…

synaptiai/synapti-marketplace · 161 tokens

finding-critic

Try to refute a consolidated review finding from the code itself, answering in a three-verdict grammar: AGREE, DISAGREEEVIDENCE with a file:line citation, or DISAGREECONCERN. Use when the grounding pass of a review fan-out audits P1/P2 findings before they are posted. Never re-prioritizes, re-categorizes, drops or…

synaptiai/synapti-marketplace · 87 tokens

test-runner

Discover and run project-specific lint, test, and type-check commands, reporting structured results with pass/fail status. Execute quality commands in parallel when possible. Use when running quality gates or verifying code changes.

synaptiai/synapti-marketplace · 45 tokens

verdict-judge

Judge implementation completeness by receiving acceptance criteria and an evidence bundle, then returning per-criterion verdicts of PASS, FAIL, or NEEDS-HUMAN-REVIEW. Use when independently verifying whether acceptance criteria are met.

synaptiai/synapti-marketplace · 49 tokens