gcp-cloud-storage

Manage Google Cloud Storage for scalable object storage. Used to create and configure buckets, upload and organize objects, generate signed URLs for temporary secure access, set lifecycle rules to optimize costs, and configure access control.

Last repository push
GitHub Stars
219
Forks
38
Issues / PRs
1

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "gcp-cloud-storage" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-7d676e2f7884f415e92d5b5edb35c00d22c5c64ec31e9faeba82a1815c184498. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Manage Google Cloud Storage for scalable object storage. Used to create and configure buckets, upload and organize objects, generate signed URLs for temporary secure access, set lifecycle rules to optimize costs, and configure access control.

0 Downloads

Introduction source: third_party · TerminalSkills · 1.0.0 Reference

SkillPi interpretation

Tasks
Google Cloud Storage is a unified object storage service with global edge caching. It offers multiple storage classes (Standard, Nearline, Coldline, Archive) for cost optimization, strong consistency, and integration with all GCP services.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: gcp-cloud-storage
description: |
  Manage Google Cloud Storage for scalable object storage. Create and configure
  buckets, upload and organize objects, generate signed URLs for secure temporary
  access, set lifecycle rules for cost optimization, and configure access control.
license: Apache-2.0
compatibility: 'gcloud-cli, gsutil, python'
metadata:
  author: terminal-skills
  version: 1.0.0
  category: devops
  tags:
    - gcp
    - cloud-storage
    - object-storage
    - buckets

GCP Cloud Storage

Google Cloud Storage is a unified object storage service with global edge caching. It offers multiple storage classes (Standard, Nearline, Coldline, Archive) for cost optimization, strong consistency, and integration with all GCP services.

Core Concepts

  • Bucket — globally unique container, scoped to a project and location
  • Object — a file with metadata, identified by name (path) within a bucket
  • Storage Class — Standard, Nearline (30d), Coldline (90d), Archive (365d)
  • Signed URL — time-limited URL for authenticated access without credentials
  • Lifecycle Rule — automatic actions based on age, class, or conditions
  • IAM / ACL — access control at bucket and object level

Bucket Operations

# Create a bucket with location and default storage class
gcloud storage buckets create gs://my-app-assets-prod \
  --location=us-central1 \
  --default-storage-class=STANDARD \
  --uniform-bucket-level-access
# List buckets
gcloud storage ls
# Set bucket to public read (for static hosting)
gcloud storage buckets add-iam-policy-binding gs://my-app-assets-prod \
  --member=allUsers \
  --role=roles/storage.objectViewer
# Enable versioning
gcloud storage buckets update gs://my-app-assets-prod --versioning

Object Operations

# Upload a file
gcloud storage cp ./build/app.zip gs://my-app-assets-prod/releases/v1.2.0/app.zip
# Sync a directory
gcloud storage rsync ./dist gs://my-app-assets-prod/static/ \
  --delete-unmatched-destination-objects \
  --cache-control="public, max-age=86400"
# Copy between buckets
gcloud storage cp gs://source-bucket/data.csv gs://dest-bucket/data.csv
# List objects with prefix
gcloud storage ls gs://my-app-assets-prod/releases/ --recursive
# Remove objects
gcloud storage rm gs://my-app-assets-prod/old-file.txt

Signed URLs

# Generate signed URL for download (1 hour)
from google.cloud import storage
from datetime import timedelta

client = storage.Client()
bucket = client.bucket('my-app-assets-prod')
blob = bucket.blob('reports/q4.pdf')

url = blob.generate_signed_url(
    version='v4',
    expiration=timedelta(hours=1),
    method='GET'
)
print(f"Download URL: {url}")
# Generate signed URL for upload
url = blob.generate_signed_url(
    version='v4',
    expiration=timedelta(minutes=15),
    method='PUT',
    content_type='application/octet-stream'
)
print(f"Upload URL: {url}")
# Client uploads with: curl -X PUT -H "Content-Type: application/octet-stream" --data-binary @file "$url"
# Generate signed URL with gsutil
gcloud storage sign-url gs://my-app-assets-prod/reports/q4.pdf \
  --duration=1h \
  --private-key-file=service-account.json

Lifecycle Rules

// lifecycle-config.json — transition and expire objects automatically
{
  "rule": [
    {
      "action": {"type": "SetStorageClass", "storageClass": "NEARLINE"},
      "condition": {"age": 30, "matchesPrefix": ["logs/"]}
    },
    {
      "action": {"type": "SetStorageClass", "storageClass": "COLDLINE"},
      "condition": {"age": 90, "matchesPrefix": ["logs/"]}
    },
    {
      "action": {"type": "Delete"},
      "condition": {"age": 365, "matchesPrefix": ["logs/"]}
    },
    {
      "action": {"type": "AbortIncompleteMultipartUpload"},
      "condition": {"age": 7}
    },
    {
      "action": {"type": "Delete"},
      "condition": {"numNewerVersions": 3, "isLive": false}
    }
  ]
}
# Apply lifecycle rules
gcloud storage buckets update gs://my-app-assets-prod \
  --lifecycle-file=lifecycle-config.json

Static Website Hosting

# Configure bucket for static website
gcloud storage buckets update gs://my-app-website \
  --web-main-page-suffix=index.html \
  --web-not-found-page=404.html
# Upload website files with appropriate content types
gcloud storage cp -r ./build/* gs://my-app-website/ \
  --cache-control="public, max-age=3600"

Event Notifications

# Notify Pub/Sub when objects are created
gcloud storage buckets notifications create gs://my-app-assets-prod \
  --topic=storage-events \
  --event-types=OBJECT_FINALIZE \
  --object-prefix=uploads/

CORS Configuration

// cors-config.json — allow browser uploads
[
  {
    "origin": ["https://myapp.com"],
    "method": ["GET", "PUT", "POST"],
    "responseHeader": ["Content-Type"],
    "maxAgeSeconds": 3600
  }
]
# Apply CORS
gcloud storage buckets update gs://my-app-assets-prod --cors-file=cors-config.json

Access Control

# Grant a service account read access
gcloud storage buckets add-iam-policy-binding gs://my-app-assets-prod \
  --member=serviceAccount:app@my-project.iam.gserviceaccount.com \
  --role=roles/storage.objectViewer
# Remove public access
gcloud storage buckets remove-iam-policy-binding gs://my-app-assets-prod \
  --member=allUsers \
  --role=roles/storage.objectViewer

Best Practices

  • Enable uniform bucket-level access (disable ACLs) for simpler permissions
  • Use lifecycle rules to automatically transition cold data to cheaper classes
  • Generate signed URLs for temporary access instead of making objects public
  • Enable versioning on buckets with critical data
  • Use gcloud storage rsync for efficient directory synchronization
  • Set appropriate Cache-Control headers for CDN and browser caching
  • Use Pub/Sub notifications for event-driven processing of uploads
  • Enable Object Versioning + lifecycle rules to limit stored versions

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 提供 Google Cloud Storage 的完整管理能力,覆盖存储桶、对象、签名 URL、生命周期等核心功能
  • 内容实用性强,适用于 DevOps、云存储管理等高频刚需场景
Trigger Precision95/100

Highlights

  • 触发词精准完整,覆盖多种变体,边界清晰
  • description 明确描述了核心功能和使用场景
Structure and Standards98/100

Highlights

  • 文档结构清晰,章节划分合理,包含完整的使用示例
  • frontmatter 完整,符合规范要求
Execution Reliability94/100

Highlights

  • 所有命令均基于官方 gcloud CLI 和 Python SDK,参数正确
  • 工具来源明确,执行流程可靠
Evidence Verifiability (mean of the first four)95/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Accounts, secrets or authorization

    Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.

    Mentioned in main document · lines 29
  • Cloud changes and possible charges

    Preview changes and verify account, region, permissions and costs. Confirm creation, deployment or deletion separately.

    Mentioned in main document · lines 37, 182
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • myapp.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.