drupal-contrib-mgmt
Skill71 starsChanged 7 months agoMITView on GitHub
Drupal contrib module upgrade triage — Drupal.org issue queue research, local patch creation (git diff), composer-patches workflows, Drupal 11 compatibility via core_version_requirement, Drupal Lenient handling, and upgrade_status analysis. Not for generic Composer dependency management.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- grasmash/drupal-claude-skillstheir own version, first seen Oct 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- grasmash/drupal-claude-skills★ 81same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository35 other files it gives its agents.
- ddev-expertSkill
- docker-localSkill
- drupal-accessSkill
- drupal-cachingSkill
- drupal-composerSkill
- drupal-configSkill
- drupal-debuggingSkill
- drupal-drushSkill
- drupal-dttSkill
- drupal-entity-apiSkill
- drupal-eventsSkill
- drupal-fieldsSkill
- drupal-form-ajaxSkill
- drupal-form-alterSkill
- drupal-form-apiSkill
- drupal-form-validationSkill
- drupal-hooksSkill
- drupal-htmxSkill
- drupal-javascriptSkill
- drupal-kernelSkill
- drupal-menusSkill
- drupal-migrationsSkill
- drupal-paragraphsSkill
- drupal-pluginsSkill
- drupal-queriesSkill
- drupal-renderSkill
- drupal-routesSkill
- drupal-search-apiSkill
- drupal-securitySkill
- drupal-servicesSkill
- drupal-stateSkill
- drupal-taxonomySkill
- drupal-twigSkill
- drupal-unitSkill
- SKILL.mdSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
IMPORTANT: Use 2.x — uses git apply (reliable).
- Very specific: line 83
If still failing: composer update --lock
- Distinctive: line 87
CRITICAL: Always search drupal.org issue queue before writing a custom patch.
- Very specific: line 91
Look for RTBC (Reviewed & Tested by Community) issues with .patch attachments
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 crChecking Drupal 11 Compatibility
Fastest method — check .info.yml:
cat docroot/modules/contrib/MODULE_NAME/MODULE_NAME.info.yml | grep core_version_requirementcore_version_requirement: ^9.5 || ^10 || ^11 # D11 compatible
core_version_requirement: ^9 || ^10 # Not D11 compatibleupgrade_statuswarnings ≠ incompatible — module may still declare^11support- "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 modulesAdding 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:
./scripts/verify-patches.shto identifycomposer reinstall drupal/module_nameor./scripts/verify-patches.sh --fix- If still failing:
composer update --lock
Finding Patches — Search BEFORE Creating
CRITICAL: Always search drupal.org issue queue before writing a custom patch.
- Extract exact error string: e.g.
"Unsupported operand types: array + null" - Search:
https://www.drupal.org/project/drupal/issues?text=Unsupported+operand+types+array+null - Look for RTBC (Reviewed & Tested by Community) issues with
.patchattachments - Download to
patches/and add tocomposer.json
Patch naming: module-issue-NODEID-COMMENT.patch (e.g. audiofield-d11-3432063-12.patch)
When existing patch fails after update:
- Extract node ID from filename → visit
drupal.org/node/NODEID→ find updated patch in latest comments
Creating Local Patches
Always patch from a separate clone of the contrib repo, not the installed vendor copy.
cd ~/Sites && git clone git@git.drupal.org:project/module_name.git module_name-contrib
cd module_name-contrib && git checkout 1.0.3 # match installed version
# make changes...
git diff > ~/Sites/your-project/patches/module_name-custom-fix.patchThen add to composer.json and run composer reinstall drupal/module_name.
Patch Application
composer install # Install with patches
composer reinstall drupal/module_name # Re-patch a single module
composer patches-repatch # Re-patch all patched depsDrupal 11 Deprecation Quick Reference
| Deprecated | Replacement |
REQUEST_TIME | \Drupal::time()->getRequestTime() |
user_roles() | \Drupal\user\Entity\Role::loadMultiple() |
file_validate_extensions() | file.validator service |
_drupal_flush_css_js() | AssetQueryStringInterface::reset() |
Upgrade Status Scan
drush upgrade_status:analyze --all
drush upgrade_status:analyze module1 module2
drush upgrade_status:analyze --all --ignore-contrib # custom code onlyTroubleshooting
| Error | Solution |
Cannot apply patch | Module version changed — find updated patch at drupal.org/node/NODEID |
requires drupal/core ^9 | Add to drupal-lenient allowed-list |
patch has already been applied | Patch merged upstream — remove from composer.json |
drush updb fails | Try uninstall → update → re-enable module |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

