src/skills/using-cloud-cli/SKILL.md
Cloud CLI patterns for GCP and AWS. Use when running bq queries, gcloud commands, aws commands, or making decisions about cloud services. Covers BigQuery cost optimization and operational best practices. NOT for Terraform or Kubernetes architectural decisions (see managing-infra).
npx skillsauth add alexei-led/claude-code-config using-cloud-cliInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Credentials may be pre-configured. Verify identity before touching resources. Use --help or Context7 for syntax.
Before destructive commands (delete, destroy, rm, terminate, IAM changes, bucket/object deletion):
Do not present executable delete commands as the next action until identity and candidate resources have been shown and the user has explicitly confirmed the exact resources. A safe answer may show inventory/dry-run commands first, then say deletion commands come only after confirmation.
aws sts get-caller-identity plus explicit --profile and --region when relevant.gcloud config get-value account and gcloud config get-value project, or pass explicit --project.--quiet, default profiles, or implicit projects for destructive work.# Always estimate cost first
bq query --dry_run --use_legacy_sql=false 'SELECT ...'
# Run query
bq query --use_legacy_sql=false --format=json 'SELECT ...'
# List tables
bq ls project:dataset
# Get table schema
bq show --schema --format=json project:dataset.table
Cost awareness: Charged per bytes scanned. Use --dry_run, partition tables, specify columns.
# List resources
gcloud compute instances list --format=json
# Describe resource
gcloud compute instances describe INSTANCE --zone=ZONE --format=json
# Create with explicit project
gcloud compute instances create NAME --project=PROJECT --zone=ZONE
# Destructive: confirm active account/project first, then ask the user
gcloud config get-value account
gcloud config get-value project
gcloud compute instances delete NAME --project=PROJECT --zone=ZONE
# List resources
aws ec2 describe-instances --output json
# With JMESPath filtering
aws ec2 describe-instances --query 'Reservations[].Instances[].InstanceId' --output text
# Explicit region
aws s3 ls s3://bucket --region us-west-2
# Dry run where available
aws ec2 run-instances --dry-run ...
Auth failures, rate limiting, common error patterns, and a retry-with-backoff
template are vendor-specific. For GCP, read references/GCP.md ## Error Handling. For AWS, read references/AWS.md ## Error Handling.
CLOUD CLI COMPLETE
==================
Provider: GCP | AWS
Identity: <account/profile> · <project/region>
Status: DONE | ABORTED | NEEDS CONFIRMATION
Commands run:
- <command> — result summary
Cost (if BigQuery): <bytes scanned / dry-run estimate>
Next:
- <follow-up command, or none>
For destructive work not yet confirmed, status is NEEDS CONFIRMATION — show identity, candidate resources, and the exact command; do not present an executable delete as the next action.
tools
Idiomatic shell development for POSIX sh, Bash, Zsh, Fish, hooks, CI shell steps, and scriptable CLI glue. Use when writing or changing `.sh`, `.bash`, `.zsh`, `.fish`, `.bats`, shell functions, shell pipelines, or command-runner recipes. Emphasizes portability, quoting, safe filesystem/process handling, non-TUI CLI tools, ShellCheck, shfmt, Bats, and ShellSpec. NOT for Python, TypeScript, Go, web code, or infrastructure operations.
tools
Use when planning, executing, checkpointing, finishing, or inspecting lightweight spec-driven work. Runs one task at a time using `.spec/` markdown files and the bundled `specctl` helper. NOT for broad product discovery beyond a short requirement interview.
testing
Author, inspect, troubleshoot, and review infrastructure across IaC, Kubernetes, cloud resources, containers, CI/CD, and Linux hosts. Use when changing Terraform/OpenTofu, Kubernetes, Helm, Kustomize, Dockerfiles, GitHub Actions, AWS, GCP, Cloud Run, BigQuery, IAM, logs, instances, or service health. NOT for deploy/apply/rollback workflows (see deploying-infra). NOT for shell scripts or generic command pipelines (see writing-shell).
development
Configure safe git workflow hygiene: pre-commit/pre-push hooks, Gitleaks secret scanning, .gitignore rules, local git config, and guardrails. Use when setting up git hooks, gitleaks/git leaks, staged pre-commit checks, pre-push validation, core.hooksPath, .gitignore, or git config best practices. NOT for creating commits (use committing-code), cleaning branches/worktrees (use cleanup-git), or creating worktrees (use using-git-worktrees).