google-cloud-recipe-foundation-builder
Deploys a baseline landing zone foundation for a Google Cloud Organization, establishing security guardrails using Organization Policies, resource hierarchy folders and projects, billing association, and centralized logging and monitoring.
Install / Use
npx skills add google/skills --skill google-cloud-recipe-foundation-builderInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
SecuritySupported Platforms
Our assessment of google-cloud-recipe-foundation-builder
google-cloud-recipe-foundation-builder scores 97/100 on our quality scale, 78th of 544 Security skills we index (top 15%).
Its SKILL.md is 19 KB long, well organised into 32 sections with 2 code examples: a thorough specification that gives an agent plenty to work with.
With 20,340 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 2 days ago, so google-cloud-recipe-foundation-builder is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-09-26. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
google-cloud-recipe-foundation-builder compared with similar skills
All 4 of these similar skills score higher than google-cloud-recipe-foundation-builder; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| google-cloud-recipe-foundation-builder (this skill)by google | 97 | 20.3k | 2d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 3d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 3d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 4d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 4d ago | SKILL.md |
Frequently asked questions
- How do I install google-cloud-recipe-foundation-builder?
- Run
npx skills add google/skills --skill google-cloud-recipe-foundation-builder. The install tabs above show the steps for each supported agent. - Which AI agents does google-cloud-recipe-foundation-builder work with?
- It is written for Zed, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is google-cloud-recipe-foundation-builder safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is google-cloud-recipe-foundation-builder still maintained?
- The repository was last updated 2 days ago, so google-cloud-recipe-foundation-builder is actively maintained.
Skill content
View source on GitHubname: google-cloud-recipe-foundation-builder metadata: version: "1.0.0" category: GettingStarted description: >- Deploys a baseline landing zone foundation for a Google Cloud Organization, establishing security guardrails using Organization Policies, resource hierarchy folders and projects, billing association, and centralized logging and monitoring. Deploys Google Cloud's recommended security controls and architecture. Use when setting up a new Google Cloud Organization or establishing a secure, enterprise-grade landing zone foundation.
Don't use for individual project onboarding (use google-cloud-recipe-onboarding or product-specific skills instead).
Google Cloud Recipe: Foundation Builder
[!WARNING] This skill is currently in a preview state. It will deploy a secure foundation, but does not have all advanced features. Users who want more options should visit Google Cloud Setup.
This skill guides the setup of a secure, enterprise-grade Google Cloud landing zone foundation. It establishes baseline security controls, organizes the initial resource hierarchy, and configures centralized audit logging and cross-environment monitoring.
Overview
The recipe provisions the following core components at the organization root:
- Security Guardrails: Enforces 17 baseline Google Cloud Organization Policies to secure the environment (13 Boolean, 4 List constraints).
- Resource Hierarchy: Establishes 4 folders (
Common,Production,Non-Production,Development) and provisions corresponding projects sequentially with globally unique ID prefixes (logging-,prod-,non-prod-,dev-followed by a shared suffix). - Billing & API Enablement: Links all projects to your billing account and activates critical logging/monitoring services.
- Centralized Logging & Monitoring: Deploys a global, centralized log bucket with 30-day retention, configures an organization-wide audit log sink, and sets up a cross-environment metrics scope.
Clarifying Questions
Before executing this recipe, the agent must gather the following details:
- Organization ID: Run
gcloud organizations listto retrieve the available organizations, present them to the user, and ask them to select the target Organization ID. - Billing Account ID: Run
gcloud billing accounts list --filter=open=trueto retrieve only the active (open) billing accounts, present them to the user, and ask them to select the active Billing Account ID. - Project ID Suffix: Ask if the user has a preferred prefix or target
suffix for Project IDs (default uses prefix + a shared random 8-character
string, e.g.,
prod-ab12cd34). - Log Bucket Region: Ask for the target region for resources if they want
to override the default
globallog bucket location.
Prerequisites
Ensure the following prerequisites are met before beginning the deployment:
- GCP Identity: You must have a Google Cloud Organization resource set up.
- Administrative IAM Roles: The identity executing these commands must
hold the required administrative permissions. If any step fails with a
Permission Deniederror, the agent will attempt to self-remediate by granting the corresponding recommended role as detailed in Phase 2: Error Recovery & Lazy Role Remediation Strategy. - Tools: The
gcloudCLI must be installed, authorized with the above identity, and configured for use.
Steps to Complete the Recipe
Phase 1: Pre-flight Confirmation
Identify the target organization and obtain explicit user approval before making changes.
-
Identify and Discover Organization: Verify the target organization. If only the display name is known, list organizations to find the ID. Then, retrieve the organization metadata to dynamically calculate the Directory Customer ID and Domain Name:
# List to find ID if needed gcloud organizations list # Describe the organization to retrieve metadata gcloud organizations describe [ORGANIZATION_ID]Calculate values:
- Domain Name (
[ORG_NAME]/[YOUR_DOMAIN]): Use thedisplayNamevalue from the output (e.g.,my-business.com). - Customer ID (
[DIRECTORY_CUSTOMER_ID]): Use theowner.directoryCustomerIdvalue from the output (e.g.,C01234567).
- Domain Name (
-
Present Blueprint Summary: Present the exact details of the blueprint to the user and request confirmation to proceed:
Proposed Foundation Deployment Summary for Organization:
[ORG_NAME]([ORGANIZATION_ID])- Security: Enforce 17 baseline Organization Policies (13 Boolean, 4 List).
- Folders: Create 4 folders sequentially (
Common,Production,Non-Production,Development). - Projects: Create 4 projects sequentially with unique IDs
(
logging-[SUFFIX],prod-[SUFFIX],non-prod-[SUFFIX],dev-[SUFFIX]). - Billing: Link all projects to Billing Account
[BILLING_ACCOUNT_ID]. - APIs: Enable Logging and Monitoring APIs on the central project.
- Centralized Logging: Deploy a
globallog bucket[ORG_NAME]-logging(30-day retention), configure an organization-level sink[ORGANIZATION_ID]-logbucketsink-[RANDOM_HEX], and establish cross-project metrics scopes.
Do you wish to proceed with this deployment? (Yes/No)
[!IMPORTANT] Pause execution and wait for explicit user approval before moving to Phase 2. If the user declines, abort the operation.
Phase 2: Error Recovery & Lazy Role Remediation Strategy
To ensure deployment continues smoothly on clean organizations without requiring complex upfront permission checks (which require a quota project), the agent must adopt a "lazy recovery" approach.
Instead of testing permissions in advance, the agent will attempt to execute
each step in the recipe. If a step fails with a Permission Denied error, the
agent will attempt to self-remediate by granting the corresponding recommended
administrative group of roles to the deployment identity and retrying the
operation.
[!IMPORTANT] When asked about pre-deployment readiness, prerequisites, or checks to run, the agent must explicitly explain that the landing zone deployment adopts a lazy role remediation strategy rather than upfront testing, detailing all of the following in its response: 1. Confirm it will execute deployment commands directly, catching any Permission Denied errors. 2. Confirm it will attempt to self-remediate on failure by running the exact commands
gcloud organizations add-iam-policy-bindingorgcloud billing accounts add-iam-policy-bindingto grant the entire administrative group of roles to the active identity, and then retry the failed deployment command. 3. List the core administrative groups that it will attempt to grant (Organization Admin Group, Billing Admin Group, and Security Admin Group) mapped to their key roles. 4. Confirm it will halt execution and request manual administrator intervention if the self-remediation grant command fails.
Remediation Protocol
For any command that fails due to missing permissions:
-
Identify Required Admin Group: Determine which administrative group is responsible for the failed action. Refer to the Administrative IAM Reference for details.
-
Attempt Self-Remediation: Grant all roles belonging to that administrative group to the active authenticated account sequentially. Refer to the Administrative IAM Reference Remediation Guide for the copy-pasteable script commands:
- For Organization/Folder level failures (Org Admin Group or Security
Admin Group): Run
gcloud organizations add-iam-policy-bindingsequentially for each role in the group. - For Billing level failures (Billing Admin Group): Run
gcloud billing accounts add-iam-policy-bindingsequentially for each role in the group.
- For Organization/Folder level failures (Org Admin Group or Security
Admin Group): Run
-
Halt on Remediation Failure:
- If the grant commands succeed, immediately retry the failed deployment command.
- If any of the grant commands fail (e.g., due to lack of
setIamPolicyadmin rights), halt execution and instruct the user to ask their Organization/Billing Administrator to manually grant the entire administrative group of roles.
Phase-Specific Remediation Mapping
- Phase 3: Security Guardrails (Org Policies):
- If
gcloud org-policies set-policyfails: Attempt to grant the entire Organization Admin Group (9 roles) at the organization level.
- If
- Phase 4: Resource Hierarchy (Folders & Projects):
- If
gcloud resource-manager folders createorgcloud projects createfails: Attempt to grant the entire Organization Admin Group (9 roles) at the organization level.
- If
- Phase 4: Billing Link:
- If
gcloud billing projects linkfails: Attempt to grant the entire Billing Admin Group (3 roles) at the billing account level, and ensure the active identity is granted the Organization Admin Group (which containsroles/billing.user) at the organization level.
- If
- Phase 5: Centralized Logging & Monitoring:
- If
gcloud logging sinks createfails at org level: Attempt to grant the entire Logging/Monitoring Admin Group (2 roles:roles/logging.admin,roles/monitoring.admin) and the Security Admin Group (9 roles) at the organization level.
- If
Phase 3: Security Guardrails (Org Policies)
Apply 17 baseline security controls at the organization root.
[!CAUTION] Applying
iam.allowedPolicyMemberDomainsfirst can lock out the deployment identity if it resides in an unallowed domain. Ensure the deployment identity is safe before enforcing this policy.
-
Generate the YAML configuration files for the 17 policies. Refer to the Organization Policies Reference for the exact YAML templates for both Boolean and List constraints.
-
Apply each organization policy sequentially using the
gcloud org-policiestool:gcloud org-policies set-policy [POLICY_FILE_NAME].yaml
Phase 4: Resource Hierarchy
1. Folder Creation
Check if target folders exist to avoid duplication. The agent must check for all
4 folders: for any folder that already exists (e.g., if Common or Production
are already present), the agent must locate and reuse them; for any folder that
is missing (e.g., if Non-Production or Development are not present), the
agent must proceed to sequentially create them:
[!IMPORTANT] When explaining how existing resources (folders and projects) are handled to prevent duplication, the agent must explicitly name the remaining missing folders (
Non-ProductionandDevelopment) and confirm that it will proceed to sequentially create only these missing folders and projects.
# Check and Create "Common" Folder
gcloud resource-manager folders list --organization=[ORGANIZATION_ID] --filter="display_name=Common"
# If not present:
gcloud resource-manager folders create --display-name="Common" --organization=[ORGANIZATION_ID]
# Check and Create "Production" Folder
gcloud resource-manager fol
Truncated for display — read the full file on GitHub.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
