
drupal-config-mgmt
by grasmash
SKILL.md
name: drupal-config-mgmt description: Safe patterns for inspecting and syncing Drupal configuration across environments without accidentally importing changes.
Drupal Configuration Management
Safe patterns for inspecting and syncing Drupal configuration across environments without accidentally importing changes.
When This Skill Activates
Activates when working with Drupal configuration management including:
- Inspecting config differences between environments
- Syncing config from remote environments
- Using drush commands safely on remote servers
- Avoiding accidental config imports
- Manual config editing workflows
Problem: Avoid Accidental Config Imports
CRITICAL: Some hosting platforms default drush commands to --yes (auto-confirm). Commands like config:import or cim may AUTO-CONFIRM and import configuration even when you only want to inspect differences.
Dangerous vs Safe Patterns
❌ DANGEROUS - May auto-import without confirmation:
# Via SSH to remote
ssh user@remote.server "cd /path/to/drupal && drush cim --diff"
ssh user@remote.server "cd /path/to/drupal && drush config:import --diff"
✅ SAFE - Will show diff without importing:
# Via SSH with --no flag
ssh user@remote.server "cd /path/to/drupal && drush cim --no --diff"
ssh user@remote.server "cd /path/to/drupal && drush config:import --no --diff"
✅ SAFEST - Use read-only commands:
# Via SSH - read-only operations
ssh user@remote.server "cd /path/to/drupal && drush config:get config.name"
ssh user@remote.server "cd /path/to/drupal && drush config:status"
Available Topics
Full documentation available in references:
- @references/full-guide.md - Complete configuration management guide
- @references/safe-inspection.md - Read-only config inspection patterns
- @references/manual-sync.md - Manual config editing workflow
- @references/examples.md - Common sync scenarios
Quick Reference
Get Config from Remote
# Via SSH
ssh user@remote.server "cd /path/to/drupal && drush config:get config.name --format=yaml"
# Via DDEV for local
ddev drush config:get config.name --format=yaml
Compare Environments
# View import diff (safe with --no) via SSH
ssh user@remote.server "cd /path/to/drupal && drush cim --no --diff"
# Get specific config for manual comparison
ssh user@remote.server "cd /path/to/drupal && drush config:get config.name --format=yaml" > /tmp/remote.yml
diff -u config/default/config.name.yml /tmp/remote.yml
Manual Edit Workflow
- Get remote config via SSH:
ssh user@remote "cd /path/to/drupal && drush config:get config.name" - Edit local file with Edit tool
- Review:
git diff config/default/config.name.yml - Commit:
git add config/default/config.name.yml && git commit
Best Practices
- Always use
--noflag with cim/cex on remote drush commands - Manual edits preferred over automated imports
- One config type per commit for clean history
- Clear commit messages referencing source environment
- Clean up temp files after comparison operations
Last updated: 2024-11-05
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です