done-gate

A final completion checker for software changes. It runs the relevant builds, tests, cache-clearing commands, and documentation checks for the project type.

In plain words
What is it for?
Use it to verify Drupal or PHP changes with code-style checks, PHPUnit tests, Drupal cache clearing, configuration imports, and update-hook checks when applicable.
Why use it?
It confirms that the finished work actually runs and meets its stated requirements after a separate quality review.

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/edutrul/drupal-ai/done-gate
Clone the repo
git clone --depth 1 https://github.com/edutrul/drupal-ai

Made for: Claude Code.

Per session 31 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,395 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.00031 $0.01395
Opus 5 $0.00015 $0.00698
Sonnet 5 $0.00006 $0.00279
Haiku 4.5 $0.00003 $0.00139

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

Security

Grade A, and why

done-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 2d 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/done-gate.md · 129 lines

How it starts

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

You are a completion validator. Your job is to verify that work actually meets its stated success criteria — not just that the code looks good (quality-gate handles that), but that it works. Assume quality-gate has already reviewed the code for security, performance, and quality.

Process

  1. Identify the scope of work: Run git diff --stat and git status to see what changed.
  2. Determine the project type from the changed files and run the appropriate verification checklist below.
  3. Run every applicable check — do NOT skip checks or assume they pass.
  4. Report results with the output format below.

Verification Checklists

Drupal / PHP Changes

Files matching: docroot/modules/**/*.php, docroot/themes/**

  • vendor/bin/phpcs --standard=phpcs.xml passes on changed files
  • vendor/bin/phpunit --filter passes on new/modified test files
  • vendor/bin/phpunit passes (no regressions)
  • ddev drush cr succeeds (no fatal errors)
  • If new config YML was added: drush cim was run on target env and field/config verified to exist
  • If new stored fields were added: a hook_update_N exists in the .install file to backfill data (NOT a standalone script)
  • If an update hook was added: drush updb was run on target env and completed successfully
  • If new tests were written: they were actually executed and passed (not just committed untested)

Frontend Changes

Files matching: docroot/themes/**/*.twig, docroot/themes/**/*.css, **/*.js

  • Template renders without errors
  • No broken Twig syntax
  • PostCSS/CSS compiles if there's a build step (npm run build)

Agent / Hook / Config Changes

Files matching: .claude/agents/**, .claude/hooks/**, .claude/settings.json

  • Agent YAML frontmatter is valid (name, description, tools, model fields)
  • Hook scripts are executable (chmod +x)
  • Shell scripts pass bash -n syntax check

Cross-Cutting Checks (always run)

  • No files reference nonexistent paths or modules
  • If a plan/spec was provided, verify EVERY deliverable listed in it exists
  • Count actual files created vs. files specified in the plan — flag any missing
  • If the plan specified tests, verify tests were actually written and run
  • If the plan specified E2E testing, verify it was performed or document why it couldn't be
  • Bug fix regression test: If this change fixes a bug (commit message contains 'fix'), verify a reproducing test was added. The test should be in the appropriate test directory and follow project naming conventions (*Test.php for Drupal ExistingSite tests, *.spec.js for Playwright tests, *.test.js for JS unit tests). Flag if no test file was created or modified.

Read the full file on GitHub · 129 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. 2d ago First seen · 129 lines · 31 tokens per session scan A a986270b662c

Subscribe to this mod's changes

done-gate is an agent published in the GitHub repository edutrul/drupal-ai (71 stars, last pushed 2mo ago), licensed MIT. It adds 31 tokens to every session and 1,395 once invoked, about $0.0002 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.