agentleFS
Google CloudKnown publisherGoogleCloudPlatform/gcsfuse-tools/npi/.agents/skills/bucket-creation/SKILL.md

bucket-creation

Skill10 starsChanged 4 months agoApache-2.0View on GitHub

Guides on provisioning Regional HNS (Hierarchical Namespace) and Zonal RAPID HNS Google Cloud Storage buckets for GCSFuse NPI benchmarking and conformance testing, enforcing uniform bucket-level access, verifying colocation, and inspecting bucket metadata.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check if the bucket already exists before attempting creation:

    line 45
  2. Distinctive:

    If the bucket exists, verify that its location matches the compute target location:

    line 50
  3. Distinctive:

    Regional standard buckets: Must reside in the same region as the target GCE VM or GKE cluster.

    line 51
  4. Very specific:

    Zonal RAPID buckets: Must reside in the exact same zone (placement) as the target GCE VM or GKE cluster.

    line 52
  5. Distinctive:

    Verify that HNS and Uniform Bucket-Level Access are properly enabled on the bucket:

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Google Cloud Storage Bucket Creation for GCSFuse NPI

This skill guides you through provisioning, configuring, and verifying Google Cloud Storage (GCS) buckets for GCSFuse New Product Introduction (NPI) conformance testing and performance benchmarking. It covers both standard Regional Hierarchical Namespace (HNS) buckets and Zonal RAPID HNS buckets.


Prerequisites & Trigger Conditions

Prerequisites

  1. Google Cloud SDK: gcloud and gcloud storage CLI tools authenticated with permissions to create and manage storage buckets (storage.buckets.create, storage.buckets.get, storage.buckets.update).
  2. GCP Project Context: Target GCP Project ID (e.g., gcs-fuse-test).
  3. Target Colocation Details: Compute zone/region where the target GCE VMs or GKE clusters reside (e.g. us-east5-b, us-central1).

Trigger Conditions

  • Target buckets specified in targets.json do not exist in the GCP project.
  • Preparing dedicated storage buckets for POSIX conformance testing or FIO benchmarking.
  • Provisioning Zonal RAPID buckets or Regional HNS buckets colocated with compute resources.

Input/Output Contract

Inputs

  • PROJECT_ID: Google Cloud Project ID.
  • BUCKET_NAME: Unique name for the GCS bucket.
  • LOCATION / REGION: GCP Region for regional buckets (e.g., us-east5, us-central1).
  • ZONE: GCP Zone for zonal RAPID buckets (e.g., us-east5-b, us-central1-a).
  • IS_RAPID: Boolean flag indicating whether the bucket is a Zonal RAPID bucket (true) or standard Regional bucket (false).

Outputs

  • GCS Bucket: Provisioned GCS bucket with HNS enabled (hierarchical_namespace.enabled = true) and uniform bucket-level access (uniform_bucket_level_access = true).
  • Verified Bucket Metadata: Output of gcloud storage buckets describe gs://<BUCKET_NAME>.

Step-by-Step Procedure

Step 1: Verify Existing Bucket or Colocation

Check if the bucket already exists before attempting creation:

gcloud storage buckets describe gs://<BUCKET_NAME> --project=<PROJECT_ID> --format="json(name,location,default_storage_class,hierarchical_namespace)" 2>/dev/null && echo "BUCKET_EXISTS" || echo "BUCKET_NOT_FOUND"

If the bucket exists, verify that its location matches the compute target location:

  • Regional standard buckets: Must reside in the same region as the target GCE VM or GKE cluster.
  • Zonal RAPID buckets: Must reside in the exact same zone (placement) as the target GCE VM or GKE cluster.

Step 2: Provision Regional HNS Bucket (Standard Storage)

For standard regional performance benchmarks and POSIX conformance testing, create a Regional bucket with Hierarchical Namespace (HNS) enabled:

gcloud storage buckets create gs://<BUCKET_NAME> \
    --project=<PROJECT_ID> \
    --location=<REGION> \
    --enable-hierarchical-namespace \
    --uniform-bucket-level-access

Step 3: Provision Zonal RAPID HNS Bucket (Ultra-Low Latency Storage)

For high-throughput zonal RAPID workloads (e.g., TPU slices or low-latency SSD targets), create a Zonal RAPID bucket:

gcloud storage buckets create gs://<BUCKET_NAME> \
    --project=<PROJECT_ID> \
    --location=<REGION> \
    --placement=<ZONE> \
    --default-storage-class=RAPID \
    --enable-hierarchical-namespace \
    --uniform-bucket-level-access

[!NOTE] Zonal RAPID buckets require both --location=<REGION> and --placement=<ZONE> along with --default-storage-class=RAPID.

Step 4: Verify Bucket Properties

Verify that HNS and Uniform Bucket-Level Access are properly enabled on the bucket:

gcloud storage buckets describe gs://<BUCKET_NAME> --project=<PROJECT_ID> --format="json"

Expected JSON snippet:

{
  "default_storage_class": "STANDARD",
  "hierarchical_namespace": {
    "enabled": true
  },
  "location": "US-EAST5",
  "location_type": "region",
  "name": "<BUCKET_NAME>",
  "uniform_bucket_level_access": true
}

Failure Modes & Edge Cases

Failure ScenarioRoot CauseRecovery / Remediation Action
Bucket Name Already TakenGlobal GCS bucket name collision across all Google Cloud accountsAppend a unique project or timestamp suffix (e.g. npi-smoke-<TARGET_NAME>-<PROJECT_ID>).
Zone/Region MismatchBucket created in a different region than compute VM/clusterCross-region traffic adds latency and fails colocation checks. Delete or recreate the bucket in the same region/zone.
RAPID Capacity UnavailableTarget zone lacks RAPID storage availability or quotaSkip Rapid tests on that target or fall back to Regional Standard HNS bucket.
Permission DeniedService account or caller lacks storage.buckets.create permissionGrant roles/storage.admin or roles/storage.objectAdmin on the GCP project.

Verification Checks

  1. Bucket Existence and Metadata Check:
    gcloud storage buckets describe gs://<BUCKET_NAME> --project=<PROJECT_ID> --format="value(name,location,default_storage_class)"
  2. Write / Read Capability Test:
    echo "npi-test-payload" | gcloud storage cp - gs://<BUCKET_NAME>/npi-health-check.txt
    gcloud storage cat gs://<BUCKET_NAME>/npi-health-check.txt
    gcloud storage rm gs://<BUCKET_NAME>/npi-health-check.txt

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.