Agent skill

Deployment Strategies

by kid-sid in kid-sid/claude-spellbook

A skill your agent uses when choosing a deployment strategy for a release, setting up canary or blue/green rollouts, adding feature flags to decouple deployment from release, coordinating a…

MITAuto-check passedDevOps & Cloud

Install Deployment Strategies

skills CLI
$ npx skills add kid-sid/claude-spellbook --skill deployment-strategies -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install kid-sid/claude-spellbook deployment-strategies --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/kid-sid/claude-spellbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/deployment-strategies .claude/skills/deployment-strategies && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
deployment-strategies
GitHub stars
190
Token cost
~3.2k tokens
SKILL.md length
1,271 words
Files
1
Skills in repo
55
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when choosing a deployment strategy for a release, setting up canary or blue/green rollouts, adding feature flags to decouple deployment from release, coordinating a…

  • Works in 5 steps: Deploy new version to Green environment → Run smoke tests against Green (no user… → Flip traffic: update load balancer rule… → …
  • Choosing a deployment strategy for a release
  • SKILL.md covers When to Activate, Strategy Comparison, Rolling Updates (Kubernetes) and Blue/Green Deployments, plus 6 more sections
  • Calls kubectl and helm

What it does

Deployment Strategies is an agent skill from kid-sid/claude-spellbook. Use when choosing a deployment strategy for a release, setting up canary or blue/green rollouts, adding feature flags to decouple deployment from release, coordinating a zero-downtime database migration, or defining rollback criteria and procedures.

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Deployment. It works with Kubernetes. The repository describes itself as: A curated collection of skills, prompts, and workflows that extend Claude's capabilities — your personal grimoire for AI-powered development. The licence is MIT.

When your agent uses it

  • Choosing a deployment strategy for a release
  • Setting up canary
  • Blue/green rollouts
  • Adding feature flags to decouple deployment from release

Example prompts

  • “/deployment-strategies”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Deploy new version to Green environment
  2. Run smoke tests against Green (no user traffic yet)
  3. Flip traffic: update load balancer rule or Kubernetes Service selector
  4. Monitor error rate and latency for 15–30 minutes
  5. Decommission Blue (or keep as instant rollback for 24 hours)

What it can do on your machine

Read from SKILL.md and the folder at commit a7c2ac9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • kubectl
    • helm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use kubectl and helm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Deployment Strategies loads about 3.2k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 1,271 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from kid-sid/claude-spellbook at commit a7c2ac9, republished under its MIT licence (© kid-sid). 1,271 words, ~3,199 tokens.

Download SKILL.mdSave it as .claude/skills/deployment-strategies/SKILL.md (or your agent's skills folder).
name
deployment-strategies
description
Use when choosing a deployment strategy for a release, setting up canary or blue/green rollouts, adding feature flags to decouple deployment from release, coordinating a zero-downtime database migration, or defining rollback criteria and procedures.

Deployment Strategies

A reference for selecting and implementing deployment strategies that minimize risk, enable zero-downtime releases, and provide fast rollback paths.

When to Activate

  • Planning a deployment strategy for a new service or major release
  • Implementing feature flags in an application
  • Coordinating a database migration with a zero-downtime deployment
  • Setting up canary releases or progressive delivery
  • Defining rollback procedures for a service
  • Reducing deployment risk for a high-traffic service

Strategy Comparison

StrategyTraffic routingRollback speedRiskInfrastructure costBest for
RecreateStop all, start newFast (redeploy)High (downtime)LowDev/non-prod
Rolling updateReplace pods graduallyMedium (rollback flag)MediumLowMost services
Blue/GreenFlip all traffic at onceInstant (flip back)Low2xHigh-stakes releases
CanaryShift % traffic graduallyInstant (shift back)Very lowSlightly > 1xHigh-traffic, data-sensitive
A/B TestingRoute by user segmentInstantLow~1xFeature experiments
ShadowMirror traffic, no user impactN/ANone~2xTesting new version with real traffic

Rolling Updates (Kubernetes)

Default Kubernetes behavior when you run kubectl apply. Pods are replaced incrementally — no full restart required.

yaml
strategy:
  type: RollingUpdate
  rollingUpdate:
    maxSurge: 1        # max pods above desired count during rollout
    maxUnavailable: 0  # never go below desired count (zero-downtime)
  • Set maxUnavailable: 0 to guarantee zero downtime — new pods must pass readiness probes before old pods are terminated.
  • Rollback: kubectl rollout undo deployment/my-service
  • Target a specific revision: kubectl rollout undo deployment/my-service --to-revision=3
  • Monitor progress: kubectl rollout status deployment/my-service
  • Issue: slow rollback if many replicas; new version runs alongside old — both app versions must be compatible with current DB schema.

Blue/Green Deployments

Two identical environments run in parallel: Blue (live) and Green (new version). Traffic flips atomically from one to the other.

Process
  1. Deploy new version to Green environment
  2. Run smoke tests against Green (no user traffic yet)
  3. Flip traffic: update load balancer rule or Kubernetes Service selector
  4. Monitor error rate and latency for 15–30 minutes
  5. Decommission Blue (or keep as instant rollback for 24 hours)
Kubernetes Implementation

Flip the Service selector to switch which deployment receives traffic.

yaml
# Blue deployment (live)
spec:
  selector:
    app: payment-service
    version: blue   # Service points here

# Green deployment (new)
spec:
  selector:
    app: payment-service
    version: green  # Update Service to point here after smoke tests

Flip command:

bash
kubectl patch service payment-service -p '{"spec":{"selector":{"version":"green"}}}'
Considerations
  • Cost: 2x infrastructure during transition window.
  • Warm-up: Green must receive warming traffic (health checks, cache pre-warming) before the flip to avoid cold-start latency spikes.
  • Database: Both Blue and Green versions must be compatible with the same DB schema during the transition window. Use the expand-contract pattern for migrations.

Canary Releases

Gradually shift traffic from the stable version to the new version. Automated analysis gates promotion based on SLO metrics.

  • Typical progression: 5% → 25% → 50% → 100%
  • Automated promotion: if error rate < 1% and p99 latency < 500 ms, advance
  • Manual gate: require human approval before advancing beyond 25%
  • Automated abort: if metrics breach thresholds, roll back instantly
Argo Rollouts
yaml
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: payment-service
spec:
  strategy:
    canary:
      steps:
        - setWeight: 5
        - pause: { duration: 10m }
        - setWeight: 25
        - pause: {}  # manual gate — requires human approval
        - setWeight: 50
        - pause: { duration: 10m }
        - setWeight: 100
      analysis:
        templates:
          - templateName: error-rate-check
        startingStep: 1
        args:
          - name: service-name
            value: payment-service

Promote or abort the rollout:

bash
kubectl argo rollouts promote payment-service  # advance to next step
kubectl argo rollouts abort payment-service    # rollback to stable
Flagger (Linkerd / Istio)

Flagger integrates with service meshes for automatic traffic splitting and metric-based promotion. Define a Canary CR with analysis.metrics referencing Prometheus queries. Flagger handles weight increments and rollback automatically — no manual step definitions required.

Feature Flags

Why Feature Flags
  • Decouple deployment from release: deploy code, enable for users later
  • Progressive rollout: enable for 1% → 10% → 100% of users without redeploying
  • Kill switch: disable instantly without a deployment or rollback
  • A/B testing: different experiences for user segments based on targeting rules
Flag Lifecycle
  1. Add flag (disabled by default)
  2. Deploy code wrapped behind flag
  3. Enable for internal users → beta users → percentage rollout → 100%
  4. Remove flag and dead code (flags are technical debt — clean up within a sprint of full rollout)
Tools Comparison
ToolHostingSDK supportBest for
LaunchDarklyCloud (paid)20+ SDKsEnterprise, A/B testing
UnleashSelf-hosted or cloud10+ SDKsOpen-source, full control
OpenFeatureStandard (vendor-agnostic SDK)All vendorsPortability across providers
AWS AppConfigCloudAWS SDKAWS-native workloads
Environment variablesN/ASimpleSimple boolean flags, no runtime toggle needed
Code Pattern (OpenFeature)
typescript
import { OpenFeature } from '@openfeature/server-sdk';

const client = OpenFeature.getClient();

// Simple boolean flag
const isNewCheckoutEnabled = await client.getBooleanValue(
  'new-checkout-flow',
  false,  // default value — returned if flag is missing or evaluation fails
  { targetingKey: userId }
);

if (isNewCheckoutEnabled) {
  return newCheckoutHandler(req, res);
} else {
  return legacyCheckoutHandler(req, res);
}

OpenFeature's provider abstraction means swapping from LaunchDarkly to Unleash requires changing only the registered provider — application code stays the same.

Database Migrations and Zero-Downtime Deployments

The Problem

Direct ALTER TABLE can lock tables under load. Renaming columns breaks the old app version that runs alongside the new version during a rolling deploy. Any migration that removes or renames a column must be done in phases.

Expand-Contract Pattern (Parallel Change)

Use for: adding NOT NULL columns, renaming columns or tables, changing data types.

Phase 1 — Expand (additive only):

  • Add new column as NULLABLE
  • Deploy application code that writes to both old and new columns
  • No downtime — old app version still works with the old column

Phase 2 — Migrate:

  • Backfill existing rows in batches to avoid table locks:
    sql
    UPDATE table SET new_col = old_col WHERE new_col IS NULL LIMIT 10000;
  • Deploy application code that reads from the new column
  • Add NOT NULL constraint once all rows are populated (now safe)

Phase 3 — Contract (remove old):

  • Deploy application code that no longer references the old column
  • Drop old column in a separate migration
  • Can be done in a later sprint once confidence is high
Show full SKILL.md (481 more words)Show less
Example Timeline

Renaming user.username to user.display_name:

Sprint 1: Add display_name (nullable), write to both columns
Sprint 2: Backfill rows, read from display_name, add NOT NULL
Sprint 3: Remove username column
Large Table Migrations

For tables with millions of rows, use pt-online-schema-change (Percona) or gh-ost (GitHub) to perform the migration on a shadow table and cut over with minimal locking.

Rollback Procedures

When to Roll Back

Roll back when:

  • Error rate exceeds SLO threshold (e.g., > 1% errors) within 15 minutes of deploy
  • p99 latency increases more than 2x baseline
  • Critical functionality is broken (payments, login, data integrity)

Do not roll back immediately for:

  • Cosmetic issues or minor UI regressions
  • Minor performance variance within acceptable range
  • Cases where rollback itself would cause different data loss (evaluate carefully)
Rollback Decision Tree
Error rate > SLO?
├── Yes → Can we fix forward in < 15 minutes? → No  → ROLLBACK
│                                              → Yes → hotfix + monitor
└── No  → Monitor, do not rollback
Rollback Commands
bash
# Kubernetes rolling update — undo last rollout
kubectl rollout undo deployment/payment-service

# Kubernetes — target a specific revision
kubectl rollout undo deployment/payment-service --to-revision=3

# Argo Rollouts canary — abort and revert to stable
kubectl argo rollouts abort payment-service

# Helm — rollback to a previous release number
helm rollback payment-service 3
Rollback Runbook Template
markdown
## Rollback: [Service Name]

**Trigger criteria:** [e.g., error rate > 1% for 5 minutes]

**Steps:**
1. Notify on-call channel: "@oncall rolling back payment-service due to [reason]"
2. Run: `kubectl rollout undo deployment/payment-service -n production`
3. Verify: `kubectl rollout status deployment/payment-service`
4. Check metrics: confirm error rate returns to baseline
5. Create incident ticket with timeline and root cause

**Data rollback:** [specify if DB migration rollback is needed and how]
**Escalation:** [who to page if rollback fails]

See also: ci-cd, containerization, observability, incident-response

Red Flags

  • Deploying a schema migration and an app change in the same atomic release — if the migration succeeds but the app rollout fails mid-way, old pods still running see the new schema; migrations and app deploys must be sequenced across separate releases
  • Setting maxUnavailable: 1 instead of 0 for critical services — during a rolling deploy, one pod is taken down before the new one is ready, briefly dropping capacity below the desired replica count and increasing error rates
  • Feature flag with no documented cleanup date — flags that ship but never get cleaned up accumulate into untested conditional branches; enforce a sprint deadline at the time of flag creation
  • Blue/green flip without traffic warming on the Green environment — an un-warmed JVM or cold connection pool on Green produces a latency spike immediately after the flip that looks like an outage
  • Canary rollback based only on error rate, ignoring latency SLO — a new version can stay under 1% errors while p99 latency doubles; always gate canary promotion on both error rate and latency thresholds
  • Defining rollback criteria only after an incident starts — ad-hoc rollback decisions under pressure are slow and inconsistent; criteria and commands must be written in the runbook before the deploy
  • Rolling back a migration by dropping a column that the old app version still reads — the old app immediately errors after the column is dropped; contract phases must be fully completed before any column is removed
  • Using environment variables as a feature flag substitute for runtime toggles — env var flags require a pod restart to take effect and cannot be changed per-user or per-percentage; use a proper feature flag service for runtime control

Checklist

  • Deployment strategy chosen and documented (rolling / blue-green / canary)
  • maxUnavailable: 0 set for zero-downtime rolling updates
  • Readiness probe passes before traffic is routed to new pods
  • Smoke tests run automatically after each deployment
  • Canary analysis configured with SLO-based pass/fail criteria
  • Feature flags used for high-risk features — code deployed dark before enabling
  • Dead feature flag code cleaned up within same sprint as full rollout
  • Database migrations follow expand-contract pattern for zero-downtime
  • Both app versions compatible with same DB schema during rolling deploy window
  • Rollback procedure documented with specific commands and trigger criteria

© kid-sid, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/deployment-strategies of kid-sid/claude-spellbook.

Open the folder on GitHubat commit a7c2ac9

Compare with similar skills

Deployment Strategies next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Deployment Strategies compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Deployment Strategies this skillkid-sid/claude-spellbook190—~3.2kAutomated safety check: PassMIT
Kubeshark Installerkubeshark/kubeshark12k—~3.6kAutomated safety check: NotesApache-2.0
KubeSphere ServiceMesh Managerkubesphere/kubesphere17k—~2.4kAutomated safety check: PassCustom licence
Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit2606 repos~1.1kAutomated safety check: NotesCustom licence
LangBot Deployment Guidelangbot-app/LangBot18k—~1.2kAutomated safety check: NotesApache-2.0
Openbkn Deployopenbkn-ai/bkn-foundry655—~1.9kAutomated safety check: NotesCustom licence

Similar skills

  • Kubeshark Installer

    kubeshark/kubeshark

    Installs and configures Kubeshark on a Kubernetes cluster, choosing between the quick CLI path and a Helm install with custom values.

    12k GitHub stars~3.6k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • KubeSphere ServiceMesh Manager

    kubesphere/kubesphere

    Installs, checks and troubleshoots the KubeSphere ServiceMesh extension (Istio, Kiali, Jaeger), including grayscale release, sidecar injection, topology and tracing issues.

    17k GitHub stars~2.4k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check passed
  • Senior DevOps Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…

    260 GitHub starsUsed in 6 repos~1.1k tokens
    DevOps & CloudAuto-check: notes
  • LangBot Deployment Guide

    langbot-app/LangBot

    Deploys and configures a LangBot instance with Docker Compose or Kubernetes, covering config.yaml, the Box sandbox runtime, the plugin runtime and the global API key.

    18k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Openbkn Deploy

    openbkn-ai/bkn-foundry

    Deploy or upgrade OpenBKN on a customer-authorized Linux server through the repository's deploy scripts, with preflight checks, explicit confirmation, secret handling, and post-deployment…

    655 GitHub stars~1.9k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • KubeShark for Kubernetes

    LukasNiessen/kubernetes-skill

    Keeps Kubernetes manifests, Helm charts and policies grounded by diagnosing six failure modes, such as insecure defaults and API drift, and loading only matching references.

    446 GitHub stars~1.2k tokensUpdated 27 days ago
    DevOps & CloudAuto-check passed

More from kid-sid/claude-spellbook

All 55 skills in this repo
  • Accessibility

    kid-sid/claude-spellbook

    A skill your agent uses when building or reviewing UI components for keyboard and screen reader compatibility, adding ARIA to custom widgets, auditing a page for WCAG AA conformance, or preparing…

    190 GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Agentex

    kid-sid/claude-spellbook

    A skill your agent uses when building, wiring, or debugging an Agentex agent — choosing agent type, configuring acp.py and manifest.yaml, using adk.messages or adk.state, or resolving…

    190 GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • AI Engineer

    kid-sid/claude-spellbook

    A skill your agent uses when building production LLM applications — designing RAG pipelines, choosing vector databases, implementing agent orchestration, optimizing cost, or adding AI safety…

    190 GitHub stars~3.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Angular

    kid-sid/claude-spellbook

    A skill your agent uses when building or refactoring Angular applications — choosing between signals, RxJS, and NgRx for state, configuring routing with guards and lazy loading, optimizing change…

    190 GitHub stars~5k tokensUpdated 2 mo ago
    Auto-check passed
  • API Design

    kid-sid/claude-spellbook

    A skill your agent uses when designing new REST endpoints, reviewing an existing API contract, adding pagination or filtering, planning a versioning strategy, or building a public or partner-facing…

    190 GitHub stars~3.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Auth

    kid-sid/claude-spellbook

    A skill your agent uses when implementing login flows, issuing or validating JWTs, setting up OAuth2/OIDC with a provider, designing role-based or attribute-based access control, securing API…

    190 GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Deployment Strategies

What does Deployment Strategies do?

A skill your agent uses when choosing a deployment strategy for a release, setting up canary or blue/green rollouts, adding feature flags to decouple deployment from release, coordinating a…. Deployment Strategies is an agent skill from kid-sid/claude-spellbook. Use when choosing a deployment strategy for a release, setting up canary or blue/green rollouts, adding feature flags to decouple deployment from release, coordinating a zero-downtime database migration, or defining rollback criteria and procedures.

When should I use Deployment Strategies?

Deployment Strategies fits situations like: choosing a deployment strategy for a release; setting up canary; blue/green rollouts; adding feature flags to decouple deployment from release.

How do I install Deployment Strategies in Claude Code?

Run `npx skills add kid-sid/claude-spellbook --skill deployment-strategies -a claude-code`. Or copy the skill folder (skills/deployment-strategies in kid-sid/claude-spellbook) into .claude/skills/deployment-strategies in your project. Claude Code loads it when a task matches its description.

How do I install Deployment Strategies in Codex?

Run `npx skills add kid-sid/claude-spellbook --skill deployment-strategies -a codex`. Or copy the skill folder (skills/deployment-strategies in kid-sid/claude-spellbook) into .agents/skills/deployment-strategies in your project. Codex loads it when a task matches its description.

Can I use Deployment Strategies in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kid-sid/claude-spellbook --skill deployment-strategies -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/deployment-strategies, .gemini/skills/deployment-strategies, .github/skills/deployment-strategies and .opencode/skills/deployment-strategies in your project.

What does Deployment Strategies need to run?

Going by SKILL.md and its folder, Deployment Strategies needs the command-line tools its instructions call (kubectl and helm).

Does Deployment Strategies access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Deployment Strategies safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Deployment Strategies use?

Deployment Strategies is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Deployment Strategies use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Deployment Strategies?

Skills that share tags, products or a category with Deployment Strategies: Kubeshark Installer (kubeshark/kubeshark, 12k stars), KubeSphere ServiceMesh Manager (kubesphere/kubesphere, 17k stars), Senior DevOps Toolkit (maslennikov-ig/claude-code-orchestrator-kit, 260 stars) and LangBot Deployment Guide (langbot-app/LangBot, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Deployment Strategies?

kid-sid (a GitHub user) maintains it in kid-sid/claude-spellbook, which has 190 GitHub stars. The repository holds 55 skills in this directory. The repository was last updated on August 5, 2026.

Source: kid-sid/claude-spellbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.