gcloud
/gcloud
Obsługuje Google Cloud przez gcloud, gsutil i bq: maszyny Compute Engine, Identity-Aware Proxy, Secret Manager, Cloud Run, Artifact Registry, Cloud NAT i firewall, wdrożenia z konta usługowego.
- Autor
- dreamlab-ai ↗
- Repozytorium
- agentbox ↗
- Licencja
- AGPL-3.0
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.
Co robi i kiedy
Obsługuje Google Cloud przez gcloud, gsutil i bq: maszyny Compute Engine, Identity-Aware Proxy, Secret Manager, Cloud Run, Artifact Registry, Cloud NAT i firewall, wdrożenia z konta usługowego.
Oryginalny opis (EN)
Google Cloud CLI (gcloud/gsutil/bq) for GCP operations from agentbox: Compute Engine VMs, Identity-Aware Proxy (IAP), Secret Manager, Cloud Run, Artifact Registry, Cloud NAT/firewall. Use when a task involves deploying to or operating Google Cloud — standing up a VM behind IAP, granting/impersonating a deploy service account, managing GCP secrets, or the the target repository VPS deployment. Installed via the nix flake (basePackages); auth is interactive (operator-run) and creds live in the writable ~/.config/gcloud.
Jak działa
- Environment constraints (read first)
- The canonical deployment — the target repository
- Common operations
- Execution contract for agents
- Notes
Podgląd SKILL.md
---
name: "gcloud"
description: "Google Cloud CLI (gcloud/gsutil/bq) for GCP operations from agentbox: Compute Engine VMs, Identity-Aware Proxy (IAP), Secret Manager, Cloud Run, Artifact Registry, Cloud NAT/firewall. Use when a task involves deploying to or operating Google Cloud — standing up a VM behind IAP, granting/impersonating a deploy service account, managing GCP secrets, or the the target repository VPS deployment. Installed via the nix flake (basePackages); auth is interactive (operator-run) and creds live in the writable ~/.config/gcloud."
---
# gcloud — Google Cloud CLI in agentbox
The `google-cloud-sdk` (gcloud, gsutil, bq) is provisioned in the nix image
(`flake.nix` → `basePackages`), so `gcloud` is on `$PATH` in every shell. This skill
covers using it correctly **in this container's constraints** and the canonical GCP
deployment (the `the target repository` VPS behind IAP).
## Environment constraints (read first)
- **`/home/devuser` is READ-ONLY.** Only `~/workspace` and `~/.config` are writable.
gcloud's config/credential dir defaults to `~/.config/gcloud` — writable, so
`gcloud auth login` and `gcloud config` work with no override.
- **Auth is INTERACTIVE and operator-run.** An agent cannot complete `gcloud auth login`
(it opens a browser/entered code). Ask the operator to run it in the session with the
`!` prefix:
```
! gcloud auth login
! gcloud config set project <PROJECT_ID>
```
After that, the agent's own `gcloud` calls reuse the stored credentials.
- **Prefer impersonation over downloaded keys.** Do not create/handle JSON service-account
key files. Use a deploy service account the operator can impersonate:
```
gcloud <cmd> --impersonate-service-account="<sa>@<project>.iam.gserviceaccount.com"
```
Verify access with:
```
gcloud auth print-access-token --impersonate-service-account="<sa>@<project>…"
```
- **Never commit credentials.** `~/.config/gcloud`, access tokens, and any key material
stay out of git. Application-default creds and tokens are runtime-only.
## The canonical deployment — `the target repository`
- **Project:** `the target repository-503809` · **Deploy SA (impersonate):**
`the target repository-deployer@the target repository-503809.iam.gserviceaccount.com`
- **Identity connector:** the app validates Google **IAP** (`gcp-iap` auth mode) — a
signed `X-Goog-IAP-JWT-Assertion` verified against Google's fixed JWKS. The deployment
puts the pod behind an IAP-gated external HTTPS load balancer.
- **Full runbook:** the `the target repository` repo's `docs/runbooks/gcp-vps-deploy.md` — 10
idempotent phases (VPC + Cloud NAT egress, IAP-range firewall `130.211.0.0/22` +
`35.191.0.0/16`, GCE `e2-standard-2/4` with no external IP, Secret Manager for
DB/cookie/model secrets, HTTPS LB + managed cert, IAP enable → derive the audience →
feed `CAMPAIGNBUILDER_AUTH_AUD`, e2e verify, snapshot backups).
- **Least-privilege grant to ask the project owner for** (impersonation, not a key):
`roles/compute.admin`, `roles/iam.serviceAccountAdmin` + `roles/iam.serviceAccountUser`,
`roles/secretmanager.admin`, `roles/serviceusage.serviceUsageAdmin`, and `roles/iap.admin`
for the full IAP path — all at **project scope**, no `projectIamAdmin`.
## Common operations
```bash
# Identity / project
gcloud auth list # who am I
gcloud config get-value project
gcloud projects describe <PROJECT_ID> --format='value(projectNumber)'
# Enable APIs (idempotent)
gcloud services enable compute.googleapis.com iap.googleapis.com secretmanager.googleapis.com
# Compute Engine (check-before-create pattern — describe, then create)
gcloud compute instances describe <VM> --zone=<ZONE> --format='value(status)' \
|| gcloud compute instances create <VM> --zone=<ZONE> --machine-type=e2-standard-2 --no-address …
# Secret Manager (values via stdin — never a file on disk)
printf '%s' "$(openssl rand -base64 32)" | gcloud secrets create <name> --data-file=-
gcloud secrets versions access latest --secret=<name>
# IAP-brokered SSH (Google IAM, not host SSH) — this is authorised from agentbox
gcloud compute ssh <VM> --zone=<ZONE> --tunnel-through-iap --command '…'
# Derive the IAP audience for the app's gcp-iap auth mode
PN=$(gcloud projects describe <PROJECT_ID> --format='value(projectNumber)')
BID=$(gcloud compute backend-services describe <BACKEND> --global --format='value(id)')
echo "/projects/${PN}/global/backendServices/${BID}" # → CAMPAIGNBUILDER_AUTH_AUD
```
## Execution contract for agents
1. **Check before create** — every step is idempotent (`describe` then `create`).
2. **Stop on failure** — a half-built LB/firewall is worse than none; surface it.
3. **Resolve values, don't guess** — the IAP audience is *derived* from the backend
service, never hard-coded.
4. **Secrets never to disk or git** — stdin into Secret Manager; tokens are runtime-only.
5. **Surface interactive steps to the operator** — `gcloud auth login`, OAuth consent, and
the IAP brand are operator actions; provide the exact `! gcloud …` line.
## Notes
- Installed via `flake.nix` `basePackages` (`pkgs.google-cloud-sdk`) — persistent across
rebuilds. (A prior userland bundle in `~/workspace/.tools` predates this; the nix
package supersedes it once rebuilt.)
- Not an MCP server — this is a CLI skill (progressive disclosure): the front-matter
description is the discovery surface; this body is the on-demand detail.
- Related: the `the target repository` repo (the app + the runbook), and the pod's `gcp-iap`
connector in `control-plane/src/auth/verify.ts`.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · dreamlab-ai/agentbox | 100 | AGPL-3.0 |
| google/skills | 100 | Apache-2.0 |
| TerminalSkills/skills | 100 | Apache-2.0 |
| rittmananalytics/wire-plugin | 100 | Apache-2.0 |
| hamzabellouch/agent-skills | 100 | MIT |
| G1Joshi/Agent-Skills | 100 | MIT |
| glapsfun/cnative-skills | 100 | MIT |
| builderio/agent-native | 90 | MIT |
Migawka bazy z 28.10.2026 · wersja paczki 1f8027148ba3 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100gcloud-setup
Instaluje i uwierzytelnia Google Cloud CLI (gcloud, gsutil, bq) na macOS, dodaje zakresy OAuth dla API Google i naprawia problemy z Application Default Credentials. - 100gcloud-usage
Pomaga w pracy z logami GCloud, zapytaniami Cloud Logging, metrykami Google Cloud, obserwowalnością GCP, analizą śladów i debugowaniem problemów produkcyjnych. - 100cloud-vms
Zarządza maszynami wirtualnymi w AWS EC2, Azure VMs i Google Compute Engine: cykl życia instancji, CLI, dyski, sieci, monitoring, zdalne wykonywanie poleceń i obrazy. - 100gcloud-cli-health-check
Sprawdza kondycję Google Cloud CLI: instalację, uwierzytelnienie, aktywny projekt, region, włączone API, token dostępu, rozliczenia, wiązania IAM, konta usługowe i usługi Cloud Run w projektach głównym i dodatkowym. - 100cloud-storage
Zarządza obiektami w Google Cloud Storage: tworzenie bucketów, IAM, jednolita kontrola dostępu, polityki cyklu życia, signed URL i polecenia gsutil i gcloud, domyślnie prywatnie i bez publicznych bucketów bez wyraźnej zgody. - 100gcp-secret-manager
Zabezpiecza sekrety w Google Cloud Secret Manager: polityki IAM, integracja z GKE i zarządzanie wersjami sekretów.