本文へ移動
cccskills
無料GitHub で公開

deploy-workflow

Safe deployment workflow for Drupal 10/11 sites: pre-flight checks, backup, the correct update sequence (composer install, database updates, config import, cache rebuild), verification, and rollback plan. Use when deploying to any environment, releasing to production, or when the user asks to "push changes live", "update the server", or run a release. Also use for multisite releases where each site needs its own database update pass.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md4.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Deploy Workflow

Deployment of a Drupal site has a fixed order of operations. Skipping a step or reordering it produces failures that only surface at runtime. This skill enforces the sequence and its preconditions.

When this activates

  • Deploying a Drupal codebase to staging or production
  • Running a release on a multisite platform
  • Applying core or contrib updates on a server
  • The user asks to push changes live or update an environment

Phase 0 — Pre-flight (before touching the target)

  1. Confirm the target: which environment, which drush alias or SSH host. Never assume production.
  2. Verify the working tree being deployed is clean and on the intended tag/branch.
  3. Check config status on the target: drush config:status. Unexpected overrides on the target mean someone changed config in the UI — resolve before deploying, or the import will silently destroy their changes.
  4. Maintenance window: for schema-changing releases, ask whether maintenance mode is required (drush state:set system.maintenance_mode 1).

Exit condition: target confirmed by the user, config status reviewed.

Phase 1 — Backup

drush @TARGET sql:dump --result-file=auto --gzip

Also snapshot the current codebase reference (deployed tag/commit) so rollback is a known state, not a guess.

Exit condition: a restorable database dump exists and its location is recorded.

Phase 2 — Deploy sequence

The canonical order:

git fetch && git checkout TAG            # or the platform's deploy mechanism
composer install --no-dev --optimize-autoloader
drush deploy                             # = updb + cim + cr + deploy:hook (Drush 10.3+)

If drush deploy is not available or the project needs explicit control:

drush updb -y        # database updates first — update hooks may rely on old config
drush cim -y         # import configuration
drush cr             # rebuild caches
drush deploy:hook -y # post-deploy hooks, if used

Notes:

  • If an update hook depends on new config being present, that is a design smell — prefer hook_post_update or hook_deploy_NAME(); do not hand-reorder cim before updb as a workaround without understanding why.
  • Multisite: run the update sequence per site: drush -l SITE updb -y && drush -l SITE cim -y && drush -l SITE cr for every site sharing the codebase. A release is not done until every site has been updated.

Exit condition: every command exited 0. A non-zero exit stops the workflow — do not continue past a failed updb or cim.

Phase 3 — Verify

  1. drush config:status — must report no differences.
  2. drush core:requirements --severity=2 — no new errors.
  3. drush watchdog:show --severity=Error --count=20 — no new runtime errors.
  4. Load the front page and one or two critical paths (login, key form) — HTTP 200 and visually sane.
  5. Disable maintenance mode if it was enabled.

Exit condition: all checks pass. If any fails, go to Phase 4 instead of debugging live under pressure — unless the fix is obvious and low-risk.

Phase 4 — Rollback (only when verification fails)

  1. Restore the codebase to the previous tag/commit.
  2. Restore the Phase 1 database dump.
  3. drush cr, re-verify, and communicate the failed release.

Hard rules

  • No deployment without a Phase 1 backup. No exceptions, including "small" releases.
  • Never run drush sql:drop, sql:sync toward production, or destructive commands against the production alias as part of a deploy.
  • Never mark a multisite release complete while any site is un-updated.
  • If the DDEV-based local flow is what the user needs (local update, not a server deploy), prefer the drupal-ddev-operations skill (ddev-tools plugin) when available.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use this skill when authoring or editing Docker Compose files (compose.yaml / docker-compose.yml), running multi-container stacks, or containerizing a Drupal/PHP application — e.g. "set up a local Drupal stack with nginx and MariaDB", "add Redis to my compose file", "why won't my containers start", "split dev and prod compose configuration". Also trigger for compose commands (up, down, logs, exec, watch) and healthcheck/dependency issues between services.

日本語の概要は準備中です。原文の説明を表示しています。

siva01c/claude-plugins162026年9月26日 更新

Use this skill when running local AI models with Docker Model Runner — the `docker model` CLI — e.g. "run an LLM locally with Docker", "pull a model from the ai/ namespace", "connect my app to a local model", "use a local model as backend for the Drupal AI module", or when wiring the `models:` top-level element into a compose.yaml. Covers pulling/running models, OpenAI-compatible endpoints, and Compose integration.

日本語の概要は準備中です。原文の説明を表示しています。

siva01c/claude-plugins162026年9月26日 更新

Use for operational Drupal 11 workflows in DDEV environments, including safe updates, backup-first procedures, and troubleshooting commands.

日本語の概要は準備中です。原文の説明を表示しています。

siva01c/claude-plugins162026年9月26日 更新

Use when creating or extending Drupal 11 custom modules, including scaffolding, service architecture, and dependency injection best practices.

日本語の概要は準備中です。原文の説明を表示しています。

siva01c/claude-plugins162026年9月26日 更新

Use when auditing Drupal 11 custom modules/themes for security issues such as unsafe input handling, XSS risks, SQL injection, and access control gaps.

日本語の概要は準備中です。原文の説明を表示しています。

siva01c/claude-plugins162026年9月26日 更新

dry

無料

DRY (Don't Repeat Yourself) review rules for code reviews: find the same knowledge — a rule, a constant, a parser, a validation, a protocol detail — implemented in several places that must change together, and tell it apart from code that merely looks alike. Use when reviewing a diff, a pull request or recent changes for duplication, on "DRY review", "is this duplicated", "copy-paste check", or when a review checklist asks for DRY. Pair it with the solid skill for design and with owasp-asvs for security.

日本語の概要は準備中です。原文の説明を表示しています。

siva01c/claude-plugins162026年9月26日 更新

siva01c のスキルをすべて見る

このスキルの問題を報告する