Logo vun Drupal Config Reconcile

Drupal Config Reconcile

Communautéit
grasmash
drupal-config-reconcile

Reconcile Drupal configuration drift between a working tree and a deployed environment one item at a time, deciding import (disk wins) vs export (DB wins) vs skip for each difference. Use when `drush config:status` shows drift, after pulling a fresh DB, before a deploy, or when local config and a remote/prod environment disagree. Pantheon/Terminus-aware but works with any remote alias; never writes to production.

Iwwersiicht

Editeurgrasmash
Repositorydrupal-claude-skills
Skill-Nummdrupal-config-reconcile
Stären
77
Forks
4
Matgeliwwert Fichieren
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum grasmash op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Drupal Config Reconcile an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/grasmash/drupal-claude-skills/tree/main/skills/drupal-config-reconcile
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/grasmash/drupal-claude-skills.git /tmp/drupal-claude-skills
mkdir -p .claude/skills
cp -r /tmp/drupal-claude-skills/skills/drupal-config-reconcile .claude/skills/drupal-config-reconcile
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Drupal Config Reconcile an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Drupal Config Reconcile automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Drupal Config Reconcile net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Drupal Config Reconcile

A guided workflow for resolving the gap between your tracked config (config/default, plus any split dirs) and a deployed environment's active configuration. Most teams have the mechanics (config:status, cim, cex) but no disciplined way to walk drift item-by-item and decide which side wins. This is that discipline.

The core decision: import vs export vs skip

For every divergent config item, exactly one of three things is true, and you pick a direction:

  • Import = disk → DB. The tracked file is the source of truth; it deploys to the environment on the next code deploy + config import. No file change — you keep what's in git.
  • Export = DB → disk. The environment's value wins; you write its config into your tracked files (or git rm the file if the environment doesn't have it).
  • Skip. Leave the divergence unresolved and move on (the right call for benign uuid/_core-only diffs).

Never run config write operations against production. This workflow only reads from a reference environment and only writes to local files. It never writes to any remote database.

Remote CLI — host-neutral

Examples below use Pantheon's Terminus. The workflow is the same on any host — substitute your platform's remote-drush command. If your platform provides Drush site aliases, the generic drush @<alias> <cmd> form works everywhere and is the simplest baseline.

TaskAcquia (acli)Pantheon (Terminus)Platform.sh / UpsunLagoon (amazee.io)Generic (Drush aliases)
Remote drushacli remote:drush -- <cmd>terminus drush <site>.<env> -- <cmd>platform drush -e <env> -- <cmd> (Upsun: upsun drush …)lagoon ssh -p <project> -e <env> -C "drush <cmd>"drush @<alias> <cmd>
Refresh non-prod DB from prodCloud UI Copy database / acli api:environments:database-copyterminus env:clone-content <site>.live <env> --db-onlyplatform sync data (Upsun: upsun sync data)drush sql:sync or a Lagoon post-rollout taskdrush sql:sync @<prod> @<env>
Pull DB to localacli pull:db(drush sql:sync)platform db:dumplagoon ssh … -C "drush sql:dump"drush sql:sync @<env> @self
Get Drush aliasesacli remote:aliases:downloadterminus aliasesplatform-provided @platform.<env>drush sa (Lagoon-provided)aliases in drush/sites/

Auth/link once per platform: Acquia acli auth:login + acli link; Pantheon terminus auth:login; Platform.sh/Upsun platform login / upsun login; Lagoon lagoon login. Never run write/clone operations into production on any of them.

Workflow

1. Pick a reference environment (never live/prod)

Use a non-production environment as the prod stand-in (e.g. Pantheon dev/test, or a CI/staging alias). Refuse to target the live environment — config writes against live are how teams nuke production config.

2. Make the reference DB fresh

The diff is only meaningful if the reference env reflects current production. If the env's DB is stale (commonly >24h), refresh it from live first. On Pantheon:

bash
terminus env:clone-content <site>.live <env> --db-only -y   # Pantheon; see the table above for acli / platform / upsun / lagoon

Cloning modifies a shared environment and takes minutes — confirm with the user first; never do it silently. (Note: most platforms can't reliably tell you when an env was last refreshed — terminus backup:list reports backup recency, not clone-from-live recency. Treat it as a weak hint and ask.)

3. Get the diff on the reference env (not locally)

Run config:status on the reference env so Drupal applies config splits and config_exclude_modules correctly — a local run produces false positives from dev-only modules (devel, views_ui, a prod split, etc.):

bash
terminus drush <site>.<env> -- config:status --format=json   # or your platform's remote-drush form (see table)

States you'll see:

  • Only in DB — exists in the env's database, not in tracked config.
  • Only in sync — exists in tracked config, not in the env's database.
  • Different — present in both, content differs.

Empty list → "in sync, nothing to reconcile" → stop.

4. Fetch the env's value per item with config:get (not a full export)

Do not reach for config:export --destination + scp — config_split commonly fails trying to create its relative split dir under a temp destination, and SSH-command discovery is brittle across Terminus versions. Fetch each item on demand:

bash
terminus drush <site>.<env> -- config:get <name> --format=yaml > /tmp/ref-<name>.yml   # or your platform's remote-drush form

config:get --format=yaml emits the exact file format Drupal exports (no _core key) — byte-identical to tracked sibling files.

Caveat: config:get appends an extra trailing newline. Drupal's phpcs (Drupal.Files.EndFileNewline.TooMany) rejects two newlines at EOF and a pre-commit hook will block the commit. Normalize to exactly one trailing newline when you write the file:

bash
printf '%s\n' "$(cat /tmp/ref-<name>.yml)" > config/default/<name>.yml

5. Walk each item, one at a time

Create a todo list (one entry per config name) so progress is visible. Process in this order — Only in DB, then Different, then Only in sync — and for each:

  1. Locate the local file. Usually config/default/<name>.yml. If absent there, check split dirs (config/prod/, config/local/, config/envs/…) before concluding it's missing — split-managed items live outside config/default and must be written back to the same split dir.
  2. Show the content diff (label left = local/disk, right = env/DB):
    • Different: diff -u config/default/<name>.yml /tmp/ref-<name>.yml
    • Only in DB: local absent → show the env's full content.
    • Only in sync: env absent → show the local file's full content.
  3. Recommend a direction, and say why:
    • Only in DB → Export. Config created in the environment (UI or update hook) that should be captured into git (message templates, view displays, etc.).
    • Only in sync → Import. New config added in code, not yet deployed; keep it and let it deploy.
    • Different:
      • Only uuid and/or _core differ → Skip (benign environment artifact; don't churn files).
      • Env has real intentional-looking value changes → Export.
      • Local file has intentional code changes → Import.
      • Genuinely unclear → present both sides plainly, default to Skip, let the user decide.
  4. Ask Import / Export / Skip.
  5. Perform it — local files only:
    • Export (Different/Only in DB): write the env's file with the trailing newline normalized (split-managed items → split dir). Only in sync + Export means the env doesn't have it → confirm, then git rm the local file.
    • Import: keep the local file; no change. ⚠️ Only in DB + Import is destructive — the env has config absent from git, so a full drush cim on deploy will delete it from the environment. Warn explicitly and require a second confirmation.
    • Skip: nothing.

6. Verify with the import transformer — NOT config:status

After writing exported files, do not re-run config:status to confirm — it can keep reporting a freshly-written item as Only in DB even though the file is present and valid (a stale display artifact). Verify against the storage layer cim actually uses, the import transformer (which applies config_split exactly as a deploy does):

bash
drush ev '
$t = \Drupal::service("config.import_transformer")->transform(\Drupal::service("config.storage.sync"));
foreach (["<name1>","<name2>"] as $n) {
  print "$n => " . ($t->exists($n) && in_array($n, $t->listAll(), true) ? "RECONCILED (deploy-safe)" : "MISSING — would be deleted on cim") . "\n";
}'

exists() && in listAll() = YES means a real deploy keeps the config. Use this — not the config:status table — as the source of truth for "did my export take?"

7. Summarize and hand off

  • Exported (env → git): files created/overwritten/removed.
  • Kept for deploy (import): items whose local version reaches the env on next deploy.
  • Skipped: unresolved divergences and why.

Then show git status + git diff --stat config/, and do not auto-commit or push — ask first. Remember that Import items only take effect after the code deploys and a config import runs on the environment.

Gotchas

  • config:status on the reference env compares that env's sync dir vs its DB — it won't see your uncommitted local edits. Commit/deploy your edits first, then reconcile remaining drift.
  • Config splits: prod/local split items live in config/prod / config/local, not config/default. Always write Export results back to the file's real location.
  • uuid-only or _core-only diffs are almost always benign — don't churn files over them.

Heefeg gestallte Froen

Wat mécht de KI-Skill Drupal Config Reconcile?

Reconcile Drupal configuration drift between a working tree and a deployed environment one item at a time, deciding import (disk wins) vs export (DB wins) vs skip for each difference. Use when `drush config:status` shows drift, after pulling a fresh DB, before a deploy, or when local config and a remote/prod environment disagree. Pantheon/Terminus-aware but works with any remote alias; never writes to production.

Firwat Drupal Config Reconcile op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Drupal Config Reconcile besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Drupal Config Reconcile an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/grasmash/drupal-claude-skills/tree/main/skills/drupal-config-reconcile an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Drupal Config Reconcile benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Drupal Config Reconcile benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Drupal Config Reconcile domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Drupal Config Reconcile gratis?

De Skill gëtt vum grasmash op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇