A reliable ChatGPT prompt names who is answering, what they can see, the task, the format, and what they must not invent. Below: that structure, then 25 DevOps patterns.
The five-part prompt
ChatGPT has no form with these five fields. You type them. A compact version:
Role: You are a senior DevOps engineer. Prefer small, reversible changes.
Context: Kubernetes 1.31. The Deployment and the error are below.
Task: Explain why the pod is not Ready and list the next command to run.
Format: Cause, then one kubectl command, then what success looks like.
Constraints: Do not invent resource names. If a field is missing, say so.
Paste the artifact after the spec, inside a fence, so instructions stay separate from the file. One job per message. A Dockerfile review, tests, and a Compose conversion are three prompts. Start with pattern 3 below.
Custom instructions, memory, and Projects
These three features stack. They are not the same store.
| Feature | Who writes it | Where it applies | What to put there |
|---|---|---|---|
| Custom instructions | You, in settings | All chats, as soon as you save | Tone, stack, and standing rules |
| Memory | ChatGPT, from chats and other sources | Chats where memory is enabled | Facts you would rather not retype |
| Project instructions | You, in that project | Only chats inside the project | Team conventions that must beat your global instructions |
Custom instructions. Web and desktop: Settings, Personalization, Enable customization, then the Custom Instructions field. iOS and Android: Settings, Customize ChatGPT, same toggle. Edits apply to existing chats. Shared-link viewers do not get your instructions. A third-party plugin may receive relevant instruction text. Clear the field when you turn customization off if you do not want the text left there.
Memory. With Memory enabled, ChatGPT may use past chats, saved memories, custom instructions, Library files, and connected apps such as Gmail. Which sources exist depends on plan and region. If a control is missing, that account does not have it yet. Memory keeps what it judges relevant, not the full transcript. A Sources line under a reply can open the source, correct or delete a saved memory, delete a referenced chat, or mark a source as not relevant. Shared links omit those sources.
If you see separate switches, enable Reference saved memories and Reference chat history. Enterprise also needs memory allowed in workspace settings. Temporary chats do not create or update memories.
Projects. Sidebar, New project, then a name, icon, and color. Add PDFs, spreadsheets, docs, images, or pasted text. Open •••, then Project settings, and write project instructions. Those replace your global custom instructions inside that project.
As of October 2026 you can create unlimited projects. File caps on the Projects help page that month: 5 on Free, 25 on Go and Plus, 40 on Edu, Pro, Business, and Enterprise, and only 10 files per upload. A shared project is locked to project-only memory: no access to a member’s outside memories or chats, and no switch back to default memory. A private project can use either setting; a change can take a few hours. Project-only memory ignores saved memories and outside chats, and ChatGPT Work is unavailable there.
A chat started with a GPT cannot move into a project. For a reusable assistant with files and an API, use a custom GPT. A GPT does not use your memory, custom instructions, or earlier chats.
Shortcuts that exist
Website. In a ChatGPT conversation on the web, type @ to bring a GPT into the current chat. The next message goes to that GPT and the thread keeps its context. The iOS and Android apps do not offer this; open the GPT from the GPTs menu there.
Desktop app. In the composer, type / and pick a command, or filter (/status). The desktop reference says the list depends on environment and access. Documented commands include:
| Command | What it does |
|---|---|
/model |
Pick the model for this chat |
/reasoning |
Set reasoning effort for this chat |
/status |
Show chat id, context usage, and rate limits |
/plan |
Toggle plan mode before a multi-step task |
/goal |
Set a persistent goal; shape it with /plan first |
/memories |
Control whether this chat can use or create memories, when Memories is available |
/project |
Choose a project for new chats |
/compact |
Compact the current chat’s context |
/mcp |
Open MCP status for connected servers |
/review |
Review uncommitted changes or compare a base branch |
Type $ to invoke a skill. Custom prompts appear as /prompts: entries. /cloud, /worktree, /init, /fork, and /local appear only in the environment that supports them. /init scaffolds AGENTS.md for Codex, which is not ChatGPT custom instructions. This / list is the desktop app, not the website.
25 patterns
| # | Pattern | Prompt |
|---|---|---|
| 1 | Explain code | Reviewer. <language> function below. Explain it, then inputs that break it. One paragraph, then bullets. Do not rewrite it. |
| 2 | Write tests | Test author. Function plus runner (pytest, go test, or jest). Tests for branches you can see. One runnable file. No production code. Mark untested branches. |
| 3 | Review a Dockerfile | Container reviewer. Docker Engine 27, Dockerfile below. Flag cache busts, root, secrets in layers, missing health check. Table: line, issue, fix. No packages that are not in the file. |
| 4 | Draft a runbook | On-call. Service <name>, the alert, last good deploy. First 15 minutes: detect, mitigate, verify, escalate. Commands must be copy-pasteable and must not delete data. |
| 5 | Compose to Kubernetes | Platform engineer. Compose file below. Map services to Deployments, Services, and ConfigMaps. YAML, then gaps (secrets, volumes, health). Keep names. No Helm. See the Compose cheat sheet. |
| 6 | Commit message | Commit author. Diff below. Subject under 72 characters and a body that says why. Conventional Commits. No files that are not in the diff. |
| 7 | Summarize logs | Incident reader. Logs from <window>. Group repeats, name the first error, quote the line. Timeline, then three bullets. No cause the log does not show. |
| 8 | Explain a kubectl error | Cluster operator. Command and full error. What Kubernetes rejected, then one read-only command and the expected output. get and describe only. Commands: kubectl cheat sheet. |
| 9 | Review probes | SRE. Container port and probe block. Check path, port, initialDelaySeconds, and whether the probe calls a dependency. Pass or a replacement snippet. Do not use liveness for a downstream outage. |
| 10 | Requests and limits | Capacity reviewer. Resources block and runtime. What happens if memory is exceeded, and what to measure first. Risk, metric, change. No number you cannot justify from the paste. |
| 11 | Review a workflow | CI reviewer. GitHub Actions or GitLab file. Secrets in logs, missing permissions, deploy steps with no manual gate. Finding, line, safer step. Do not rewrite the pipeline. |
| 12 | Diff two configs | Change reviewer. File A and file B. Keys that differ and which side is live. Table: key, A, B, risk. Ignore comments and key order. |
| 13 | Rollback plan | Release owner. Current revision and the previous one. Rollback steps and the check that proves it worked. Include a stop if the rollback fails. |
| 14 | Helm values | Helm 3 user. values.yaml and the template snippet. Which values the template reads: used, unused, unsafe. Do not assume a subchart you cannot see. |
| 15 | Slim an image | Image reviewer. Dockerfile, plus size if you have docker image ls. A smaller final stage: what to remove, and why the app still starts. Do not drop an imported library. |
| 16 | Safer shell | Shell reviewer. Script below. Unquoted variables, missing set -euo pipefail, destructive commands. Line, issue, replacement. Keep behavior unless you flag the change. |
| 17 | Incident timeline | Scribe. Notes and alerts below. Order events in UTC. Table: time, event, source. Mark gaps as unknown. |
| 18 | Status update | Incident lead. Timeline from pattern 17. Five sentences for people off the bridge: impact, state, next update time. No blame. No internal hostnames. |
| 19 | Postmortem outline | Facilitator. Timeline and mitigation. Headings only: summary, impact, detection, cause, what worked, actions. Questions the team still must answer. Unknown if it is not in the notes. |
| 20 | PR summary | Reviewer. Diff and PR title. What changed, remaining risk, missing test. Three short sections. Do not approve the PR. |
| 21 | Pre-apply checklist | Change manager. Manifest and namespace. Read-only checks before kubectl apply. Checkboxes, including a diff against live and a rollback command. Do not tell me to apply. |
| 22 | NetworkPolicy review | Network reviewer. Policy and pod labels. What traffic remains allowed: ingress, egress, gap. Say if a selector matches nothing. |
| 23 | Alert to first response | On-call. Alert name, threshold, sample series. First three checks and the page-someone condition. No config change in those three checks. |
| 24 | Explain an exit code | Runtime debugger. Exit code, last 50 log lines, start command. Class of failure (app error, signal, or OOM), the evidence, and the next command. OOM only if the log or status says so. |
| 25 | Force the format | Formatter. Draft below. Return only <YAML, JSON, or table>. No preamble. If you cannot, return FORMAT_BLOCKED and the missing field. |
Mistakes that waste the reply
- No artifact. “Act as an SRE” without the manifest is generic. Paste the object.
- Memory as a spec. A port, a cluster name, or “never delete a PVC” belongs in project instructions. Memory can drop details.
- Secrets. Tokens, kubeconfigs, and
.envfiles do not belong in chat, custom instructions, or project files. - Unread commands. Ask for the command and the expected output. Run the read-only form yourself. An agent that can apply it needs an approval step: agentic AI.
- GPTs ignore your custom instructions. Repeat the rules in the GPT. Build steps: custom GPTs guide.
Patterns you’ll reuse
- “If a required fact is missing, list it under Unknown. Do not fill it in.”
- “Show YAML only. Put assumptions after a
# ASSUMPTIONScomment.” - “Give me the read-only command first. Stop.”
- “Quote the log line, then interpret it.”
- “Use only names that appear in the project files.”
FAQ
How do I write a ChatGPT prompt that stays useful for DevOps work?
Name the role, paste the real context (file, error, or constraint), state one task, and lock the output format. Add what the model must not invent, such as cluster names, image tags, or commands you have not approved.
Does ChatGPT remember previous chats?
When Memory is on, ChatGPT can reuse details it judges relevant from past chats, saved memories, custom instructions, Library files, and some connected apps. It does not keep every line of every conversation. Availability depends on plan, region, platform, and workspace settings.
What is the difference between custom instructions and memory?
Custom instructions are text you write and edit yourself. They apply across chats while customization is enabled. Memory is information ChatGPT selects from conversations and other sources. For a rule you always want, put it in custom instructions or in a project’s instructions.
Do slash commands work in the ChatGPT website?
The documented slash commands are for the ChatGPT desktop app composer: type / and pick a command. Which commands appear depends on your environment and access. On the website, type @ in a chat to send the next message to a GPT you can access. That @ flow is not in the iOS or Android apps.
Should I put secrets in a ChatGPT prompt or in custom instructions?
No. Custom instructions can be supplied to third-party plugins you enable, and a prompt that includes a token, kubeconfig, or private key leaves that secret in the conversation. Paste redacted logs and refer to secret names, not values.
How this guide was verified
Written by hand from the official documentation, every command re-checked, and reviewed a second time before publishing. Last reviewed on .
Official sources read for this article

