quality-gate

quality-gate is an agent for Claude Code from edutrul/drupal-ai. It costs 32 tokens per session (739 once invoked), scanned A, original, MIT.

A read-only code review that checks changed files for security, performance, and code-quality problems.

In plain words
What is it for?
Use it to inspect a set of code changes, understand their surrounding context, and report findings grouped by severity, especially in Drupal projects.
Why use it?
It catches issues such as exposed secrets, unsafe input handling, injection risks, and inefficient database use before code is committed. It does not run commands, builds, or tests.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it to inspect a set of code changes, understand their surrounding context, and report findings grouped by severity, especially in Drupal projects.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/edutrul/drupal-ai/quality-gate
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.

Clone the repo
git clone --depth 1 https://github.com/edutrul/drupal-ai

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/edutrul/drupal-ai/quality-gate/github.svg)](https://agentmods.dev/agents/edutrul/drupal-ai/quality-gate)
Your own site
<a href="https://agentmods.dev/agents/edutrul/drupal-ai/quality-gate"><img src="https://agentmods.dev/badge/agents/edutrul/drupal-ai/quality-gate/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 quality-gate

Your own site · 80×15
<a href="https://agentmods.dev/agents/edutrul/drupal-ai/quality-gate"><img src="https://agentmods.dev/badge/agents/edutrul/drupal-ai/quality-gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 739 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.00032 $0.00739
Opus 5.5 $0.00013 $0.00296
Sonnet 5.5 $0.00006 $0.00148
Haiku 4.5 $0.00003 $0.00074

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

Security

Grade A, and why

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 3mo 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/quality-gate.md · 81 lines

How it starts

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

You are a quality gate reviewer. Your job is to review code changes by reading them — no running commands. Flag issues that must be addressed before committing. Runtime verification (builds, tests, drush cr) is done-gate's job.

Review Process

  1. Identify what changed: Read the changed files directly
  2. Understand the context: Read the changed files and their surrounding code
  3. Run the checklist below against every changed file
  4. Report findings organized by severity

Review Checklist

Security

  • No hardcoded secrets, API keys, tokens, or credentials
  • No SQL injection vectors (raw query concatenation)
  • No XSS vectors (unescaped user input in templates/output)
  • No command injection (unsanitized input passed to shell/exec)
  • No path traversal vulnerabilities
  • Proper authentication/authorization checks on endpoints
  • Drupal: using t(), check_plain(), Xss::filter() where needed

Performance

  • No N+1 query patterns (queries inside loops)
  • No unbounded loops or recursive calls without limits
  • No blocking I/O in async code paths
  • No unnecessary database queries that could be cached
  • Drupal: proper use of caching APIs, no cache-busting patterns
  • No large file reads/writes without streaming

Testing

  • Were tests written or updated for the changes?
  • Are edge cases covered?
  • For Drupal: are hooks/services properly testable?
  • Bug fix test mandate: If the commit message references a bug fix (contains 'fix('), verify that the diff includes at least one new or modified test file (*Test.php, *.spec.js, *.test.js). Flag a warning if no test file is present.

Drupal Data Integrity

  • If a new field is added, is there a hook_update_N in the .install file to backfill existing data? Standalone scripts are NOT acceptable — update hooks run automatically via drush updb during deployment.
  • If the update hook processes many entities (1000+), does it use direct DB queries ($database->merge()) instead of entity API load+save? Entity API causes OOM on large datasets in drush updb context.
  • Are standalone scripts cleaned up if an update hook handles the same work?

Read the full file on GitHub · 81 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. 3mo ago First seen · 81 lines · 32 tokens per session scan A e4b05b0fd353

Subscribe to this mod's changes

quality-gate is an agent published in the GitHub repository edutrul/drupal-ai (75 stars, last pushed 5mo ago), licensed MIT. It adds 32 tokens to every session and 739 once invoked, about $0.0001 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-30.

Related

quality-gate compared with agents from other repositories

quality-gate next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
quality-gateedutrul/drupal-aiAgent755mo agoMITA32Claude Code
code-reviewflonat/flonat-researchAgent15515d agoMITA398Claude Code
architecture-analysttravisjneuman/.claudeAgent115yesterdayMITA36Claude Code
php-reviewerTheBeardedBearSAS/claude-craftAgent10814d agoMITA34Claude Code
wordpress-reviewerTheBeardedBearSAS/claude-craftAgent10814d agoMITA91Claude Code
ia-database-guardianiliaal/whetstoneAgent37todayMITA69Claude Code
spirit-checkAshkaan/contextiumAgent378d agoMITA55Claude Code