sre-gcp
Skill4 starsChanged 23 days agoMITView on GitHub
Use when the system runs on Google Cloud: Cloud Monitoring, Cloud Logging, GKE/Compute/Cloud Run/Cloud SQL status, audit logs, quotas. Viewer roles via gcloud or MCP allowlist; writes need approval.
In this repository84 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/sre-safety-gates.mdcCursor rule
- sre-awsSkill
- sre-azureSkill
- sre-capacity-planningSkill
- sre-change-safetySkill
- sre-chaos-engineeringSkill
- sre-cloud-cost-reviewSkill
- sre-database-triageSkill
- sre-datadogSkill
- sre-dependency-mappingSkill
- sre-diagnosticsSkill
- sre-dr-backup-testSkill
- sre-dynatraceSkill
- sre-emudhra-ca-checkSkill
- sre-engineerSkill
- sre-expiry-auditSkill
- sre-gcpSkill
- sre-incident-commandSkill
- sre-incident-communicationSkill
- sre-k8s-safe-remediationSkill
- sre-k8s-triageSkill
- sre-k8s-upgrade-autopilotSkill
- sre-message-queue-triageSkill
- sre-migration-safetySkill
- sre-observability-cost-cutterSkill
- sre-observability-query-cookbookSkill
- sre-oncall-auditSkill
- sre-oncall-handoffSkill
- sre-pagerduty-opsgenieSkill
- sre-php2shell-checkSkill
- sre-postmortem-templatesSkill
- sre-production-readinessSkill
- sre-prometheus-grafanaSkill
- sre-remediation-actionsSkill
- sre-runbook-templatesSkill
- sre-safety-gatesSkill
- sre-security-incident-triageSkill
- sre-service-mesh-triageSkill
- sre-slo-alertingSkill
- sre-slo-burn-rate-rulesSkill
- sre-terraformSkill
- sre-toil-reviewSkill
- sre-awsSkill
- sre-azureSkill
- sre-capacity-planningSkill
- sre-change-safetySkill
- sre-chaos-engineeringSkill
- sre-cloud-cost-reviewSkill
- sre-database-triageSkill
- sre-datadogSkill
- sre-dependency-mappingSkill
- sre-diagnosticsSkill
- sre-dr-backup-testSkill
- sre-dynatraceSkill
- sre-emudhra-ca-checkSkill
- sre-engineerSkill
- sre-expiry-auditSkill
- sre-incident-commandSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.
- Very specific: line 48
Keep --freshness and --limit on every logging read.
- Distinctive: line 73
If neither the gcloud MCP server nor gcloud is available, output the commands for the human and stop.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Google Cloud
Safety gates (REQUIRED)
- Read-only diagnosis first.
- Propose each change with risk (low/med/high) and reversibility.
- Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.
- Act only as approved, verify, and stop and escalate if anything gets worse.
Full rules: sre-safety-gates. Read-only MCP setup: sre-safety-gates/references/mcp.md.
Process skills: sre-engineer, sre-k8s-triage (GKE), sre-dr-backup-test, sre-capacity-planning, sre-cloud-cost-review, sre-security-incident-triage.
Rules
- Pin the target on every command:
--project=<PROJECT_ID>, plus--region=<REGION>or--zone=<ZONE>where they apply. - Credentials: Application Default Credentials, or
--impersonate-service-account=<VIEWER_SA>@<PROJECT_ID>.iam.gserviceaccount.comwith viewer roles. Never create or download service account keys. - Writes (
create,update,delete,resize,reset,deploy,update-traffic,restore, IAM changes) need approval. Never pass--quieton writes; keep confirmation prompts on. --formatfield paths (e.g.status.conditions,quotas.metric) come from the REST resources; verify them in your environment.
Always first
gcloud config list --format="value(core.account,core.project)"Health and status (read-only)
gcloud container clusters list --project=<PROJECT_ID> --limit=50
# kubectl needs gke-gcloud-auth-plugin for GKE (https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl)
# USER STEP (software install, not run by the agent): gcloud components install gke-gcloud-auth-plugin, or the OS package google-cloud-cli-gke-gcloud-auth-plugin
KUBECONFIG=./kubeconfig-<cluster> gcloud container clusters get-credentials <cluster> --region=<REGION> --project=<PROJECT_ID> # per-incident file; ~/.kube/config untouched
KUBECONFIG=./kubeconfig-<cluster> kubectl config current-context # confirm the context it set
gcloud compute instances list --project=<PROJECT_ID> --filter="status!=RUNNING" --limit=50
gcloud run services describe <svc> --region=<REGION> --project=<PROJECT_ID> --format="yaml(status.conditions,status.traffic)"
gcloud sql instances describe <instance> --project=<PROJECT_ID> --format="value(state)"
gcloud compute instance-groups managed list-instances <mig> --region=<REGION> --project=<PROJECT_ID> --limit=50Logging and monitoring (read-only)
Keep --freshness and --limit on every logging read. --freshness defaults to 1d, works only with descending order, and is ignored if the filter contains a timestamp.
gcloud logging read 'severity>=ERROR AND resource.type="k8s_container" AND resource.labels.namespace_name="<ns>"' --project=<PROJECT_ID> --freshness=30m --limit=50
gcloud logging read 'resource.type="cloud_run_revision" AND httpRequest.status>=500' --project=<PROJECT_ID> --freshness=1h --limit=50
gcloud monitoring policies list --project=<PROJECT_ID> --format="table(displayName,enabled)" --limit=100Common remediations (WRITE — approval required, no --quiet)
| Action | Command | Risk | Reversible |
| Shift Cloud Run traffic to previous revision | gcloud run services update-traffic <svc> --region=<REGION> --project=<PROJECT_ID> --to-revisions=<prev-rev>=100 | low | yes |
| Resize MIG | gcloud compute instance-groups managed resize <mig> --size=<n> --region=<REGION> --project=<PROJECT_ID> | low | yes |
| Resize GKE node pool | gcloud container clusters resize <cluster> --node-pool=<pool> --num-nodes=<n> --region=<REGION> --project=<PROJECT_ID> | med | yes |
Bundled scripts and references
PROJECT_ID=<PROJECT_ID> bash scripts/preflight.sh # always first; stop if it fails
bash scripts/triage-snapshot.sh <PROJECT_ID> <REGION> 1h 50 # read-only bundle; refuses non-read verbs- references/iam-readonly-roles.md · references/logging-queries.md · references/gcloud-mcp.md · references/gcloud-mcp-readonly-allowlist.json (the single maintained allowlist)
If neither the gcloud MCP server nor gcloud is available, output the commands for the human and stop.
Output
- Project confirmed, findings with commands used, proposed actions with risk/reversibility
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

