These DevOps prompts help you set up CI/CD pipelines, write Dockerfiles and Kubernetes configs, deploy to the cloud, manage infrastructure as code, monitor systems, handle incidents and reduce costs.
20 prompts on this page. Last updated: 4 December 2026. Written and tested by Saad Raza.
How to use these prompts
- Click Copy on any prompt.
- Paste it into ChatGPT, Claude, Gemini, Copilot or Perplexity.
- Replace everything in [square brackets] with your own details. The more specific you are, the better the answer.
- Read and edit the result before you use it. Add your own experience and check every fact, name and number.
Never paste real secrets, keys or production credentials into an AI tool. Review generated infrastructure code carefully, apply it to a test environment first, and check security settings such as open ports and public storage.
CI/CD
1. Write a CI pipeline
Write a [GitHub Actions, GitLab CI or other] pipeline for a [language] project that installs dependencies, caches them, lints, runs tests and builds on every pull request.
2. Write a deployment pipeline
Write a pipeline that deploys [application] to [environment] on merge to main, with a manual approval step for production and a rollback option.
3. Speed up a slow pipeline
Our pipeline takes [time]: [paste config]. Suggest caching, parallel jobs and other changes to speed it up.
Containers
4. Write a Dockerfile
Write a production Dockerfile for a [language and framework] app using a multi-stage build, a small base image, a non-root user and good layer caching.
5. Write a docker-compose file
Write a docker-compose file for local development with [app, database, cache and other services], with volumes and environment variables.
6. Write Kubernetes manifests
Write Kubernetes manifests for [app]: deployment, service, ingress, config map, secrets references, resource limits, probes and autoscaling.
7. Debug a container problem
My container [crashes, cannot connect or runs out of memory]: [paste logs and config]. Find the cause and the fix.
Cloud and infrastructure
8. Write infrastructure as code
Write [Terraform or another tool] code to create [resources] on [cloud provider], with variables, outputs and secure defaults.
9. Choose hosting
Compare hosting options for [application with expected traffic and budget]: shared hosting, VPS, managed platforms, containers and serverless.
10. Set up a VPS securely
List the steps to set up and harden a new Linux VPS for hosting [app]: users, SSH keys, firewall, updates, fail2ban, HTTPS and backups.
11. Configure Nginx
Write an Nginx config for [site or app] with HTTPS, HTTP/2, gzip or brotli, caching headers, redirects and a reverse proxy to [port].
12. Reduce cloud costs
Here is our cloud bill breakdown: [paste]. Suggest ways to cut costs, such as rightsizing, reserved capacity, storage tiers and shutting down unused resources.
Monitoring and incidents
13. Set up monitoring
Plan monitoring for [system]: key metrics, logs, traces, dashboards and alerts with thresholds, using [tools].
14. Write alert rules
Write alert rules for high error rate, slow response time, high CPU and low disk space, avoiding noisy alerts.
15. Write an incident response plan
Write an incident response process for a small team: severity levels, who responds, communication, status page updates and postmortems.
16. Analyse an outage
Here is the timeline and logs of an outage: [paste]. Identify the root cause, contributing factors and preventive actions.
Practices
17. Plan a branching strategy
Compare trunk-based development and Git Flow for our team of [size] releasing [frequency], and recommend one.
18. Manage secrets
Explain how to manage secrets for [stack] using [tool], and how to rotate them without downtime.
19. Plan backups and disaster recovery
Plan backups and disaster recovery for [system] with recovery time and recovery point objectives, and how to test restores.
Extra
20. Write a release checklist
Write a production release checklist for [application]: change review, database migrations, feature flags, monitoring, communication and rollback steps.
What are DevOps prompts?
DevOps prompts help you write CI/CD pipelines, Dockerfiles, docker-compose files and Kubernetes manifests, manage infrastructure as code with Terraform, harden servers, configure Nginx, reduce cloud costs, set up monitoring and alerts, and handle incidents and releases.
How to write better DevOps prompts
- Never share secrets: remove keys and credentials before pasting configs.
- Start in a test environment: apply generated infrastructure code safely.
- Use secure defaults: non-root containers, least privilege and closed ports.
- Automate the boring parts: tests, builds and deployments on every change.
Best AI tools to use with these prompts
Use ChatGPT or Claude to write configs, GitHub Actions or GitLab CI for pipelines, Docker and Kubernetes for containers, Terraform for infrastructure, and Grafana, Prometheus or a cloud monitoring service for observability.
Frequently asked questions
Can AI write Dockerfiles and CI pipelines?
Yes. AI writes good starting configurations. Review them for security, test them in a non-production environment and adapt them to your setup.
What is CI/CD?
Continuous integration automatically builds and tests code on every change. Continuous delivery or deployment automatically prepares or releases that code to environments.
Is it safe to share configs with AI?
Share configs only after removing secrets, keys, internal hostnames and any customer data.
Can AI write CI/CD pipelines?
Yes. AI writes good starting pipelines for common stacks. Review and test them, and keep secrets in your CI platform’s secret store.
What is infrastructure as code?
Managing servers and cloud resources through code files, such as Terraform, so changes are repeatable, reviewed and version controlled.
More software development prompts
- Code Generation PromptsWrite functions, classes, scripts and boilerplate.
- Debugging PromptsFind and fix bugs, errors and performance problems.
- Code Review and Refactoring PromptsReview, clean up and improve existing code.
- Software Testing PromptsUnit, integration and end-to-end tests.
- Technical Documentation PromptsREADMEs, API docs, comments and guides.
- SQL and Database PromptsQueries, schema design, indexes and optimisation.
- API Development PromptsDesign, build, secure and document APIs.
- System Design and Architecture PromptsArchitecture, scaling, trade-offs and design reviews.
Back to all software development prompts or the full prompt library, including SEO prompts.
Fast, reliable hosting is also an SEO advantage. Request a free audit and I will show you what to fix first.
Request received
Thank you! Saad will contact you within the next 24 hours.
Keep an eye on your phone and inbox.
