Skip to content

skills: codify GCP authoring lessons from CodeBundle live-run reviews - #31

Open
theyashl wants to merge 1 commit into
mainfrom
skills/gcp-authoring-hardening
Open

skills: codify GCP authoring lessons from CodeBundle live-run reviews#31
theyashl wants to merge 1 commit into
mainfrom
skills/gcp-authoring-hardening

Conversation

@theyashl

@theyashl theyashl commented Aug 9, 2026

Copy link
Copy Markdown

Adds transferable authoring guidance distilled from maintainer review of shipped GCP CodeBundles — bundles that passed the structural scorer but failed on the first live run. Kept general and cloud-agnostic; deliberately no bundle-specific recipes (an earlier draft included a bespoke monitoring_query.sh helper + a specific-command ban — removed as too task-specific for a reference doc).

auth-gcp.md

  • New "Cross-Project Quota Project" section — set CLOUDSDK_BILLING_QUOTA_PROJECT=${GCP_PROJECT_ID} in the suite env. Without it, a cross-project SA / Workload-Identity run derives the quota project from the credential and fails SERVICE_DISABLED against the caller's project. No-op for in-project SAs, so safe to always include.
  • Refined the "degrade gracefully" shell rule — only swallow errors (2>/dev/null || echo "[]") from commands that exist and can only fail on permissions; for calls that can fail otherwise, validate the response shape and fail loud instead of defaulting to [] (a swallowed error reads as "no data" → scored healthy).

sli-authoring.md

  • "Reading Metrics Safely" — don't swallow command-not-found / API errors into empty data; prefer a first-class, tested call over a guessed subcommand/flag.
  • "Report Enrichment, Not Rollup Tasks" — don't add a redundant summary task that re-queries what the per-dimension checks already collect; the SLI aggregates natively, so enrich each check's report instead.

test-infra-gcp.md

  • Loading test data after provisioning for data-dependent checks (null_resource + local-exec, batched/encoded payloads), plus a note on provider metric lag/flooring.

skill-template-authoring.md

  • Make regenerating SKILL-TEMPLATE.md via generate_skill_md.py a required PR step; note the generator's description-truncation / sourced-helper caveats.

Provenance

These lessons come from the review of the gcp-cloudspanner-* CodeBundles (rw-cli-codecollection #725–#727). The corresponding fixes are already applied in those bundles; this PR turns the review follow-ups into permanent authoring guidance the Creator/bot reads.

🤖 Generated with Claude Code

Adds transferable authoring guidance distilled from maintainer review of
shipped GCP CodeBundles (bundles that passed the structural scorer but
failed on the first live run). Kept general/cloud-agnostic; no
bundle-specific recipes.

auth-gcp.md
- New "Cross-Project Quota Project" section: set
  CLOUDSDK_BILLING_QUOTA_PROJECT=${GCP_PROJECT_ID} in the suite env so a
  cross-project SA / Workload Identity doesn't fail SERVICE_DISABLED
  against the caller's project (no-op for in-project SAs).
- Refined the "degrade gracefully" shell rule: only swallow errors from
  commands that exist; for calls that can fail otherwise, validate the
  response shape and fail loud instead of defaulting to [].

sli-authoring.md
- "Reading Metrics Safely": don't swallow command-not-found / API errors
  into empty data (a health check scores that as passing); prefer a
  first-class, tested call over a guessed subcommand/flag.
- "Report Enrichment, Not Rollup Tasks": don't add a redundant summary
  task that re-queries what the individual checks already collect; the
  SLI aggregates natively -- enrich each check's report instead.

test-infra-gcp.md
- Loading test data after provisioning for data-dependent checks
  (null_resource + local-exec, batched/encoded payloads), with a note on
  provider metric lag/flooring.

skill-template-authoring.md
- Make regenerating SKILL-TEMPLATE.md with generate_skill_md.py a
  required PR step; note generator truncation / sourced-helper caveats.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant