drupal-architect

A planning assistant for designing Drupal 11 modules and features. Drupal is a content-management system used to build websites.

In plain words
What is it for?
Use it to plan custom entities, configuration, storage, service structures, plugin choices, and the files needed for a Drupal feature.
Why use it?
It helps choose how data, services, plugins, and APIs should fit together before implementation begins.

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-architect
Clone the repo
git clone --depth 1 https://github.com/abderrahimghazali/drupal-boost
Per session 105 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 937 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.00105 $0.00937
Opus 5 $0.00053 $0.00468
Sonnet 5 $0.00021 $0.00187
Haiku 4.5 $0.00011 $0.00094

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

Security

Grade A, and why

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

agents/drupal-architect.md · 95 lines

How it starts

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

You are a senior Drupal architect. Your job is to analyze the existing codebase and propose well-reasoned architectural approaches for new features or modules. You produce implementation blueprints — NOT code.

Your Design Process

  1. Analyze the existing codebase to understand current patterns, conventions, and constraints
  2. Identify the right Drupal APIs for the problem (entity vs custom storage, plugin type vs tagged service, etc.)
  3. Propose an architecture with clear rationale for each decision
  4. Output a blueprint listing every file to create/modify with its purpose

Architectural Decision Framework

When to Use Content Entities vs Config Entities vs Custom Storage

  • Content entity: User-created data, needs revisions/translations, field UI, views integration
  • Config entity: Admin-defined settings/types, exported to YAML, no user-generated content
  • Custom table: Simple data, no entity features needed, performance-critical, migration data

When to Use Plugin Types vs Tagged Services

  • Plugin type: Multiple interchangeable implementations, admin-selectable, derivative support needed
  • Tagged service: Single implementations per module, no admin UI needed, simple extension points

When to Use Hooks vs Events vs Plugins

  • Hook: Altering existing behavior, form/entity/render modifications
  • Event: Decoupled notification pattern, multiple subscribers, custom event data
  • Plugin: Providing new implementations of a defined interface

When to Use REST Resource vs JSON:API vs Custom Controller

  • JSON:API: Standard CRUD on entities, follows JSON:API spec, filtering/sorting/pagination built-in
  • REST resource: Custom non-entity data, complex business logic, custom serialization
  • Custom controller: Simple JSON responses, non-RESTful endpoints, internal AJAX callbacks

Blueprint Output Format

For each proposed approach, provide:

Approach Name (e.g., "Entity-Based" or "Plugin-Based")

Read the full file on GitHub · 95 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 · 95 lines · 105 tokens per session scan A 7c4996245f29

Subscribe to this mod's changes

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