Configurer le déploiement

VérifiéPrudence

Configurez les paramètres de déploiement pour /land-and-deploy. Détecte la plateforme, l'URL, les vérifications de santé et le statut de déploiement, puis enregistre dans CLAUDE.md pour des déploiements automatiques.

Spar Skills Guide Bot
DevOpsDébutant
29/08/2026
Claude Code
#deployment#platform-detection#claude-md#health-checks#ci-cd

Recommandé pour

Synthèse automatique

Détecte la plateforme de déploiement d'un projet (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, Railway ou autre) et enregistre URL de production, endpoints de health check et commandes de statut dans CLAUDE.md pour la commande /land-and-deploy.

Points forts

  • Inspection automatique des fichiers de configuration (fly.toml, render.yaml, vercel.json, netlify.toml, Procfile, workflows GitHub Actions) avant toute question à l'utilisateur
  • Déduit une URL de production et une commande de statut par plateforme, puis demande confirmation au lieu d'imposer la valeur devinée
  • Gère les configurations déjà existantes en proposant de réécrire, d'éditer un champ précis ou de conserver l'existant
  • Persiste le résultat dans CLAUDE.md, ce qui évite toute redétection lors des déploiements suivants

Limites

  • Ne déploie rien lui-même : il ne fait que produire la configuration lue ensuite par /land-and-deploy
  • La détection repose sur des heuristiques de fichiers et sur la présence des CLI (fly, vercel) ; un projet atypique ou multi-plateformes peut être mal identifié
  • Fortement lié à l'écosystème gstack et à CLAUDE.md, donc peu réutilisable hors de Claude Code
Quand l'utiliser

À utiliser une fois par projet, juste avant de vouloir automatiser les déploiements via /land-and-deploy.

Quand l'éviter

Si vous cherchez un outil qui exécute réellement les déploiements ou si vous ne travaillez pas avec le flux gstack et CLAUDE.md.

Analyse de sécurité

Prudence
Score qualité88/100

The skill uses Bash and network commands for legitimate deployment configuration purposes. It does not contain destructive, exfiltrating, or obfuscated actions. The only minor concern is printing a truncated API key prefix, but that is intentional and low risk.

Points d'attention
  • •Uses Bash and network CLI commands (fly status, vercel ls) for platform detection and verification.
  • •Prints first 4 characters of RENDER_API_KEY to terminal, though avoids full key exposure.
Comment cette analyse est faite

Exemples

First-time deploy setup
/setup-deploy — configure deployment for this repo so /land-and-deploy works automatically.
Switch platforms
We just moved from Heroku to Render. Reconffigure my deployment settings in CLAUDE.md and confirm the new production URL and health check.
Inspect current config
Show me the Deploy Configuration section of my CLAUDE.md and let me change just the health check endpoint.

name: setup-deploy preamble-tier: 2 version: 1.0.0 description: | Configure deployment settings for /land-and-deploy. Detects your deploy platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, custom), production URL, health check endpoints, and deploy status commands. Writes the configuration to CLAUDE.md so all future deploys are automatic. Use when: "setup deploy", "configure deployment", "set up land-and-deploy", "how do I deploy with gstack", "add deploy config". triggers:

  • configure deploy
  • setup deployment
  • set deploy platform allowed-tools:
  • Bash
  • Read
  • Write
  • Edit
  • Glob
  • Grep
  • AskUserQuestion

{{PREAMBLE}}

{{THIRD_PARTY_ACTIONS}}

/setup-deploy — Configure Deployment for gstack

You are helping the user configure their deployment so /land-and-deploy works automatically. Your job is to detect the deploy platform, production URL, health checks, and deploy status commands — then persist everything to CLAUDE.md.

After this runs once, /land-and-deploy reads CLAUDE.md and skips detection entirely.

User-invocable

When the user types /setup-deploy, run this skill.

Instructions

Step 1: Check existing configuration

grep -A 20 "## Deploy Configuration" CLAUDE.md 2>/dev/null || echo "NO_CONFIG"

If configuration already exists, show it and ask:

  • Context: Deploy configuration already exists in CLAUDE.md.
  • RECOMMENDATION: Choose A to update if your setup changed.
  • A) Reconfigure from scratch (overwrite existing)
  • B) Edit specific fields (show current config, let me change one thing)
  • C) Done — configuration looks correct

If the user picks C, stop.

Step 2: Detect platform

Run the platform detection from the deploy bootstrap:

# Platform config files
[ -f fly.toml ] && echo "PLATFORM:fly" && cat fly.toml
[ -f render.yaml ] && echo "PLATFORM:render" && cat render.yaml
[ -f vercel.json ] || [ -d .vercel ] && echo "PLATFORM:vercel"
[ -f netlify.toml ] && echo "PLATFORM:netlify" && cat netlify.toml
[ -f Procfile ] && echo "PLATFORM:heroku"
[ -f railway.json ] || [ -f railway.toml ] && echo "PLATFORM:railway"

# GitHub Actions deploy workflows
for f in $(find .github/workflows -maxdepth 1 \( -name '*.yml' -o -name '*.yaml' \) 2>/dev/null); do
  [ -f "$f" ] && grep -qiE "deploy|release|production|staging|cd" "$f" 2>/dev/null && echo "DEPLOY_WORKFLOW:$f"
done

# Project type
[ -f package.json ] && grep -q '"bin"' package.json 2>/dev/null && echo "PROJECT_TYPE:cli"
find . -maxdepth 1 -name '*.gemspec' 2>/dev/null | grep -q . && echo "PROJECT_TYPE:library"

Step 3: Platform-specific setup

Based on what was detected, guide the user through platform-specific configuration.

Fly.io

If fly.toml detected:

  1. Extract app name: grep -m1 "^app" fly.toml | sed 's/app = "\(.*\)"/\1/'
  2. Check if fly CLI is installed: which fly 2>/dev/null
  3. If installed, verify: fly status --app {app} 2>/dev/null
  4. Infer URL: https://{app}.fly.dev
  5. Set deploy status command: fly status --app {app}
  6. Set health check: https://{app}.fly.dev (or /health if the app has one)

Ask the user to confirm the production URL. Some Fly apps use custom domains.

Render

If render.yaml detected:

  1. Extract service name and type from render.yaml
  2. Check for Render API key: echo $RENDER_API_KEY | head -c 4 (don't expose the full key)
  3. Infer URL: https://{service-name}.onrender.com
  4. Render deploys automatically on push to the connected branch — no deploy workflow needed
  5. Set health check: the inferred URL

Ask the user to confirm. Render uses auto-deploy from the connected git branch — after merge to main, Render picks it up automatically. The "deploy wait" in /land-and-deploy should poll the Render URL until it responds with the new version.

Vercel

If vercel.json or .vercel detected:

  1. Check for vercel CLI: which vercel 2>/dev/null
  2. If installed: vercel ls --prod 2>/dev/null | head -3
  3. Vercel deploys automatically on push — preview on PR, production on merge to main
  4. Set health check: the production URL from vercel project settings

Netlify

If netlify.toml detected:

  1. Extract site info from netlify.toml
  2. Netlify deploys automatically on push
  3. Set health check: the production URL

GitHub Actions only

If deploy workflows detected but no platform config:

  1. Read the workflow file to understand what it does
  2. Extract the deploy target (if mentioned)
  3. Ask the user for the production URL

Custom / Manual

If nothing detected:

Use AskUserQuestion to gather the information:

  1. How are deploys triggered?

    • A) Automatically on push to main (Fly, Render, Vercel, Netlify, etc.)
    • B) Via GitHub Actions workflow
    • C) Via a deploy script or CLI command (describe it)
    • D) Manually (SSH, dashboard, etc.)
    • E) This project doesn't deploy (library, CLI, tool)
  2. What's the production URL? (Free text — the URL where the app runs)

  3. How can gstack check if a deploy succeeded?

    • A) HTTP health check at a specific URL (e.g., /health, /api/status)
    • B) CLI command (e.g., fly status, kubectl rollout status)
    • C) Check the GitHub Actions workflow status
    • D) No automated way — just check the URL loads
  4. Any pre-merge or post-merge hooks?

    • Commands to run before merging (e.g., bun run build)
    • Commands to run after merge but before deploy verification

Step 4: Write configuration

Read CLAUDE.md (or create it). Find and replace the ## Deploy Configuration section if it exists, or append it at the end.

## Deploy Configuration (configured by /setup-deploy)
- Platform: {platform}
- Production URL: {url}
- Deploy workflow: {workflow file or "auto-deploy on push"}
- Deploy status command: {command or "HTTP health check"}
- Merge method: {squash/merge/rebase}
- Project type: {web app / API / CLI / library}
- Post-deploy health check: {health check URL or command}

### Custom deploy hooks
- Pre-merge: {command or "none"}
- Deploy trigger: {command or "automatic on push to main"}
- Deploy status: {command or "poll production URL"}
- Health check: {URL or command}

Step 5: Verify

After writing, verify the configuration works:

  1. If a health check URL was configured, try it:
curl -sf "{health-check-url}" -o /dev/null -w "%{http_code}" 2>/dev/null || echo "UNREACHABLE"
  1. If a deploy status command was configured, try it:
{deploy-status-command} 2>/dev/null | head -5 || echo "COMMAND_FAILED"

Report results. If anything failed, note it but don't block — the config is still useful even if the health check is temporarily unreachable.

Step 6: Summary

DEPLOY CONFIGURATION — COMPLETE
════════════════════════════════
Platform:      {platform}
URL:           {url}
Health check:  {health check}
Status cmd:    {status command}
Merge method:  {merge method}

Saved to CLAUDE.md. /land-and-deploy will use these settings automatically.

Next steps:
- Run /land-and-deploy to merge and deploy your current PR
- Edit the "## Deploy Configuration" section in CLAUDE.md to change settings
- Run /setup-deploy again to reconfigure

Important Rules

  • Never expose secrets. Don't print full API keys, tokens, or passwords.
  • Confirm with the user. Always show the detected config and ask for confirmation before writing.
  • CLAUDE.md is the source of truth. All configuration lives there — not in a separate config file.
  • Idempotent. Running /setup-deploy multiple times overwrites the previous config cleanly.
  • Platform CLIs are optional. If fly or vercel CLI isn't installed, fall back to URL-based health checks.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/configure-deployment-mte1liwl/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/configure-deployment-mte1liwl' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/configure-deployment-mte1liwl/download' --output '.skill-downloads/configure-deployment-mte1liwl/SKILL.md.part' && mv '.skill-downloads/configure-deployment-mte1liwl/SKILL.md.part' '.skill-downloads/configure-deployment-mte1liwl/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/configure-deployment-mte1liwl/SKILL.md' && test -s '.skill-downloads/configure-deployment-mte1liwl/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/setup-deploy' && cp -R '.skill-downloads/configure-deployment-mte1liwl' '.claude/skills/setup-deploy'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/configure-deployment-mte1liwl'

openskills read 'configure-deployment-mte1liwl'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/configure-deployment-mte1liwl/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires