agentleFS
ruh-airuh-ai/openclaw-ruh/.claude/skills/gcp-server/SKILL.md

gcp-server

Skill4 starsChanged 8 months agoApache-2.0View on GitHub

Manage the production GCP infrastructure for openclaw-ruh-enterprise. SSH into VMs, check resource usage (CPU, RAM, disk), view Docker containers, read logs, restart services, clean up disk, and run server maintenance. Use when asked to "check the server", "server health", "disk usage", "restart backend", "clean docker", "server logs", "SSH into prod", or any production infrastructure task.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When checking server health, flag these conditions:

    line 172

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/gcp-server — Production Server Management

Manage the GCP production infrastructure for openclaw-ruh-enterprise. All commands run via gcloud compute ssh — no manual SSH config needed.


GCP Access Details

FieldValue
GCP Projectruhai-469019
Zoneus-central1-a
Domaincodezero2pi.com

Instances

InstanceTypeIPDiskRole
ruh-demoe2-standard-4 (4 vCPU, 16 GB RAM)34.31.176.40100 GBProduction — all services
instance-20260303-223502e2-medium (2 vCPU, 4 GB RAM)34.60.196.24210 GBSecondary/staging

Services on ruh-demo

SubdomainServiceContainer
api.codezero2pi.comruh-backendruh-backend-1
builder.codezero2pi.comagent-builder-uiruh-agent-builder-ui-1
app.codezero2pi.comruh-frontendruh-frontend-1
admin.codezero2pi.comadmin-uiruh-admin-ui-1
—PostgreSQLruh-postgres-1
—Nginx (SSL proxy)ruh-nginx-1
—Certbot (auto-renew)ruh-certbot-1
—Agent sandboxesopenclaw-<uuid>

SSH Pattern

Always use this pattern to run commands on the server:

gcloud compute ssh ruh-demo \
  --project=ruhai-469019 \
  --zone=us-central1-a \
  --command="<command>"

For commands requiring Docker access, prefix with sudo:

gcloud compute ssh ruh-demo \
  --project=ruhai-469019 \
  --zone=us-central1-a \
  --command="sudo docker ps"

For interactive sessions (rarely needed — prefer --command):

gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a

Common Operations

Health Check (quick)

gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="echo '=== UPTIME ===' && uptime && echo '=== MEMORY ===' && free -h && echo '=== DISK ===' && df -h / && echo '=== CONTAINERS ===' && sudo docker ps --format 'table {{.Names}}\t{{.Status}}'"

Full Resource Report

gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="free -h && echo '---' && df -h / && echo '---' && sudo docker system df && echo '---' && sudo docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Size}}' && echo '---' && ps aux --sort=-%mem | head -15"

Service Logs

# Backend logs (last 100 lines)
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="cd /opt/ruh && sudo docker compose -f deploy/docker-compose.prod.yml logs --tail=100 backend"

# Any service: replace 'backend' with: agent-builder-ui, frontend, admin-ui, nginx, postgres
# Sandbox logs:
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="sudo docker logs --tail=100 openclaw-<uuid>"

Restart a Service

# Single service
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="cd /opt/ruh && sudo docker compose -f deploy/docker-compose.prod.yml restart backend"

# Full stack
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="cd /opt/ruh && sudo docker compose -f deploy/docker-compose.prod.yml up -d"

Docker Cleanup

# Prune build cache (safe — reclaims stale build layers)
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="sudo docker builder prune -f"

# Remove unused images (only images not used by any container)
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="sudo docker image prune -f"

# Full system prune (removes all unused images, networks, build cache — ASK USER FIRST)
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="sudo docker system prune -af"

Database Access

gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="sudo docker exec ruh-postgres-1 psql -U openclaw -d openclaw -c '<SQL>'"

Sandbox Management

# List sandbox containers
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="sudo docker ps --filter 'name=openclaw-' --format 'table {{.Names}}\t{{.Status}}\t{{.Size}}'"

# Check gateway status inside a sandbox
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="sudo docker exec openclaw-<uuid> openclaw gateway status"

Deploy

gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
  --command="cd /opt/ruh && bash deploy/deploy.sh"

Thresholds & Alerts

When checking server health, flag these conditions:

MetricWarningCritical
Disk usage> 70%> 85%
RAM usage> 75%> 90%
Load average> 4.0 (= vCPU count)> 8.0
Container statusAny "unhealthy"Any "Exited" or missing
Docker build cache> 20 GB> 40 GB

Safety Rules

  • Never run docker system prune without asking the user first — it removes all unused images.
  • Never restart postgres without confirming — it interrupts all active connections.
  • Never run deploy.sh without user confirmation — it resets to origin/dev and rebuilds everything.
  • Read-only commands (health, logs, ps, df, free) are always safe to run.
  • Prefer targeted restarts (single service) over full stack restarts.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.