Role playbook

Platform engineers, DevOps and SRE

Incident copilots on read-only access, runbooks as skills, hooks that stop kubectl delete and terraform apply until a person approves, verified PromQL and LogQL, faster postmortems, and routines that report drift, certificate expiry and cost.

Checked 13 Oct 202619 min read15 prompts1 skill1 hook2 routines

For DevOps engineers, SREs and platform teams who run infrastructure and answer pages

Faster triage and fewer surprises, with every infrastructure change still approved by a person

  • A first triage summary within minutes of a page, built only from read-only queries
  • Runbooks the agent follows step by step, stored as skills next to the code they cover
  • kubectl delete, helm upgrade and terraform apply stopped until a person reads and approves them
  • PromQL and LogQL drafted, then checked against the real backend before anyone trusts them
  • Drift, certificate expiry and weekly cost reports waiting as issues, never as automatic changes
Works withClaude CodeKubernetes MCP serverAWS MCP ServerGoogle Cloud MCP serversGrafana MCP serverPagerDuty MCP serverTerraform MCP server
On this page
  1. Where AI helps in this job
  2. Start in 15 minutes
  3. The tools platform teams use
  4. Members only: Workflow: an incident copilot on read-only access
  5. Members only: Workflow: PromQL and LogQL you can trust
  6. Members only: Workflow: postmortems from the evidence
  7. Members only: Workflow: least-privilege MCP servers for cloud APIs
  8. Members only: A skill for platform engineers
  9. Members only: Guardrails and hooks
  10. Members only: Routines that run without you
  11. Members only: Prompt ladder for platform engineers
  12. Members only: Measure it
  13. Members only: Risks and what not to automate

An agent with shell access can run kubectl, terraform and your cloud CLI faster than you can type. That is useful at 3am and dangerous at any hour. The pattern on this page: give agents read-only access by default, let them collect evidence and draft the fix, and make a person approve every command that changes infrastructure.

Where AI helps in this job#

TaskWhat AI does wellWhat you still own
Incident triageCorrelates the alert, recent deploys, logs and metrics into a first summary in minutesSeverity, the rollback decision and customer communication
QueriesDrafts PromQL, LogQL, KQL and SQL, and explains each functionChecking the result against real data and setting thresholds
RunbooksFollows documented diagnostic steps and collects the evidenceEvery step that changes something
Infrastructure as codeDrafts Terraform, Helm and Kubernetes manifests and reads plans for blast radiusRunning apply, and the blast radius call
PostmortemsBuilds the timeline from chat, alerts and deploy logs, and drafts contributing factorsCauses, action item owners and a blameless tone
Cost reportsGroups spend by service and owner and flags week-over-week jumpsRightsizing, commitments and turning things off
Drift and certificatesSummarizes plan diffs and expiry lists and opens issuesWhich fix goes first
CI/CD pipelinesWrites and debugs workflow YAMLSecrets, permissions and runner security
Toil scriptsWrites one-off scripts and small toolsTesting them before they touch production

Agents are weakest at the things on-call cares about most: they invent metric names, labels and CLI flags that do not exist in your versions, they cannot see state you do not give them, and they confuse time zones in timelines. Logs and alerts can also contain text written by an attacker, and a model may read that text as instructions. Never hand an agent standing write credentials to production, and check every query against the real backend.

Start in 15 minutes#

Paste output into any assistant. Remove tokens, kubeconfig contents and customer data first.

Prompt

Rank the likely causes of an alert

Level 1Any assistant
Here is an alert, the last 50 log lines and the output of kubectl describe pod for the failing pod:
[PASTE]
What are the three most likely causes, in order? For each one, give the single read-only command that would confirm or rule it out.

Good output ranks causes with evidence from what you pasted and suggests only read commands such as get, describe and logs. If its first suggestion is to delete or restart something, ignore it and ask for evidence first.

Prompt

Draft a PromQL query from real metric names

Level 2Any assistant
Use only these metric names and labels, copied from our Prometheus:
[PASTE METRIC NAMES AND LABELS]
Write a PromQL query that shows [WHAT YOU WANT, FOR EXAMPLE THE 5XX ERROR RATIO PER SERVICE OVER 5 MINUTES]. Explain each function in one line, state the unit of the result, and show the shape of the output with one example row.

Good output uses only the names you pasted. Run it in Grafana Explore or the Prometheus UI and compare it with a number you already trust.

Prompt

Read a Terraform plan for blast radius

Level 2Any assistant
Here is the output of terraform plan:
[PASTE]
List every resource that will be destroyed or replaced, and for each one the attribute that forces replacement. Then flag anything that touches state, IAM, networking, DNS or data stores, and estimate the blast radius in one sentence each.

Good output matches the plan's own counts. Check it with grep -E "must be replaced|will be destroyed" on the plan file.

The tools platform teams use#

  • Claude Code runs kubectl, terraform, helm and cloud CLIs through its Bash tool, and adds hooks, skills and permission rules around them. Codex, Copilot CLI and Gemini CLI do the same job with their own permission models.
  • Kubernetes MCP server (containers/kubernetes-mcp-server) gives agents structured cluster access, with a read_only mode and a deny list for resource kinds such as Secrets.
  • AWS MCP Server is AWS's managed remote server, generally available since May 2026. Connected through the MCP Proxy for AWS, its --read-only flag hides tools that can write.
  • Google Cloud MCP servers are managed endpoints such as https://bigquery.googleapis.com/mcp, and an IAM deny policy can block every tool that is not read-only.
  • Grafana MCP server (grafana/mcp-grafana) queries Prometheus and Loki through your data sources and lists incidents. --disable-write removes its write tools.
  • PagerDuty runs a hosted MCP server at https://mcp.pagerduty.com/mcp. It has no built-in tool filter, so connect it through a scoped OAuth client limited to read scopes.
  • Terraform MCP server (hashicorp/terraform-mcp-server) looks up registry providers and modules by default; workspace and run tools are opt-in.

Workflow: an incident copilot on read-only access

Run this when a page fires. The agent gathers evidence, keeps the timeline and drafts updates while the incident commander makes the calls. Set up the read-only access before your next incident, not during it (see the least-privilege workflow below). 1. Start a session with ...

Members only below this line

Get the full Platform engineers, DevOps and SRE playbook free

What you get on this page:

  • 4 step-by-step workflows
  • 12 prompts
  • 1 skill
  • 1 hook
  • 2 routines

Free. You also get Stratiflux Weekly: one email a week, unsubscribe anytime.

Also in the members part

  1. Workflow: PromQL and LogQL you can trust
  2. Workflow: postmortems from the evidence
  3. Workflow: least-privilege MCP servers for cloud APIs
  4. A skill for platform engineers
  5. Guardrails and hooks
  6. Routines that run without you
  7. Prompt ladder for platform engineers
  8. Measure it
  9. Risks and what not to automate

Sources

Checked against these on 13 Oct 2026.

  1. Claude Code hooks reference (opens in a new tab)code.claude.com
  2. Configure permissions (Claude Code) (opens in a new tab)code.claude.com
  3. Extend Claude with skills (opens in a new tab)code.claude.com
  4. Connect Claude Code to tools via MCP (opens in a new tab)code.claude.com
  5. Claude Code GitHub Actions (opens in a new tab)code.claude.com
  6. containers/kubernetes-mcp-server (opens in a new tab)github.com
  7. Setting up the AWS MCP Server (opens in a new tab)docs.aws.amazon.com
  8. Announcing Agent Toolkit for AWS (AWS MCP Server generally available) (opens in a new tab)aws.amazon.com
  9. Identity-based policy examples for AWS MCP Server (opens in a new tab)docs.aws.amazon.com
  10. MCP Proxy for AWS (opens in a new tab)github.com
  11. Google Cloud: prevent read-write MCP tool use (opens in a new tab)docs.cloud.google.com
  12. grafana/mcp-grafana (opens in a new tab)github.com
  13. PagerDuty MCP server (opens in a new tab)support.pagerduty.com
  14. hashicorp/terraform-mcp-server (opens in a new tab)github.com
  15. promtool command line (opens in a new tab)prometheus.io
  16. LogCLI getting started (opens in a new tab)github.com
  17. Kubernetes RBAC: user-facing roles (opens in a new tab)kubernetes.io
  18. terraform plan command (opens in a new tab)developer.hashicorp.com
  19. AWS CLI: ce get-cost-and-usage (opens in a new tab)docs.aws.amazon.com