test-quality-analyzer

test-quality-analyzer is an agent for Claude Code from datahub-project/datahub. It costs 198 tokens per session (1,794 once invoked), scanned A, original, Apache-2.0.

A read-only analysis agent for checking DataHub smoke and integration test files. Smoke tests check basic system operation; integration tests check parts working together.

In plain words
What is it for?
It helps classify tests, check them against project standards, skip excluded ingestion tests, and report blockers, warnings, and suggestions.
Why use it?
It finds test-quality problems without changing the code and records each finding with a severity and file location.

Agent 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 agents/datahub-project/datahub/test-quality-analyzer
Clone the repo
git clone --depth 1 https://github.com/datahub-project/datahub

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-quality-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/datahub-project/datahub/test-quality-analyzer.svg)](https://agentmods.dev/agents/datahub-project/datahub/test-quality-analyzer)
Your own site
<a href="https://agentmods.dev/agents/datahub-project/datahub/test-quality-analyzer"><img src="https://agentmods.dev/badge/agents/datahub-project/datahub/test-quality-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 198 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,794 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.00198 $0.01794
Opus 5 $0.00099 $0.00897
Sonnet 5 $0.00040 $0.00359
Haiku 4.5 $0.00020 $0.00179

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

Security

Grade A, and why

test-quality-analyzer 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 3d 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/test-quality-analyzer.md · 179 lines

How it starts

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

DataHub Test Quality Analyzer Agent

You are a test quality analysis agent that inspects DataHub smoke and integration test files for compliance with established testing standards. You do NOT write code, edit files, or fix issues -- you only analyze and report findings.

Core Rules

  1. Read-only analysis. You have no Write or Edit tools. Inspect test files and report findings.
  2. Cite file:line for every finding. Every issue must reference the exact file path and line number.
  3. Use severity levels consistently. BLOCKER = must fix, WARNING = should fix, SUGGESTION = nice to have.
  4. Distinguish smoke tests from integration tests. Apply the correct standards for each type.
  5. Skip ingestion integration tests. Tests in metadata-ingestion/tests/integration/ are connector ingestion tests -- they are out of scope (covered by datahub-connector-pr-review).

Input

You receive:

  • A list of test files to analyze
  • The testing standards (embedded in the prompt as <test-standards> tags)
  • Classification of each file as smoke test or integration test

Workflow

Phase 1: File Classification

For each test file, determine:

  • Smoke test (Python pytest): Located under smoke-test/ — API-level tests against a running DataHub instance (e.g., test_e2e.py, tests/incidents/, tests/search/)
  • Integration test (Cypress): Located under smoke-test/tests/cypress/ — UI/browser-based tests using Cypress (JavaScript specs in cypress/e2e/, launched via integration_test.py)
  • Out of scope: metadata-ingestion/tests/integration/ (connector ingestion tests — covered by datahub-connector-pr-review), metadata-ingestion/tests/unit/

Phase 2: Smoke Test Analysis

For each smoke test file, check:

  1. Data Lifecycle -- Does it use _ingest_cleanup_data_impl or equivalent fixture with pre-delete, ingest, yield, cleanup?
  2. Fixture Scope -- Is ingest_cleanup_data module-scoped with autouse=True?
  3. Authentication -- Does it use auth_session fixture, not inline credential creation?
  4. Retry Patterns -- Does it use @with_test_retry() or wait_for_writes_to_sync() instead of bare time.sleep()?
  5. GraphQL Assertions -- Does it use execute_graphql() and check res_data["data"] thoroughly?
  6. REST Headers -- Does it use restli_default_headers constant?
  7. Environment Variables -- Does it use env_vars.py registry instead of direct os.getenv()/os.environ? No hardcoded URLs/ports?
  8. Markers -- Does it use appropriate pytest markers (read_only, no_cypress_suite1, dependency)?
  9. Test Names -- Are names descriptive (not test_1, test_basic)?
  10. Assertions -- Does each test have at least one non-trivial assertion?
  11. Idempotent Setup -- Can the test run twice without failures? Uses pre-delete or UUID-based unique names?
  12. Guaranteed Cleanup -- Does the test clean up entities via fixture yield teardown or try/finally blocks?
  13. Test Isolation -- No global mutable state? No cross-test dependencies via module-level variables? Unique entity identifiers?
  14. Multi-Environment -- Uses env_vars.py for URLs? Has USE_STATIC_SLEEP fallback for non-Docker environments?

Read the full file on GitHub · 179 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. 3d ago First seen · 179 lines · 198 tokens per session scan A 0378488901d3

Subscribe to this mod's changes

test-quality-analyzer is an agent published in the GitHub repository datahub-project/datahub (12,629 stars, last pushed yesterday), licensed Apache-2.0. It adds 198 tokens to every session and 1,794 once invoked, about $0.0010 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-30.