Token导航 LogoToken导航

Agent Skill · 研究检索

drupal-config-mgmt(drupal 配置管理)

drupal-config-mgmt 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

drupal-config-mgmt 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 39,939。

总安装 1,346周安装 55GitHub Stars 61下载 436核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:drupal-config-mgmt(drupal 配置管理)
来源仓库:https://github.com/grasmash/drupal-claude-skills
仓库路径:skills/drupal-config-mgmt
安装命令:
npx skills add https://github.com/grasmash/drupal-claude-skills --skill drupal-config-mgmt
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/grasmash/drupal-claude-skills --skill drupal-config-mgmt

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

该技能提供 Drupal 配置管理的完整指南,涵盖导入、导出、配置拆分和环境同步操作。适用于多环境配置迁移、生产与本地配置对比及配置变更审计等场景。支持安全地展示配置差异,避免远程 drush 命令误执行导致配置意外覆盖。安装需从 GitHub 仓库获取,使用时需区分只读查询与写入操作,防止误改生产环境。

建议先检查目标环境的 drush 配置,确认 --yes 参数默认行为,避免自动确认风险。

来源仓库内路径:skills/drupal-config-mgmt

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/grasmash/drupal-claude-skills --skill drupal-c…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

drupal-config-mgmt 怎么安装?

在终端执行 npx skills add https://github.com/grasmash/drupal-claude-skills --skill drupal-config-mgmt。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

drupal-config-mgmt 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

drupal-config-mgmt 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

drupal-config-mgmt 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

drupal-config-mgmt 用的人多吗?

公开数据是累计安装 1,346 次,近一周安装 55 次,下载 436 次,GitHub 61 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

drupal-config-mgmt 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
drupal-config-mgmt

drupal 配置管理 · 本页

1,34661接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Drupal Configuration Management

Comprehensive guide for Drupal configuration management including imports, exports, config splits, and environment syncing.

Problem: Avoid Accidental Config Imports

CRITICAL: Remote drush commands may default to --yes depending on your hosting setup. This means commands like config:import or cim can AUTO-CONFIRM and import configuration even when you only want to inspect differences.

Dangerous vs Safe Patterns

❌ DANGEROUS - May auto-import without confirmation:

ssh user@remote.server "cd /path/to/drupal && drush cim --diff"  # DON'T DO THIS!

✅ SAFE - Shows diff without importing:

ssh user@remote.server "cd /path/to/drupal && drush cim --no --diff"

✅ SAFEST - Read-only commands:

ssh user@remote.server "cd /path/to/drupal && drush config:get config.name"
ssh user@remote.server "cd /path/to/drupal && drush config:status"

Table of Contents

  1. Preferred Prod Config Merge Workflow
  2. Configuration Import & Export Basics
  3. Config Splits Overview
  4. Complete vs Partial Splits
  5. Config Split Commands
  6. Safe Inspection Workflow
  7. Syncing Config from Upstream Environments

Preferred Prod Config Merge Workflow

Purpose: Safely merge production config changes while preserving local feature work.

The Process

Step 1: Commit local changes first

git add config/default/your-new-field.yml docroot/modules/custom/your_module/your_module.module
git commit -m "feat: add new feature"

Step 2: Pull production database

ddev pull --environment=live
# Or your preferred method for pulling a remote database

Step 3: Export config from prod DB

ddev drush config:export -y

Step 4: Review git diff on config directory

git diff --stat config/           # Summary of changes
git status --short config/        # See added/modified/deleted

Step 5: Identify files to revert vs keep

Look for these patterns:

  • D (Deleted) - Your new feature files deleted by prod export → REVERT
  • M (Modified) - UUID changes from prod → KEEP
  • M (Modified) - Actual prod config changes → KEEP
  • M (Modified) - Local changes overwritten → REVERT (case by case)

Step 6: Restore your local feature files

# Restore deleted files (your new feature config)
git checkout HEAD -- config/default/field.storage.node.your_new_field.yml
git checkout HEAD -- config/default/field.field.node.bundle.your_new_field.yml

# Or restore specific modified files
git checkout HEAD -- config/default/some.config.yml

Step 7: Verify and commit prod config

git status --short config/        # Verify your files are restored
git diff config/                  # Review remaining prod changes
git add config/
git commit -m "chore: sync config from production"

Quick Reference Table

git statusMeaningAction
D config/default/field.*.your_feature.ymlYour new feature deletedgit checkout HEAD -- <file>
M config/default/*.yml (UUID only)Prod UUID syncKeep (stage for commit)
M config/default/views.view.*.ymlView changed in prodKeep (review first)
M config/default/system.*.ymlSystem config from prodKeep (review first)

Example Session

# After pulling prod DB and exporting config
$ git status --short config/
 M config/default/core.entity_view_display.node.article.teaser.yml
 M config/default/field.storage.node.field_featured_image.yml
 D config/default/field.field.node.article.field_summary.yml
 D config/default/field.storage.node.field_summary.yml
 M config/default/views.view.content.yml

# The D files are our new feature - restore them
$ git checkout HEAD -- config/default/field.field.node.article.field_summary.yml \
                       config/default/field.storage.node.field_summary.yml

# Verify
$ git status --short config/
 M config/default/core.entity_view_display.node.article.teaser.yml
 M config/default/field.storage.node.field_featured_image.yml
 M config/default/views.view.content.yml

# Our feature files are no longer in the diff - commit prod changes
$ git add config/ && git commit -m "chore: sync config from production"

Configuration Import & Export Basics

Exporting Configuration

Export ALL configuration (from active config to YAML files):

# Local
ddev drush config:export
ddev drush cex

# Remote
ssh user@remote.server "cd /path/to/drupal && drush config:export"

Export a SINGLE config object:

# Get config and save to file
ddev drush config:get config.name --format=yaml > config/default/config.name.yml

# Example: Export a specific view
ddev drush config:get views.view.content --format=yaml > config/default/views.view.content.yml

Importing Configuration

Import ALL configuration (from YAML files to active config):

# Local
ddev drush config:import
ddev drush cim

# Remote (DANGEROUS - may auto-confirm!)
ssh user@remote.server "cd /path/to/drupal && drush config:import --no"  # Use --no to preview only

Import a SINGLE config object:

# Delete from active config first, then import
ddev drush config:delete config.name
ddev drush config:import --partial --source=config/default

# Or use config:set for specific values
ddev drush config:set config.name key.subkey value

Best Practice: Always preview changes first:

ddev drush config:import --no --diff  # Show what would change
ddev drush cim --no --diff            # Alias

Config Splits Overview

Config splits allow you to have environment-specific configuration that doesn't get deployed to all environments.

Common Use Cases

  • Local development: Enable devel, kint, stage_file_proxy
  • Staging/Test: Enable similar modules but different API keys
  • Production: Disable development modules, enable caching

How Splits Work

  1. Base config (config/default/) - Shared across all environments
  2. Split config (config/{split-name}/) - Environment-specific overrides
  3. Split definition (config/default/config_split.config_split.{name}.yml) - Defines which config goes in split

When a split is active, its config takes precedence over base config.

Split Activation

Splits are activated based on conditions in their config:

  • Status: status: true in split config
  • Environment variable: Can use conditions based on env vars
  • Manual activation: Via admin UI or drush

Complete vs Partial Splits

CRITICAL: Understanding the difference between Complete and Partial splits is essential.

Complete Splits (Recommended for most cases)

How it works:

  • Config in the split is ONLY active when split is enabled
  • When split is disabled, config is completely removed from active config
  • Think: "This config exists ONLY in this environment"

Use cases:

  • Development modules (devel, kint, webprofiler)
  • Environment-specific modules (stage_file_proxy for local)
  • Testing modules (simpletest, phpunit)

Example: Local split with devel module

# config/default/config_split.config_split.local.yml
status: true
module:
  devel: 0
  kint: 0
complete_list:
  - 'core.extension'

When split is active: devel and kint are enabled When split is inactive: devel and kint are completely removed

Reference: See admin form at /admin/config/development/configuration/config-split/{split-name}:

"Complete Split: Remove the selected configuration entirely when the split is inactive. When this split is inactive, the configuration listed here will be removed from the system completely."

Partial Splits (Conditional Overrides)

How it works:

  • Base config exists in config/default/
  • Split contains overrides in config/{split-name}/
  • When split is active, overrides are merged with base config
  • When split is inactive, base config is used
  • Think: "This config exists everywhere, but with different values per environment"

Use cases:

  • API keys that differ per environment
  • Email settings (different SMTP per environment)
  • Cache settings (aggressive in prod, disabled in local)
  • Search server URLs (local Solr vs remote search server)

Example: Different search servers per environment

Base config (config/default/search_api.server.main.yml):

backend_config:
  connector: solr_cloud
  # Production settings

Local override (config/local/config_split.patch.search_api.server.main.yml):

backend_config:
  connector: solr
  connector_config:
    host: solr
    # Local Solr settings

When local split is active: Uses local Solr When local split is inactive: Uses production search server

Reference: See admin form at /admin/config/development/configuration/config-split/{split-name}:

"Partial Split (Conditional Override): Keep the selected configuration, but override it when the split is active. The configuration will exist in the sync directory, but the version from this split will be used instead when the split is active."

Choosing Complete vs Partial

Use Complete when:

  • ✅ Config should NOT exist in other environments (modules, views, blocks)
  • ✅ It's an on/off decision (enable/disable)
  • ✅ Different environments need different features

Use Partial when:

  • ✅ Config exists everywhere but with different VALUES
  • ✅ Same feature, different settings (API URLs, credentials)
  • ✅ You need the base config to be importable without the split active

Config Split Commands

CRITICAL: Active vs Exported Configuration

⚠️ IMPORTANT: When updating config split definitions, changes must be in ACTIVE configuration (database), not just exported files!

Workflow:

  1. Edit config/default/config_split.config_split.{name}.yml
  2. Import to make active: ddev drush config:import --partial OR use PHP (see below)
  3. Export: ddev drush cex

Quick method - Set active config via PHP:

ddev drush php:eval "\$config = \Drupal::configFactory()->getEditable('config_split.config_split.local'); \$config->set('partial_list', ['config.name']); \$config->save();"

See examples.md for detailed workflow.

Export Config with Splits

Export ALL config including active splits:

ddev drush config:export

This exports:

  • Base config to config/default/
  • Active split config to config/{split-name}/

Export a specific split:

ddev drush config-split:export {split-name}
ddev drush csex {split-name}

Import Config with Splits

Import ALL config including active splits:

ddev drush config:import
ddev drush cim

This imports:

  • Base config from config/default/
  • Active split config from config/{split-name}/

Import a specific split:

ddev drush config-split:import {split-name}
ddev drush csim {split-name}

Import only base config (ignore splits):

ddev drush config:import --skip-modules=config_split

Activate/Deactivate Splits

Activate a split:

ddev drush config-split:activate {split-name}

Deactivate a split:

ddev drush config-split:deactivate {split-name}

Check Split Status

List all splits and their status:

ddev drush config-split:status
ddev drush css

Example output:

Split       Active  Configuration directory
local       Yes     ../config/local
dev         No      ../config/dev
test        No      ../config/test

Safe Inspection Workflow

Use config:get and config:status for read-only inspection, or use --no flag with cim/cex to prevent auto-confirmation.

Get Config Values

# Get full config object
ssh user@remote.server "cd /path/to/drupal && drush config:get config.name"

# Get as YAML
ssh user@remote.server "cd /path/to/drupal && drush config:get config.name --format=yaml"

# Extract specific values
ssh user@remote.server "cd /path/to/drupal && drush config:get config.name 2>&1 | grep 'setting_name'"

Compare Local vs Remote

# View diffs without importing (SAFE with --no)
ssh user@remote.server "cd /path/to/drupal && drush cim --no --diff"

# Get remote and compare manually
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

CRITICAL: Always use --no flag with remote drush! Without it, commands may auto-confirm.

Apply Changes

Preferred: Edit config files directly, then commit:

# Use Edit tool on config/default/config.name.yml
git diff config/default/config.name.yml
git add config/default/config.name.yml
git commit -m "Update config from {env}"

Syncing Config from Upstream Environments

Quick Methods

Single config object:

ssh user@remote.server "cd /path/to/drupal && drush config:get config.name --format=yaml" > config/default/config.name.yml
git add config/default/config.name.yml && git commit -m "Update from {env}"
ddev drush config:import --partial

Full config sync via rsync/scp:

ssh user@remote.server "cd /path/to/drupal && drush cex"
rsync -avz user@remote.server:/path/to/drupal/config/default/ /tmp/remote/
diff -r config/default /tmp/remote  # Review
cp /tmp/remote/*.yml config/default/
git add config/default/ && git commit -m "Sync from {env}"
ddev drush cim

Via database pull (DDEV):

ddev pull --environment={env}  # Warning: Overwrites local DB!
ddev drush cex
git diff config/ && git add config/ && git commit -m "Config from {env}"

See examples.md for detailed workflows.

Best practices: Review diffs, commit separately, test locally, document source, avoid syncing environment-specific config.


Deep Dive References

For comprehensive technical documentation, see:

  • config-split-deep-dive.md - Complete technical reference on Config Split 2.0, patch files, export/import process, and dependency handling
  • examples.md - Practical examples and workflows

Config Status Check

Check what config would be imported (read-only):

# Local environment
ddev drush config:status

# Remote environment
ssh user@remote.server "cd /path/to/drupal && drush config:status"

Best Practices

  1. Always inspect before importing - Use config:get and --no --diff flags
  2. Manual edits preferred - Edit config files directly for precision
  3. One config type per commit - Separate concerns for clean history
  4. Clear commit messages - Reference source environment
  5. Clean up temp files - Remove temporary YAML files
  6. Verify before committing - Always review git diff output
  7. Test locally first - Import and test before deploying
  8. Use config splits - Keep environment-specific config separate

Troubleshooting

Config files deleted from working directory

If files are marked as deleted in git status:

git checkout HEAD -- config/default/*.yml

This can happen if a drush command runs unexpectedly.

Split not activating

Check split status:

ddev drush config-split:status

Manually activate:

ddev drush config-split:activate {split-name}
ddev drush cex  # Export to save activation state

Config deleted from config/default on export

COMMON ISSUE: Config (like search_api.server.main) gets removed from config/default/ when you run drush cex.

Root cause (99% of cases): Config is in complete_list instead of partial_list!

Complete split = Config is REMOVED from config/default/ and moved to split directory entirely Partial split = Config STAYS in config/default/, only differences are patched

Diagnosis:

# Check if config is in complete_list (will be deleted from config/default)
grep -A10 "complete_list:" config/default/config_split.config_split.local.yml

# Check if config is in partial_list (will stay in config/default)
grep -A10 "partial_list:" config/default/config_split.config_split.local.yml

Solution: Move from complete_list to partial_list

# Edit the split definition
# Move: search_api.server.main
# FROM: complete_list
# TO: partial_list

ddev drush cex  # Re-export
# Check that config/default/search_api.server.main.yml exists
# Check that config/local/config_split.patch.search_api.server.main.yml exists

See config-split-deep-dive.md for complete technical explanation.

Config won't import

Common issues:

  • Dependencies missing: Install required modules first
  • UUID mismatch: Use --partial flag
  • Locked config: Some config (like system.site) has immutable values
# Skip specific config during import
ddev drush config:import --skip-config=system.site

Related Commands

Read-only: config:get, config:status Exports: config:export (alias: cex) Imports: config:import (alias: cim) - Use with --no --diff to preview Splits: config-split:status, csex, csim, config-split:activate

平台分布

Codex

36.45%
按下载量换算159

Claude

29.1%
按下载量换算127

Cursor

20.6%
按下载量换算90

Gemini CLI

10.55%
按下载量换算46

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills