Article

Layered AI Skills in Drupal

How to organize AI coding agent context across Drupal projects using a 4-layer skills model instead of monolithic prompt files.

Layered AI Skills in Drupal cover graphic
Layered AI Skills in Drupal cover graphic

How do you teach an AI coding agent your Drupal workflows without dumping a massive 50-page prompt file into every project?

The answer is Layered Skills.

Instead of one monolithic prompt file that quickly goes stale, a layered model organizes what your AI knows based on scope:

The 4-Layer Model#

  1. Layer 1 (Core Foundation): Official community architecture via drupal/ai_best_practices.
  2. Layer 2 (Contrib Skills): External packages like drupal-contrib-skills that give agents operational playbooks for issue forks, GitLab MR reviews, patch rerolling, and recipes.
  3. Layer 3 (Agency Skills): Your team's private SOPs (deployment sequences, hosting setup, QA checklists) distributed via private Composer packages.
  4. Layer 4 (Project Skills): Client-specific domain logic living directly in the site's local repository.

Automatic Discovery via Composer#

The best part? Thanks to the Composer plugin built into drupal/ai_best_practices, this entire hierarchy is discovered and updated automatically across your Drupal projects.

How is your team organizing AI context and playbooks across client projects?

DrupalAIAgentic AISoftware EngineeringDevOpsPHP