Index of every page on this site: llms.txt
All skills
grasmash avatar

/drupal-contrib-mgmt

@19514f4
Run it yourself

Manages Drupal contributed modules via Composer - module updates and major-version upgrades, cweagans/composer-patches v2 (patches.lock.json, composer patches-relock, verifying patches are applied), mglaman/composer-drupal-lenient, Drupal 11 compatibility checks with upgrade_status, committing an optimized vendor/ autoloader, and contributing fixes back to drupal.org via issue forks and merge requests. Use when updating or upgrading contrib modules, applying, finding or creating patches, a patch fails or keeps regressing after composer install, resolving Composer dependency or drupal/core version conflicts, checking Drupal 11 readiness or deprecations, or contributing to a drupal.org issue queue.

Use this Skill: https://skilld.dev/gh/grasmash/drupal-claude-skills/drupal-contrib-mgmt

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesupdate-patterns.md

≈531 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Common Update Patterns

Worked recipes for frequent contrib update scenarios.

Common Patterns

Pattern: Update Module with Known Patch

# 1. Find patch in issue queue
# 2. Add to composer.json patches section, then record it in patches.lock.json
#    (v2 applies from the lock; without the relock the update below skips the patch)
composer patches-relock
# 3. Update module
composer require drupal/module_name:^3.0 --with-all-dependencies
drush updb -y   # rebuilds caches when it finishes
# 4. Test
# 5. Commit
git add composer.json composer.lock patches.lock.json patches/
git commit -m "Update module_name to 3.0 with D11 compatibility patch"

Pattern: Fix Contrib D11 Issue

# 1. Scan for issues
drush upgrade_status:analyze module_name

# 2. Create info.yml patch if needed (run from the project root)
MODULE_DIR=docroot/modules/contrib/module_name   # or web/modules/contrib/module_name
git -C "$MODULE_DIR" init -q                     # contrib is not a git repo: temporary baseline
git -C "$MODULE_DIR" add -A
git -C "$MODULE_DIR" -c user.name=patch -c user.email=patch@localhost commit -qm pristine
# Edit $MODULE_DIR/module_name.info.yml to add ^11
git -C "$MODULE_DIR" diff > patches/module-d11-info.patch
git -C "$MODULE_DIR" checkout -- .
rm -rf "$MODULE_DIR/.git"

# 3. Add patch to composer.json, then record it in patches.lock.json
composer patches-relock
# 4. Apply
composer reinstall drupal/module_name
drush cr

# 5. Verify
drush upgrade_status:analyze module_name

Pattern: Major Version Upgrade with Breaking Changes

# 1. Read CHANGELOG/UPDATE.md for breaking changes
# 2. Check issue queue for upgrade path documentation
# 3. Backup database before upgrade
drush sql:dump > backup-before-update.sql

# 4. Update module
composer require drupal/module_name:^3.0 --with-all-dependencies

# 5. Run updates
drush updb -y

# 6. Check for errors
drush watchdog:show --severity=Error --count=20

# 7. Test thoroughly
# 8. If issues, can rollback:
# git checkout composer.json composer.lock
# composer install
# drush sql:cli < backup-before-update.sql

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

3 warnings1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill is a comprehensive guide for managing Drupal contributed modules, focusing on updates, patches, and Drupal 11 compatibility. It provides instructions for using standard tools like Composer, Drush, and Git, and directs the agent to fetch data and patches from official Drupal repositories. While these sources are legitimate and trusted within the Drupal ecosystem, the ingestion of user-contributed content from issue queues presents a minor surface for indirect prompt injection.

  • Socket1mo

    1 alert: gptAnomaly

  • Snyk1mo

    Risk: MEDIUM · 1 issue

  • Runlayer8mo

    5/8 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 19514f4. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 2 months ago

README badge

README badge for grasmash/drupal-claude-skills/drupal-contrib-mgmt