ChatGPT Prompts for DevOps Engineer: 12 Daily Ops Prompts
12 ChatGPT prompts for DevOps engineers: review CI/CD pipelines, harden workflows, fix Dockerfiles, plan infrastructure changes, and write on-call handoffs.

ChatGPT prompts for DevOps engineer work are most useful when you paste the real config, name your platform, and say what you cannot change. The 12 prompts below cover CI/CD reviews, workflow security, containers, infrastructure changes, and on-call. Remove secrets, account IDs, and internal hostnames first, and test every suggested change on a branch.
CI/CD pipelines
1. Pipeline review
Review this [GitHub Actions or GitLab CI] pipeline [paste, secrets removed]. Give me a findings table with severity, job, issue, risk, and fix, then only the changed lines.
2. Speed up a slow pipeline
This pipeline takes [minutes]. Here is the config [paste] and the step timings [paste]. Suggest caching, job splits, or test sharding, and what to measure before and after.
3. Flaky test triage
These tests fail sometimes in CI but pass locally [paste logs]. List likely causes, such as timing, shared state, or network calls, and the order to check them.
Security and access
4. Workflow hardening
Check this workflow [paste] for untrusted code running with secrets, broad token permissions, unpinned third-party actions, and secrets printed to logs. Explain each risk in one sentence.
5. Replace long-lived cloud keys
We deploy to [cloud] with long-lived keys stored as CI secrets. Outline the steps to switch to short-lived credentials with OIDC on [CI platform], and what to test.
Containers and infrastructure
6. Dockerfile review
Review this Dockerfile [paste] for image size, layer caching, running as root, and pinned base images. Return a multi-stage version and explain each change.
7. Infrastructure change plan
Here is a [Terraform or other IaC] plan output [paste]. Summarize what will be created, changed, or destroyed, flag anything risky, and suggest a safe apply order.
8. Kubernetes manifest check
Check this Kubernetes manifest [paste] for missing resource requests and limits, probes, security context, and labels. Give the corrected YAML.
Incidents and on-call
9. Alert to first steps
This alert fired [paste alert text and recent changes]. List the first five checks in order, with the command or dashboard for each. Do not guess a root cause.
10. Shift handoff note
Turn my on-call notes [paste] into a handoff for the next engineer: open incidents, silenced alerts, pending changes, and what to watch.
11. Postmortem from a timeline
Write a blameless postmortem draft from this timeline [paste]: impact, detection, response, contributing factors, and action items with owners. Mark anything unknown.
Docs and runbooks
12. Runbook from tribal knowledge
Turn these notes on how we [deploy, roll back, rotate certificates] [paste] into a step-by-step runbook with checks after each step and a rollback section.
Review and fix a pipeline in one prompt
The flagship DevOps Engineer Prompt: CI/CD Pipeline Review and Fix Plan takes your pipeline file, platform, goals, deploy auth, branch rules, pain points, and constraints. It returns a pipeline summary, a findings table, constraint conflicts, a patched config, speed fixes, a rollout plan, and follow-ups. Its example fixes a GitHub Actions workflow that ran fork code with AWS keys, printed a secret, and deployed on every pull request.
Tips for safer DevOps answers
Name your CI platform, runner type, and tool versions so suggestions match what you run. Treat any action, flag, or feature you do not recognize as unverified until you find it in the official docs. Keep changes small, test them on a branch, and always have a rollback ready.
Related prompts
Go deeper with the GitHub Actions security hardening reviewer and the GitHub Actions OIDC to AWS deploy role planner. For containers, use the multi-stage Dockerfile prompt, and for on-call try the on-call shift handoff note writer. Developers can also see ChatGPT prompts for software engineers.
More coding help: ChatGPT prompts for debugging and the system prompt for a coding agent.
Find more in the Coding category, look through Browse, or post your own on Share.