
Gcloud Cli
- 1k installs
- 36 repo stars
- Updated July 14, 2026
- oimiragieo/agent-studio
gcloud-cli is a Claude skill from oimiragieo/agent-studio that runs Google Cloud CLI commands directly from a coding agent with post-execute hook processing for cleanup and logging.
About
gcloud-cli is an oimiragieo/agent-studio skill that invokes the Google Cloud CLI from within a coding agent session without leaving the IDE. The skill disables model invocation for direct command execution and includes a Node.js post-execute hook for cleanup, logging, and follow-up actions after each gcloud run. Platform engineers reach for gcloud-cli when provisioning GCP resources, inspecting cloud state, or running deployment commands through an agent workflow. The post-execute processor logs GCLOUD-CLI results and supports extensible post-processing logic for automated cloud operations.
- Executes any gcloud command through a secure agent interface
- Includes pre-execute validation and post-execute processing hooks
- Provides structured JSON input/output handling for agent workflows
- Designed as a reusable MCP-style skill for Google Cloud operations
Gcloud Cli by the numbers
- 1,005 all-time installs (skills.sh)
- +1 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #314 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
- Security screen: CRITICAL risk (skills.sh audit)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oimiragieo/agent-studio --skill gcloud-cliAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1k |
|---|---|
| repo stars | ★ 36 |
| Security audit | 2 / 3 scanners passed |
| Last updated | July 14, 2026 |
| Repository | oimiragieo/agent-studio ↗ |
How do you run gcloud commands from an agent?
Run Google Cloud CLI commands directly from their coding agent without leaving the IDE.
Who is it for?
Developers managing Google Cloud infrastructure who want gcloud commands executed directly from their coding agent.
Skip if: Teams on AWS or Azure-only infrastructure or developers who prefer the GCP Console over CLI-based agent workflows.
When should I use this skill?
The user needs to run gcloud commands, manage GCP resources, or execute Google Cloud CLI operations from the agent.
What you get
Executed gcloud command output, post-execute processing logs, and GCP resource state changes
- gcloud command results
- Post-execute processing logs
Files
Google Cloud CLI Skill
Installation
The skill invokes the gcloud CLI. Install and initialize:
- Linux/macOS:
curl https://sdk.cloud.google.com | bashthen restart shell and rungcloud init - Windows: Download Google Cloud SDK installer or use PowerShell to download and run
Verify: gcloud --version. Configure: gcloud init
Cheat Sheet & Best Practices
Config: gcloud config set project <id>; gcloud config list; gcloud config configurations create/activate <name> — switch projects.
Auth: gcloud auth login; use --impersonate-service-account for SA; --access-token-file for CI.
Hacks: Use --format="table(name,zone,status)" or --format=json + jq to cut output. Use --flags-file=file.yaml for long or repeated flags. Use named configurations for dev/staging/prod. Run gcloud components update periodically.
Certifications & Training
Free: Google Cloud Learn and Google Skills — Innovators Program (35 credits/month). Certs: Cloud Digital Leader, Cloud Engineer (associate), Cloud Architect/DevOps (professional). Skill data: Config, auth, compute/storage/IAM; no exposed service-account keys.
Hooks & Workflows
Suggested hooks: Pre-deploy: gcloud config get-value project. Use when devops is routed for GCP tasks (contextual: gcp_project).
Workflows: Use with devops (contextual: gcp_project). Flow: detect GCP → load gcloud-cli → run CLI via skill script.
Overview
Google Cloud Platform CLI operations. 90%+ context savings.
Requirements
- gcloud CLI installed
- GOOGLE_PROJECT_ID environment variable
- Authenticated via gcloud auth
Tools (Progressive Disclosure)
Compute
| Tool | Description | Confirmation |
|---|---|---|
| instances-list | List VM instances | No |
| instances-create | Create VM | Yes |
| instances-delete | Delete VM | REQUIRED |
Storage
| Tool | Description | Confirmation |
|---|---|---|
| storage-ls | List buckets/objects | No |
| storage-cp | Copy objects | Yes |
| storage-rm | Delete objects | Yes |
IAM
| Tool | Description |
|---|---|
| iam-list | List IAM policies |
| service-accounts | List service accounts |
Logging
| Tool | Description |
|---|---|
| logs-read | Read logs |
| logs-tail | Tail logs in real-time |
BLOCKED
| Tool | Status |
|---|---|
| projects delete | BLOCKED |
| iam-policy delete | BLOCKED |
Agent Integration
- devops (primary): Cloud operations
- gcp-cloud-agent (primary): GCP specific
- cloud-integrator (secondary): Multi-cloud
Security
⚠️ Never expose service account keys ⚠️ Resource deletion requires confirmation
Memory Protocol (MANDATORY)
Before starting: Read .claude/context/memory/learnings.md
After completing:
- New pattern ->
.claude/context/memory/learnings.md - Issue found ->
.claude/context/memory/issues.md - Decision made ->
.claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.
Invoke the gcloud-cli skill and follow it exactly as presented to you
#!/usr/bin/env node
/**
* gcloud-cli - Post-Execute Hook
* Runs after the skill executes for cleanup, logging, or follow-up actions.
*/
const fs = require('fs');
const path = require('path');
const { safeParseJSON } = require('../../../lib/utils/safe-json.cjs');
// Parse hook input
const result = safeParseJSON(process.argv[2] || '{}');
console.log('📝 [GCLOUD-CLI] Post-execute processing...');
/**
* Process execution result
*/
function processResult(_result) {
// TODO: Add your post-processing logic here
return { success: true };
}
// Run post-processing
const outcome = processResult(result);
if (outcome.success) {
console.log('✅ [GCLOUD-CLI] Post-processing complete');
process.exit(0);
} else {
console.error('⚠️ [GCLOUD-CLI] Post-processing had issues');
process.exit(0);
}
#!/usr/bin/env node
/**
* gcloud-cli - Pre-Execute Hook
* Runs before the skill executes to validate input or prepare context.
*/
const fs = require('fs');
const path = require('path');
const { safeParseJSON } = require('../../../lib/utils/safe-json.cjs');
// Parse hook input
const input = safeParseJSON(process.argv[2] || '{}');
console.log('🔍 [GCLOUD-CLI] Pre-execute validation...');
/**
* Validate input before execution
*/
function validateInput(_input) {
const errors = [];
// TODO: Add your validation logic here
return errors;
}
// Run validation
const errors = validateInput(input);
if (errors.length > 0) {
console.error('❌ Validation failed:');
errors.forEach(e => console.error(' - ' + e));
process.exit(1);
}
console.log('✅ [GCLOUD-CLI] Validation passed');
process.exit(0);
gcloud-cli Research Requirements
Generated: 2026-02-28
Skill Description
Google Cloud CLI operations and resource management
Research Areas
- Current best practices for gcloud-cli
- Industry standards and tooling
- Integration patterns
Source References
- To be populated by skill-updater research phase
gcloud-cli Rules
Purpose
Google Cloud CLI operations and resource management
Best Practices
- Never expose service account keys
- Resource deletion requires confirmation
- Verify project before operations
Integration Points
See SKILL.md for complete documentation.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "gcloud-cli Input Schema",
"description": "Input validation schema for gcloud-cli skill",
"type": "object",
"required": [],
"properties": {},
"additionalProperties": true
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "gcloud-cli Output Schema",
"description": "Output validation schema for gcloud-cli skill",
"type": "object",
"required": ["success"],
"properties": {
"success": {
"type": "boolean",
"description": "Whether the skill executed successfully"
},
"result": {
"type": "object",
"description": "The skill execution result",
"additionalProperties": true
},
"error": {
"type": "string",
"description": "Error message if execution failed"
}
},
"additionalProperties": true
}
#!/usr/bin/env node
/**
* Gcloud Cli - Main Script
* Google Cloud CLI operations and resource management
*
* Usage:
* node main.cjs [options]
*
* Options:
* --help Show this help message
*/
const fs = require('fs');
const path = require('path');
// Find project root
function findProjectRoot() {
let dir = __dirname;
while (dir !== path.parse(dir).root) {
if (fs.existsSync(path.join(dir, '.claude'))) {
return dir;
}
dir = path.dirname(dir);
}
return process.cwd();
}
const PROJECT_ROOT = findProjectRoot();
// Parse command line arguments
const args = process.argv.slice(2);
const options = {};
for (let i = 0; i < args.length; i++) {
if (args[i].startsWith('--')) {
const key = args[i].slice(2);
const value = args[i + 1] && !args[i + 1].startsWith('--') ? args[++i] : true;
options[key] = value;
}
}
/**
* Main execution
*/
function main() {
if (options.help) {
console.log(`
Gcloud Cli - Main Script
Usage:
node main.cjs [options]
Options:
--help Show this help message
`);
process.exit(0);
}
const { spawn } = require('child_process');
const child = spawn(
'gcloud',
args.filter(a => a !== '--help'),
{
stdio: 'inherit',
cwd: PROJECT_ROOT,
shell: false,
}
);
child.on('close', (code, signal) => {
if (code === 127)
console.error(
'gcloud CLI not found. Install: see this skill\'s SKILL.md, section "Installation".'
);
if (code !== null && code !== undefined) process.exit(code);
if (signal) process.exit(1);
process.exit(0);
});
}
main();
gcloud-cli Implementation Template
Goal
- Define target outcome and acceptance criteria.
TDD
1. Red 2. Green 3. Refactor
Verification
- lint
- format
- targeted tests
Related skills
How it compares
Pick this skill when you need agent-driven gcloud execution with post-run hooks rather than manual terminal sessions.
FAQ
What does the gcloud-cli skill execute?
The gcloud-cli skill from oimiragieo/agent-studio runs Google Cloud CLI commands directly from a coding agent and processes results through a Node.js post-execute hook for logging and cleanup.
Does gcloud-cli use model invocation?
The gcloud-cli skill sets disable-model-invocation to true, executing gcloud commands directly rather than routing them through additional model interpretation layers.
Is Gcloud Cli safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.