From acc
Generates blue-green, canary, rolling deployment YAML configs for GitHub Actions and GitLab CI, including health checks, smoke tests, traffic switching, and rollbacks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/acc:create-deploy-strategyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generates deployment configurations for zero-downtime deployments.
Generates deployment configurations for zero-downtime deployments.
# .github/workflows/deploy-blue-green.yml
name: Blue-Green Deploy
on:
push:
tags: ['v*']
workflow_dispatch:
inputs:
environment:
description: 'Target environment'
required: true
type: choice
options: [staging, production]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
outputs:
image_tag: ${{ steps.meta.outputs.tags }}
steps:
- uses: actions/checkout@v4
- name: Build and push image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: ${{ github.event.inputs.environment || 'production' }}
url: ${{ steps.deploy.outputs.url }}
steps:
- uses: actions/checkout@v4
- name: Determine target environment
id: env
run: |
ACTIVE=$(curl -s https://api.example.com/active-env)
if [ "$ACTIVE" = "blue" ]; then
echo "target=green" >> $GITHUB_OUTPUT
echo "url=https://green.example.com" >> $GITHUB_OUTPUT
else
echo "target=blue" >> $GITHUB_OUTPUT
echo "url=https://blue.example.com" >> $GITHUB_OUTPUT
fi
- name: Deploy to inactive environment
id: deploy
env:
TARGET: ${{ steps.env.outputs.target }}
IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
run: |
# Deploy to target environment
ssh deploy@${{ secrets.DEPLOY_HOST }} << EOF
docker pull $IMAGE
docker-compose -f docker-compose.$TARGET.yml up -d
EOF
echo "url=${{ steps.env.outputs.url }}" >> $GITHUB_OUTPUT
- name: Health check
run: |
for i in {1..30}; do
if curl -sf "${{ steps.env.outputs.url }}/health"; then
echo "Health check passed"
exit 0
fi
sleep 10
done
echo "Health check failed"
exit 1
- name: Run smoke tests
run: |
npm run test:smoke -- --base-url="${{ steps.env.outputs.url }}"
- name: Switch traffic
if: success()
run: |
curl -X POST https://api.example.com/switch-traffic \
-H "Authorization: Bearer ${{ secrets.DEPLOY_TOKEN }}" \
-d '{"target": "${{ steps.env.outputs.target }}"}'
- name: Rollback on failure
if: failure()
run: |
echo "Deployment failed, keeping traffic on current environment"
curl -X POST https://api.example.com/rollback \
-H "Authorization: Bearer ${{ secrets.DEPLOY_TOKEN }}"
See references/templates.md for: Blue-Green GitLab CI, Canary GitHub Actions, Canary GitLab CI, Rolling Kubernetes, Rolling Docker Swarm configurations.
<?php
// src/Api/Action/HealthAction.php
declare(strict_types=1);
namespace App\Api\Action;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
final readonly class HealthAction
{
public function __construct(
private DatabaseHealthChecker $database,
private CacheHealthChecker $cache,
private QueueHealthChecker $queue,
) {}
public function ready(ServerRequestInterface $request): ResponseInterface
{
$checks = [
'database' => $this->database->check(),
'cache' => $this->cache->check(),
'queue' => $this->queue->check(),
];
$healthy = !in_array(false, $checks, true);
return new JsonResponse(
[
'status' => $healthy ? 'healthy' : 'unhealthy',
'checks' => $checks,
'timestamp' => (new DateTimeImmutable())->format('c'),
],
$healthy ? 200 : 503
);
}
public function live(ServerRequestInterface $request): ResponseInterface
{
return new JsonResponse([
'status' => 'alive',
'timestamp' => (new DateTimeImmutable())->format('c'),
]);
}
}
Identify deployment target:
Select strategy:
Configure health checks:
Set up monitoring:
Define rollback triggers:
Provide:
The generator will:
npx claudepluginhub dykyi-roman/awesome-claude-code --plugin accSelects and designs deployment strategies (blue-green, canary, rolling) for safe production releases.
Provides zero-downtime deployment strategies including blue-green, canary releases, rolling updates, rollbacks, feature flags, and health checks. Useful for release management and minimizing risks.
Provides deployment strategies like rolling, blue-green, canary; multi-stage Dockerfiles for Node.js, Go, Python/Django; health checks, rollbacks, and production checklists for web apps.