Drupal composer

From edutrul/drupal-ai · View interactive version

Drupal composer is an AI agent skill from the GitHub repository edutrul/drupal-ai. Drupal Composer management — requiring modules, updates, patches via composer-patches, and version constraints.

How to use this skill

Skill file

Drupal Composer Management

Installing & Updating

composer require drupal/module_name
composer require drupal/module_name:^2.0
composer require drupal/module_name:^1.0@dev
composer update drupal/module_name
composer update drupal/*
composer outdated drupal/*
composer audit

Version Constraints

| Constraint | Meaning |

|---|---|

| ^2.0 | >= 2.0.0 and < 3.0.0 |

| ~2.0 | >= 2.0.0 and < 2.1.0 |

| 2.x-dev | Latest 2.x dev branch |

| ^1.0@dev | >= 1.0 dev releases |

Patches (composer-patches)

"extra": {
  "patches": {
    "drupal/module_name": {
      "Patch description - issue #1234567": "patches/module_name-patch-description.patch"
    },
    "drupal/tb_megamenu": {
      "Block content support": "patches/tb_megamenu-block-content-support.patch"
    }
  }
}

Patches apply on composer install and re-apply on composer update drupal/module_name.

Useful Commands

composer show drupal/module_name
composer validate
composer clear-cache
composer install --no-cache
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.