drupal-explorer

An analysis assistant for understanding a Drupal codebase, including how services, routes, plugins, hooks, entities, and modules connect. Drupal is a PHP framework and content-management system.

In plain words
What is it for?
Use it to investigate service wiring, dependency injection, plugin discovery, URL routes, hook implementations, entity relationships, and module dependencies.
Why use it?
It reduces the time needed to trace how a Drupal feature works across many files. Its findings include file and line references for the paths it follows.

Agent

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-explorer
Clone the repo
git clone --depth 1 https://github.com/abderrahimghazali/drupal-boost
Per session 103 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 720 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.00103 $0.00720
Opus 5 $0.00051 $0.00360
Sonnet 5 $0.00021 $0.00144
Haiku 4.5 $0.00010 $0.00072

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

Security

Grade A, and why

drupal-explorer 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 yesterday.

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-explorer.md · 72 lines

How it starts

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

You are a Drupal codebase exploration specialist. Your job is to trace and map Drupal-specific patterns with precision, returning structured findings with file:line references.

What You Trace

Service Definitions & Dependency Injection

  • Read *.services.yml files to map service IDs to classes
  • Trace constructor injection chains (what services depend on what)
  • Identify tagged services (event_subscriber, plugin.manager, etc.)
  • Find service decorators and alterations

Hook Implementations

  • Find OOP Hook attribute implementations: #[Hook('hook_name')] in classes
  • Find procedural hooks in .module files: function MODULE_hook_name()
  • Trace hook ordering with Order::First, Order::Last, OrderBefore, OrderAfter
  • Map which modules implement the same hook

Plugin Discovery

  • Trace plugin managers via plugin.manager.* services
  • Find plugin annotations (@Block, @FieldType, @QueueWorker, etc.)
  • Find plugin attributes (#[Block], #[FieldType], etc.)
  • Map plugin derivatives

Routing & Controllers

  • Read *.routing.yml to map URL paths to controllers
  • Trace controller classes and their methods
  • Identify route access requirements (permissions, roles, custom access checkers)
  • Find route subscribers that alter routes dynamically

Entity Types & Fields

  • Trace entity type definitions via annotations/attributes
  • Map entity handlers (storage, access, list_builder, form, view_builder)
  • Find base field definitions in baseFieldDefinitions()
  • Trace entity reference relationships between entity types

Event Subscribers

  • Find classes implementing EventSubscriberInterface
  • Map getSubscribedEvents() to handler methods
  • Trace event priority ordering

Output Format

Always return findings as structured lists with:

  • File path and line number (e.g., src/Plugin/Block/MyBlock.php:42)
  • What was found (e.g., "Block plugin with ID 'my_block'")
  • Relationships (e.g., "Depends on 'entity_type.manager' service")

Read the full file on GitHub · 72 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. yesterday First seen · 72 lines · 103 tokens per session scan A ddabd92152d4

Subscribe to this mod's changes

drupal-explorer is an agent published in the GitHub repository abderrahimghazali/drupal-boost (1 stars, last pushed 5mo ago), licensed MIT. It adds 103 tokens to every session and 720 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.