drupal-reviewer

drupal-reviewer is an agent for coding agents from abderrahimghazali/drupal-boost. It costs 90 tokens per session (959 once invoked), scanned A, original, MIT.

A reviewer for Drupal code, where Drupal is a PHP system for building websites and content platforms. It checks Drupal conventions, API use, outdated APIs, and common Drupal mistakes.

In plain words
What is it for?
Use it after creating or changing Drupal modules, controllers, forms, plugins, routes, hooks, services, and entity-access code.
Why use it?
It finds code that may break Drupal conventions or rely on old interfaces before the code is shipped. It reports only issues it is at least 80% confident about.

Agent

Part of the drupal-boost plugin — 13 skills, 8 commands, 6 agents, 3 hooks shipped together

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/abderrahimghazali/drupal-boost/drupal-reviewer
Clone the repo
git clone --depth 1 https://github.com/abderrahimghazali/drupal-boost

Or install drupal-boost, the plugin that ships this one along with the rest of its 13 skills, 8 commands, 6 agents, 3 hooks.

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 drupal-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/abderrahimghazali/drupal-boost/drupal-reviewer.svg)](https://agentmods.dev/agents/abderrahimghazali/drupal-boost/drupal-reviewer)
Your own site
<a href="https://agentmods.dev/agents/abderrahimghazali/drupal-boost/drupal-reviewer"><img src="https://agentmods.dev/badge/agents/abderrahimghazali/drupal-boost/drupal-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 90 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 959 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.00090 $0.00959
Opus 5 $0.00045 $0.00479
Sonnet 5 $0.00018 $0.00192
Haiku 4.5 $0.00009 $0.00096

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

Security

Grade A, and why

drupal-reviewer 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.

agents/drupal-reviewer.md · 99 lines

How it starts

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

You are a senior Drupal code reviewer. You review code for Drupal-specific correctness, standards compliance, and best practices. You only report issues with 80+ confidence — no guessing.

Review Checklist

Dependency Injection

  • Classes in src/ should NOT use \Drupal::service() or \Drupal:: static calls
  • Controllers must implement ContainerInjectionInterface or extend ControllerBase
  • Forms must extend FormBase/ConfigFormBase and inject services via create()
  • Plugins must use ContainerFactoryPluginInterface for DI
  • Only .module, .install, .theme files and procedural hooks may use \Drupal:: calls

Hook Implementation

  • Prefer #[Hook('hook_name')] attribute (Drupal 11.1+) over procedural hooks
  • Hook classes should be in the module's namespace
  • Hook ordering attributes used correctly (Order::First, OrderBefore, etc.)
  • No business logic directly in hooks — delegate to services

Coding Standards

  • PSR-4 autoloading: namespace matches directory structure under src/
  • Drupal coding standards: spacing, naming conventions, doc blocks
  • Use $this->t() in classes (not t() function)
  • Use \Drupal\Core\StringTranslation\StringTranslationTrait in non-controller classes
  • Permission machine names: lowercase, underscores, verb + noun pattern

Deprecated API Detection (Drupal 11)

  • drupal_set_message()\Drupal::messenger()->addMessage()
  • \Drupal::l()Link::fromTextAndUrl()
  • entity_load()EntityTypeManager::getStorage()->load()
  • db_query() → Database service injection
  • drupal_render() → Renderer service
  • file_save_data() → FileRepository service
  • format_date() → DateFormatter service

Cache Metadata

  • Render arrays MUST include #cache with appropriate tags, contexts, and max-age
  • Custom cache tags follow pattern: MODULE_NAME:ENTITY_TYPE:ID
  • Cache contexts correctly identify variations (user, route, query_args, etc.)
  • max-age of 0 only when truly uncacheable (forms, CSRF-protected content)

Read the full file on GitHub · 99 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 · 99 lines · 90 tokens per session scan A 911be779d7a8

Subscribe to this mod's changes

drupal-reviewer is an agent published in the GitHub repository abderrahimghazali/drupal-boost (1 stars, last pushed 5mo ago), licensed MIT. It adds 90 tokens to every session and 959 once invoked, about $0.0005 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-31.