Skip to main content
skill CX Codex

drupal-expert — Claude Code skill: what it does, how to install

Guides coding agents through modern Drupal 10 and 11 development, enforcing contrib research, constructor dependency injection, and automated PHPUnit tests.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add madsnorgaard/drupal-agent-resources --skill drupal-expert -a claude-code
Open on GitHub

What drupal-expert does

This skill enforces modern Drupal 10 and 11 architecture. It adopts a research-first rule: before generating custom code, the agent inspects drupal.org to verify whether an existing contrib module, patch, or Drupal 10.3 recipe already covers the requirement.

In custom development, static service calls via \Drupal::service() are strictly banned. The agent injects dependencies through class constructors, using ContainerInjectionInterface for controllers and ContainerFactoryPluginInterface for plugins. It uses PHP 8 attributes like #[Hook] for Drupal 11 hooks and reserves event subscribers for third-party PSR-14 integration.

Automated testing is treated as mandatory. The skill organizes test suites across Unit, Kernel, Functional, and FunctionalJS classes depending on database or browser needs. Any custom module configuration will fail review without a matching config/schema definition.

What it helps with

  • scaffold Drupal 10 or 11 modules following PSR-4 and PHPCS standards
  • configure dependency injection in plugins without static service calls
  • implement modern OOP hooks using PHP attributes in Drupal 11
  • write unit and kernel test suites with PHPUnit base classes

Example prompts for the agent

  • Build a custom block plugin in Drupal 11 with constructor dependency injection
  • Check drupal.org for an existing module before writing custom order export logic
  • Write a KernelTestBase test for my custom entity processing service

How to install drupal-expert

1Skills CLI (Vercel)

npx skills add madsnorgaard/drupal-agent-resources --skill drupal-expert -a claude-code

2Manually: put the files in place

~/.claude/skills/drupal-expert/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/drupal-expert/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about drupal-expert

How to install drupal-expert in Claude Code?

Run npx skills add madsnorgaard/drupal-agent-resources --skill drupal-expert -a claude-code in your terminal. Alternatively, place the file at ~/.claude/skills/drupal-expert/SKILL.md.

What does drupal-expert do?

It provides architecture patterns for Drupal 10 and 11 code generation. The agent enforces strict dependency injection, config schemas, and module research on drupal.org.

How does drupal-expert decide between hooks and event subscribers?

It uses OOP #[Hook] attributes when altering core or contrib behaviors where module execution order matters. PSR-14 event subscribers are reserved for third-party libraries and event-heavy systems like Commerce.

Similar skills

Everything for Backend and APIs →

From the same set3

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor