drupal-contrib-mgmt

drupal-contrib-mgmt is a skill for Claude Code from edutrul/drupal-ai. It costs 58 tokens per session (1,235 once invoked), scanned A, original, MIT.

A guide for upgrading and repairing Drupal contributed modules, which are extensions maintained outside Drupal core. It covers compatibility checks, patches, Composer settings, and Drupal.org issue research.

In plain words
What is it for?
Use it to assess Drupal 11 compatibility, upgrade a contributed module, create or manage Composer patches, handle outdated version requirements, and investigate issues on Drupal.org.
Why use it?
It helps distinguish a real compatibility problem from a warning and provides documented ways to apply fixes while upgrading modules.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/verify-patches.sh # Check all critical patches.

Good fit Use it to assess Drupal 11 compatibility, upgrade a contributed module, create or manage Composer patches, handle outdated version requirements, and investigate issues on Drupal.org.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/edutrul/drupal-ai
agentmods
npx agentmods add skills/edutrul/drupal-ai/drupal-contrib-mgmt

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for drupal-contrib-mgmt

README.md
[![agentmods](https://agentmods.dev/badge/skills/edutrul/drupal-ai/drupal-contrib-mgmt.svg)](https://agentmods.dev/skills/edutrul/drupal-ai/drupal-contrib-mgmt)
Your own site
<a href="https://agentmods.dev/skills/edutrul/drupal-ai/drupal-contrib-mgmt"><img src="https://agentmods.dev/badge/skills/edutrul/drupal-ai/drupal-contrib-mgmt.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,235 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00058 $0.01235
Opus 5 $0.00029 $0.00617
Sonnet 5 $0.00012 $0.00247
Haiku 4.5 $0.00006 $0.00123

Measured 8d ago against content hash 1160d83a42f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

drupal-contrib-mgmt 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 8d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (examples/create-custom-patch.sh, examples/find-and-apply-patch.sh, examples/major-version-upgrade.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/drupal-contrib-mgmt/SKILL.md · 145 lines

How it starts

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

Drupal Contrib Module Management

Core Update Commands

composer require drupal/module_name --with-all-dependencies
composer require drupal/module_name:^3.0 --with-all-dependencies
drush updb -y && drush cr

Checking Drupal 11 Compatibility

Fastest method — check .info.yml:

cat docroot/modules/contrib/MODULE_NAME/MODULE_NAME.info.yml | grep core_version_requirement
core_version_requirement: ^9.5 || ^10 || ^11   # D11 compatible
core_version_requirement: ^9 || ^10              # Not D11 compatible
  • upgrade_status warnings ≠ incompatible — module may still declare ^11 support
  • "Check manually" status is often a false positive (runtime version checks)

Drupal Lenient Plugin

For modules that haven't updated version requirements yet:

{
  "require": { "mglaman/composer-drupal-lenient": "^1.0" },
  "config": { "allow-plugins": { "mglaman/composer-drupal-lenient": true } },
  "extra": {
    "drupal-lenient": { "allowed-list": ["drupal/module_name"] }
  }
}

Patch Management (cweagans/composer-patches)

IMPORTANT: Use 2.x — uses git apply (reliable). Version 1.x uses patch binary (fragile).

{
  "require": { "cweagans/composer-patches": "^2.0" },
  "config": { "allow-plugins": { "cweagans/composer-patches": true } },
  "extra": {
    "composer-exit-on-patch-failure": true,
    "patches": {
      "drupal/module_name": {
        "Description of patch - Issue #3552531": "patches/module-fix-3552531-2.patch"
      }
    }
  }
}

2.x gotcha: Hash-based caching — patches can silently go missing after reinstalls.

Verifying Patches Are Applied

./scripts/verify-patches.sh        # Check all critical patches
./scripts/verify-patches.sh --fix  # Auto-reinstall affected modules

Adding a new patch to verification — edit scripts/verify-patches.sh:

CRITICAL_PATCHES=(
  "docroot/modules/contrib/MODULE:src/File.php:patternToFind:Description"
)

When patches go missing:

  1. ./scripts/verify-patches.sh to identify
  2. composer reinstall drupal/module_name or ./scripts/verify-patches.sh --fix
  3. If still failing: composer update --lock

Read the full file on GitHub · 145 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. 8d ago First seen · 145 lines · 58 tokens per session scan A 1160d83a42f1

Subscribe to this mod's changes

drupal-contrib-mgmt is a skill published in the GitHub repository edutrul/drupal-ai (71 stars, last pushed 3mo ago), licensed MIT. It adds 58 tokens to every session and 1,235 once invoked, about $0.0003 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-30.