khalilbenaz/claude-skills-collection/agent-deployment-guide
Claude Code and agent skill by khalilbenaz/claude-skills-collection
- community
Checking that the SKILL.md file is still in the repository.
Déploiement d'agents IA en production avec scalabilité et fiabilité. Se déclenche avec "déployer agent", "agent en production", "agent API", "hosting agent", "agent scaling", "agent infrastructure", "servir un agent", "agent cloud". Also triggers on "deploy an agent", "agent in production", "agent hosting".
Install
npx vskill@latest install khalilbenaz/claude-skills-collection/agent-deployment-guideSKILL.md
Agent Deployment Guide
Quand utiliser ce skill
Passage d'un agent fonctionnel en local vers un déploiement production fiable et scalable. Couvre API synchrone, worker asynchrone, webhook, tâche planifiée, streaming temps réel. Applicable sur AWS, Azure, GCP, ou infrastructure on-premise.
Étape 1 — Choisir le pattern de déploiement
| Pattern | Quand l'utiliser | Latence max | Exemple | |
|---|---|---|---|---|
| API synchrone (FastAPI) | Usage interactif, réponse < 30s | 29s | Chatbot, Q&A | |
| Worker async (Celery/Bull) | Tâches longues, batch | Illimité | Analyse de docs, rapport | |
| Webhook handler | Événements externes (GitHub, Slack) | 3s (ACK) | Bot Slack, CI/CD agent | |
| Scheduled agent (cron) | Récurrent, pas de déclencheur externe | N/A | Rapport hebdo, cleanup | |
| Streaming SSE/WebSocket | UX conversationnelle temps réel | < 1s TTFB | Assistant interactif |
Critère décisif : si la réponse prend > 30s → worker async + polling/webhook. Sinon → API synchrone.
Étape 2 — Containeriser l'agent
Points critiques :
- Tag Docker immutable (
image:v1.2.3), jamaislatesten prod - Secrets → volume/secret manager, jamais
COPY .envdans l'image - Model weights → volume monté ou téléchargement S3 au démarrage, pas dans l'image
Étape 3 — Wrapper API robuste
Étape 4 — State management externalisé (obligatoire)
Toute l'état doit vivre hors du processus pour permettre le scaling horizontal.
- Redis : sessions courtes, cache tool results (TTL court)
- PostgreSQL : historique long terme, audit trail, facturation
- Ne jamais stocker l'état dans une variable globale ou en mémoire d'instance
Étape 5 — Worker async pour tâches longues
Étape 6 — Scaling et résilience
Auto-scaling Kubernetes (HPA) :
Circuit breaker avec tenacity :
Étape 7 — Secrets et configuration
Règle : .env uniquement en dev local. En prod → secret manager ou Kubernetes Secrets.
Étape 8 — Rollback et canary release
Étape 9 — Observabilité minimale obligatoire (dès J1)
Métriques indispensables : latence p50/p95/p99, taux d'erreur, tokens LLM consommés, coût/requête, queue depth.
Garde-fous — Anti-patterns et pièges courants
| Piège | Symptôme | Remède | |
|---|---|---|---|
| État en mémoire d'instance | Erreurs aléatoires après scaling | Externaliser tout dans Redis/DB | |
Tag latest en prod | Rollback impossible | Tags immutables v1.2.3 | |
| Timeout LLM trop long | Workers bloqués, queue saturée | Timeout 25-28s max, retry avec backoff | |
| Secrets dans l'image Docker | Fuite si image partagée | Secret manager + injection runtime | |
| Cold start Lambda/Cloud Run sans warmup | Latence p99 catastrophique | Min instances = 1, ou warmup ping | |
| Pas de readiness probe | Traffic vers pods non-prêts | /ready vérifie TOUTES les dépendances | |
| Scaling sur CPU uniquement | Queue déborde, CPU stable | Ajouter métrique custom (queue depth) | |
| Réponse synchrone > 30s | Timeouts client, retries en cascade | Passer en worker async + polling | |
| Rate limit LLM API non géré | 429 en cascade, panne totale | Retry exponentiel + circuit breaker |
Checklist de mise en production
- [ ] Image Docker avec tag immutable, multi-stage, non-root
- [ ] Secrets via secret manager (pas en dur, pas dans l'image)
- [ ]
/healthet/readyimplémentés et configurés dans Kubernetes/cloud - [ ] State 100% externalisé (Redis + DB)
- [ ] Retry + circuit breaker sur les appels LLM API
- [ ] HPA configuré avec métriques pertinentes
- [ ] Métriques Prometheus exposées + dashboard Grafana
- [ ] Rollback testé en staging avant chaque mise en prod
- [ ] Canary ou blue/green pour les releases majeures
- [ ] Alertes sur taux d'erreur > 1% et latence p95 > SLA
Communication Rules — MANDATORY
- Ultra-concise. No filler, no preamble, no pleasantries.
- Never say "happy to help", "sure!", "great question", "let me", or similar.
- Tool first, talk second. Act before explaining.
- Result first. Lead with outcome, not process.
- Stop when done. No summary, no recap, no trailing commentary.
- No politeness wrappers. Direct and blunt.
- Minimum words. If one word works, do not use ten.
- No unsolicited explanations.
- No emoji unless asked.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/agent-deployment-guide/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/khalilbenaz/claude-skills-collection/agent-deployment-guide)