AI Prompts for ChatGPT for DevOps

20 of the best prompts for ChatGPT for DevOps, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.

AI Prompts for ChatGPT for DevOps

20 of the best prompts for ChatGPT for DevOps, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.

Scroll to explore

Published July 4, 2026

Automate deployments, write clean infrastructure code, debug pipelines, and build reliable systems faster. Built across 4 distinct stages covering CI/CD Pipelines, Infrastructure as Code, Scripting and Automation and more, this guide gives you one expert prompt per step so you never have to write from scratch or guess what the AI needs. The prompts work in ChatGPT, Claude, and Gemini and are designed to get usable output on the first try.

CI/CD Pipelines

Design and write automated build, test, and deploy pipelines.

Set up

I need to set up a CI/CD pipeline for a [DESCRIBE STACK, E.G. "NEXT.JS APP DEPLOYED TO VERCEL"] using [GITHUB ACTIONS/GITLAB CI/OTHER]. Write the workflow file that runs lint, type check, tests, and deploys on merge to main.

CI/CD Pipelines

Pipeline takes minutes

My pipeline takes [N] minutes. Here is the current workflow: [PASTE WORKFLOW]. Identify bottlenecks, add caching for dependencies and build artifacts, and parallelize jobs where possible.

CI/CD Pipelines

Write GitHub Actions workflow

Write a GitHub Actions workflow that runs tests against a matrix of [NODE VERSIONS / OS / OTHER]. Handle failures properly and report results in the PR.

CI/CD Pipelines

Deployment pipeline

I need a deployment pipeline that deploys to staging on every PR merge and to production only on manual approval. Write the workflow with environment protection rules and Slack notifications.

CI/CD Pipelines

Docker build pipeline

Set up a Docker build pipeline that builds a multi-stage image for [DESCRIBE APP], pushes to [ECR/DOCKER HUB/GHCR], and uses layer caching to minimize build time.

CI/CD Pipelines

Infrastructure as Code

Write clean, maintainable infrastructure definitions.

Write Terraform configuration

Write a Terraform configuration to provision [DESCRIBE INFRASTRUCTURE, E.G. "AN ECS CLUSTER WITH ALB, RDS, AND ELASTICACHE"]. Use modules, separate variables for environment-specific values, and add outputs for key resource IDs.

Infrastructure as Code

Write Docker Compose setup

I need to write a Docker Compose setup for local development of [DESCRIBE APP WITH ITS DEPENDENCIES]. Include services for the app, database, cache, and any other dependencies, with volume mounts and environment variables.

Infrastructure as Code

Convert manual AWS setup

Convert this manual AWS setup to CloudFormation or Terraform: [DESCRIBE RESOURCES]. Define all resources, use parameters for configurable values, and add proper IAM roles with least-privilege permissions.

Infrastructure as Code

Write Kubernetes manifest

Write a Kubernetes manifest for [DESCRIBE SERVICE]. Include Deployment, Service, ConfigMap, and HorizontalPodAutoscaler. Set resource requests and limits based on [DESCRIBE EXPECTED LOAD].

Infrastructure as Code

Set up monitoring

I need to set up monitoring for this infrastructure: [DESCRIBE STACK]. Write the CloudWatch alarms or Prometheus alert rules for CPU, memory, error rate, and latency, with runbook links in the annotations.

Infrastructure as Code

Scripting and Automation

Automate repetitive operations and incident response.

Write bash script

Write a bash script that [DESCRIBE AUTOMATION TASK, E.G. "ROTATES DATABASE PASSWORDS, UPDATES SECRETS MANAGER, AND RESTARTS AFFECTED SERVICES"]. Include error handling, logging, and a dry-run mode.

Scripting and Automation

Automate database migrations

I need to automate database migrations in my deploy pipeline. Write the script that runs migrations with a timeout, rolls back on failure, and sends a notification with the migration log.

Scripting and Automation

Write script

Write a script to clean up [DESCRIBE CLOUD RESOURCES, E.G. "STALE ECR IMAGES OLDER THAN 30 DAYS OR UNTAGGED"]. It should preview what will be deleted before asking for confirmation.

Scripting and Automation

Create on-call runbook

Create an on-call runbook as a shell script for [DESCRIBE INCIDENT, E.G. "HIGH DATABASE CPU"]. It should check key metrics, collect diagnostics, and output a summary to help the on-call engineer triage quickly.

Scripting and Automation

Manage environment variables

I need to manage environment variables across [N] environments. Write a script that reads from a central store ([SECRETS MANAGER/VAULT/OTHER]), validates required keys exist, and syncs them to the deployment platform.

Scripting and Automation

Debugging and Incidents

Diagnose failures and reduce mean time to resolution.

Deployment failed

My deployment failed with this error: [PASTE ERROR LOG]. Walk me through diagnosing this step by step, what each error message means, and the most likely root causes in order of probability.

Debugging and Incidents

Service has high

My service has high latency spikes every [N] hours. Here are the relevant metrics: [DESCRIBE METRICS]. Suggest the most likely causes, what additional data to collect, and how to isolate the root cause.

Debugging and Incidents

Write post-incident review template

Write a post-incident review template for [DESCRIBE INCIDENT]. Include timeline, root cause analysis, contributing factors, impact, immediate fixes, and long-term prevention tasks.

Debugging and Incidents

Roll back this

I need to roll back this deployment quickly: [DESCRIBE DEPLOYMENT]. Write the exact commands to execute the rollback, verify the rollback succeeded, and communicate status to stakeholders.

Debugging and Incidents

Set up distributed

Help me set up distributed tracing for [DESCRIBE MICROSERVICES ARCHITECTURE]. Recommend the tooling, show how to instrument the services, and explain how to trace a slow request across service boundaries.

Debugging and Incidents

Frequently asked questions

Can ChatGPT write GitHub Actions workflows for me?+

Yes. Describe your stack, trigger conditions, and deployment targets and ChatGPT will write a complete workflow file with caching, parallel jobs, and environment-specific deploy steps.

How helpful is ChatGPT for writing Terraform or Kubernetes config?+

Very helpful for standard patterns. Describe the infrastructure you need and ChatGPT will write working Terraform modules or Kubernetes manifests with proper resource limits and IAM policies.

Can ChatGPT help me debug CI pipeline failures?+

Yes. Paste the error log and workflow file and ChatGPT will walk through the failure, explain what each error means, and suggest fixes in order of likelihood.

What cloud providers does ChatGPT know well?+

AWS, GCP, and Azure are all well covered. Specify the provider and service and ChatGPT will use correct resource names, IAM patterns, and CLI commands for that ecosystem.

Can ChatGPT help me write post-incident reviews?+

Yes. Describe the incident timeline and impact and ChatGPT will write a structured blameless post-incident review with root cause analysis, contributing factors, and prevention tasks.

More ChatGPT prompt guides

ChatGPT for WritingChatGPT for CodingChatGPT for MarketingChatGPT for BusinessChatGPT for ResearchChatGPT for Meeting SummariesChatGPT for Resume WritingChatGPT for Email MarketingChatGPT for YouTube ScriptsChatGPT for Job DescriptionsChatGPT for Ad CopyChatGPT for Study GuidesChatGPT for Business PlansChatGPT for Cold EmailsChatGPT for Cover LettersChatGPT for ProductivityChatGPT for Social MediaChatGPT for HealthChatGPT for FinanceChatGPT for TravelChatGPT for StudyingChatGPT for DebuggingChatGPT for Code ReviewChatGPT for Unit TestsChatGPT for SQLChatGPT for Technical WritingChatGPT for Instagram CaptionsChatGPT for LinkedIn PostsChatGPT for Twitter ThreadsChatGPT for TikTok ScriptsChatGPT for Newsletter WritingChatGPT for Data AnalysisChatGPT for PresentationsChatGPT for SEOChatGPT for Content StrategyChatGPT for Blog WritingChatGPT for Product DescriptionsChatGPT for AnalysisChatGPT for Brand VoiceChatGPT for Press Release WritingChatGPT for Podcast ScriptsChatGPT for Product Launch EmailsChatGPT for Win-Back CampaignsChatGPT for Welcome EmailsChatGPT for FreelancersChatGPT for ManagersChatGPT for EntrepreneursChatGPT for ConsultantsChatGPT for SalespeopleChatGPT for TeachersChatGPT for StudentsChatGPT for MarketersChatGPT for RecruitersChatGPT for HR ProfessionalsChatGPT for CopywritingChatGPT for Email WritingChatGPT for Creative WritingChatGPT for Academic WritingChatGPT for ScriptwritingChatGPT for Market ResearchChatGPT for Customer ServiceChatGPT for Project ManagementChatGPT for Competitor AnalysisChatGPT for BrainstormingChatGPT for Sales EmailsChatGPT for InterviewsChatGPT for FeedbackChatGPT for Strategic PlanningChatGPT for NegotiationsChatGPT for LawyersChatGPT for Real EstateChatGPT for Product ManagersChatGPT for ProposalsChatGPT for Executive SummariesChatGPT for Case StudiesChatGPT for White PapersChatGPT for UX WritingChatGPT for GrantsChatGPT for InfluencersChatGPT for PythonChatGPT for JavaScriptChatGPT for Data ScienceChatGPT for AutomationChatGPT for ExcelChatGPT for AccountingChatGPT for OperationsChatGPT for EcommerceChatGPT for StartupsChatGPT for Supply ChainChatGPT for NonprofitChatGPT for EngineeringChatGPT for HealthcareChatGPT for Personal BrandingChatGPT for OnboardingChatGPT for Book WritingChatGPT for EditingChatGPT for GhostwritingChatGPT for Landing PagesChatGPT for Thought LeadershipChatGPT for TypeScriptChatGPT for ReactChatGPT for API DevelopmentChatGPT for DocumentationChatGPT for Customer SuccessChatGPT for Board PresentationsChatGPT for Change ManagementChatGPT for Financial ModelingChatGPT for Training ContentChatGPT for InsuranceChatGPT for HospitalityChatGPT for RetailChatGPT for MediaChatGPT for CybersecurityChatGPT for CoachingChatGPT for Public RelationsChatGPT for WebinarsChatGPT for Affiliate MarketingChatGPT for Event PlanningChatGPT for FitnessChatGPT for RecipesChatGPT for Personal FinanceChatGPT for Language LearningChatGPT for Mental HealthChatGPT for Learning SpanishChatGPT for Learning FrenchChatGPT for Learning GermanChatGPT for Learning JapaneseChatGPT for Learning PortugueseChatGPT for Weight LossChatGPT for ADHDChatGPT for College EssaysChatGPT for Side HustlesChatGPT for Retirement PlanningChatGPT for Learning ItalianChatGPT for Learning KoreanChatGPT for Learning MandarinChatGPT for Learning ArabicChatGPT for Learning HindiChatGPT for PregnancyChatGPT for DivorceChatGPT for GriefChatGPT for New ParentsChatGPT for MovingChatGPT for Making MoneyChatGPT for Passive IncomeChatGPT for FreelancingChatGPT for Starting an Online BusinessChatGPT for Digital ProductsChatGPT for Learning DutchChatGPT for Learning SwedishChatGPT for Learning PolishChatGPT for Learning TurkishChatGPT for Learning VietnameseChatGPT for Wedding PlanningChatGPT for Starting CollegeChatGPT for Job LossChatGPT for Chronic IllnessChatGPT for MenopauseChatGPT for Learning ThaiChatGPT for Learning RussianChatGPT for Learning IndonesianChatGPT for Learning TagalogChatGPT for Learning SwahiliChatGPT for Divorce RecoveryChatGPT for Navigating Empty NestChatGPT for Retirement TransitionChatGPT for Caregiver SupportChatGPT for Adoption JourneyChatGPT for DropshippingChatGPT for Content Creation IncomeChatGPT for Amazon FBAChatGPT for Print on DemandChatGPT for Fiction WritingChatGPT for Social Media MarketingChatGPT for SEO WritingChatGPT for Content MarketingChatGPT for RefactoringChatGPT for Code DocumentationChatGPT for Business PlanningChatGPT for Pitch DecksChatGPT for FundraisingChatGPT for Lesson PlanningChatGPT for TutoringChatGPT for Research PapersChatGPT for Online CoursesChatGPT for Goal SettingChatGPT for Time ManagementChatGPT for JournalingChatGPT for Habit BuildingChatGPT for Weight ManagementChatGPT for Mental WellnessChatGPT for Sleep ImprovementChatGPT for Nutrition PlanningChatGPT for Fitness PlanningChatGPT for Salary NegotiationChatGPT for LinkedIn Profile OptimizationChatGPT for Career Change PlanningChatGPT for Professional NetworkingChatGPT for Promotion StrategyChatGPT for BudgetingChatGPT for Investing as a BeginnerChatGPT for Paying Off DebtChatGPT for Tax PlanningChatGPT for Saving MoneyChatGPT for Novel WritingChatGPT for Character DevelopmentChatGPT for WorldbuildingChatGPT for Poetry WritingChatGPT for Story StructureChatGPT for Homework HelpChatGPT for Essay WritingChatGPT for Exam PreparationChatGPT for Twitter PostsChatGPT for Interview PreparationChatGPT for Welcome Email SequencesChatGPT for Cold Email OutreachChatGPT for Abandoned Cart EmailsChatGPT for Job SearchChatGPT for Meal PlanningChatGPT for Mental Health JournalingChatGPT for InvestingChatGPT for Financial PlanningChatGPT for Personal DevelopmentChatGPT Prompts for PlanningChatGPT Prompts for LegalChatGPT Prompts for OrganizationChatGPT Prompts for Content CreationChatGPT Prompts for TrainingChatGPT for Managing Life TransitionsAI Prompts for Learning NorwegianChatGPT Prompts for Pet Care