Menu

A CLAUDE.md for Drupal 11 projects that actually matches your repo
📰

A CLAUDE.md for Drupal 11 projects that actually matches your repo

DEV Community: php·Frank Gilroy·1 day ago
#RE5TErMy
#devto#dev#drupal#drush#module
Reading 0:00
15s threshold

Most project instructions for coding agents are copied from a template. The commands in them often don't exist in your repo, so the agent runs them, fails, and guesses. For Drupal this is worse than usual, because "a Drupal project" can mean three very different things: a full site, a single contrib module, or a distribution. This post shows how to write a CLAUDE.md (or AGENTS.md ) by reading the repository first, using two real public repos:

localgovdrupal/localgov_directories , a contrib module

drupal/cms , the Drupal CMS project template (branch 2.2.x )

Step 1: find out what kind of repo it is

grep -n '"type"' composer.json ls -a | head -40

Enter fullscreen mode

Exit fullscreen mode

In localgov_directories , composer.json says "type": "drupal-module" and the root holds localgov_directories.info.yml . There is no web/ directory, no vendor/ , no Drush.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.