cld

Execute cld commands in a sandbox with automatic GCP proxy correction.

1|Updated Jun 13, 2017
One-click install
npx skills add https://github.com/RoyMcCrain/dotsfile --skill cld
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cld
Source: https://github.com/RoyMcCrain/dotsfile/tree/main/claude/skills/cld
Command: npx skills add https://github.com/RoyMcCrain/dotsfile --skill cld

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many cld subcommands that interact with Google Cloud fail or behave incorrectly in a sandboxed devbox environment because the CLOUDSDK_PROXY_TYPE is set to https by default. This Skill fixes the proxy setting to enable GCP-accessing cld operations while preserving normal behavior for non-GCP tasks.

Core Features & Use Cases

  • Automatic GCP proxy correction: Prefixes cld invocations that require GCP access with CLOUDSDK_PROXY_TYPE=http to ensure connectivity.
  • Selective execution: Applies the proxy fix only to commands that need GCP (db query, db connect, db migrate apply, db proxy, ssh) and runs other development commands unchanged (tests, lint, generate, build).
  • Developer workflows: Useful for inspecting production/dev databases in read-only mode, running migrations, starting Cloud SQL Proxy, performing SSH into instances, and running local test/lint/generate tasks.

Quick Start

Ask the assistant to run the desired cld subcommand and prefix it with CLOUDSDK_PROXY_TYPE=http when the operation requires Google Cloud access, otherwise run cld normally.

Frequently Asked Questions about cld

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why do cld db commands fail in a devbox sandbox environment?▼

cld db commands fail in a devbox sandbox because the default CLOUDSDK_PROXY_TYPE is set to https, which breaks GCP connectivity. Prefixing commands with CLOUDSDK_PROXY_TYPE=http resolves the issue.

How do I run cld database queries and migrations safely inside a sandbox?▼

To run cld database queries safely in a sandbox, execute the cld CLI inside devbox and prefix GCP-required subcommands like db query and db migrate apply with CLOUDSDK_PROXY_TYPE=http.

Do I need to apply proxy configuration changes for all cld development commands?▼

You do not need proxy configuration changes for all cld commands. The proxy fix applies only to GCP-accessing tasks like db proxy and ssh, while non-GCP commands like tests and lint run unchanged.

Can I use cld to start a Cloud SQL Proxy and SSH into instances from a devbox?▼

Yes, you can use cld to start a Cloud SQL Proxy and SSH into instances from a devbox by applying the CLOUDSDK_PROXY_TYPE=http environment variable to ensure proper GCP access.

What is the best way to inspect production databases in read-only mode using cld?▼

The best way to inspect production databases in read-only mode using cld is running db query within a sandboxed devbox, ensuring CLOUDSDK_PROXY_TYPE=http is set for GCP access.

What are the limitations of running cld commands with default GCP proxy settings?▼

Running cld commands with default GCP proxy settings limits functionality by causing subcommands that require GCP access, such as db connect and ssh, to fail within a sandboxed devbox environment.