Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

gcp-foundation-fabricGCP 基础面料

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

291

周安装

12

GitHub Stars

4

下载量

95
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gcp-foundation-fabric(GCP 基础面料)
来源仓库:https://github.com/accolver/skill-maker
仓库路径:skills/gcp-foundation-fabric
安装命令:
npx skills add https://github.com/accolver/skill-maker --skill gcp-foundation-fabric
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/accolver/skill-maker --skill gcp-foundation-fabric

简介

用于构建 GCP 企业级基础架构即代码模板。

  • 支持组织级策略、资源命名和治理规则定义。
  • 通过 GitHub 安装,需 Terraform 状态文件的写入权限。
  • 生产环境使用前应在沙箱环境完整验证。
  • 遵循最小权限原则配置服务账号角色。gcp-foundation-fabric 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Google Cloud Foundation Fabric

Overview

Guide agents through selecting, configuring, and customizing modules and FAST stages from the cloud-foundation-fabric repository — Google Cloud's official Terraform modules and landing zone toolkit.

When to use

  • The task explicitly targets Google Cloud Foundation Fabric (CFF) modules, FAST stages, or factory patterns.
  • The user needs help selecting, wiring, or customizing cloud-foundation-fabric Terraform components.
  • The request references Fabric conventions such as project factory, VPC factory, stage contracts, or generated tfvars/outputs.
  • The work is GCP landing-zone composition using CFF, not generic Terraform authoring.

Do NOT use when:

  • The task is plain Terraform with no CFF or FAST dependency.
  • The request is primarily Terragrunt orchestration with no underlying CFF module question.
  • The user is working on Cloud Foundation Toolkit or another Google IaC project that is not CFF.

Response format

Always structure the final response with these top-level sections, in this order:

  1. Summary — state the task, scope, and main conclusion in 1-3 sentences.
  2. Decision / Approach — state the key classification, assumptions, or chosen path.
  3. Artifacts — provide the primary deliverable(s) for this skill. Use clear subheadings for multiple files, commands, JSON payloads, queries, or documents.
  4. Validation — state checks performed, important risks, caveats, or unresolved questions.
  5. Next steps — list concrete follow-up actions, or write None if nothing remains.

Rules:

  • Do not omit a section; write None when a section does not apply.
  • If files are produced, list each file path under Artifacts before its contents.
  • If commands, JSON, SQL, YAML, or code are produced, put each artifact in fenced code blocks with the correct language tag when possible.
  • Keep section names exactly as written above so output stays predictable across skills.

Workflow

1. Identify the right module

Match the user's GCP resource needs to CFF modules:

  • Check the module categories table above
  • Each module has a README with examples — reference them at modules/<name>/README.md
  • Modules are designed for composition: combine multiple modules for complete solutions (e.g., project + net-vpc + net-vpc-firewall)

2. Configure using CFF patterns

CFF modules follow consistent interface patterns. Apply these when writing module blocks:

IAM pattern — every module supports both role-based and group-based IAM. Always use group_iam when granting multiple roles to one principal (CFF convention):

module "project" {
  source = "./modules/project"
  name   = "my-project"
  # Role-based IAM — one role maps to many principals
  iam = {
    "roles/viewer" = ["group:viewers@example.com"]
  }
  # group_iam — one principal maps to many roles (preferred for groups)
  group_iam = {
    "group:editors@example.com" = ["roles/editor", "roles/iam.serviceAccountUser"]
  }
}

Naming pattern — use prefix variable, never random suffixes:

module "project" {
  source = "./modules/project"
  name   = "net-hub-0"
  prefix = "myco-gcp-prod"  # Results in: myco-gcp-prod-net-hub-0
}

Factory pattern — use factories_config for scale:

module "project-factory" {
  source = "./modules/project-factory"
  factories_config = {
    basepath = "data"  # root path for all factory data
    # paths default to: projects, folders, budgets, project-templates
  }
  data_defaults = {
    billing_account = "012345-ABCDEF-012345"
    parent          = "folders/1234567890"
    prefix          = "myco-dev"
    services        = ["compute.googleapis.com"]
  }
  data_merges = {
    labels = { managed-by = "project-factory" }
  }
}

The project-factory uses a three-tier precedence: data_defaults (lowest) → YAML file data → data_overrides (highest). data_merges additively combines with file data (useful for labels, services that should always be present).

Shared VPC pattern — host and service project configuration:

# Host project
module "host-project" {
  source = "./modules/project"
  name   = "net-host-0"
  shared_vpc_host_config = {
    enabled          = true
    service_projects = [module.service-project.project_id]
  }
}

# Service project (attachment with service agent IAM)
module "service-project" {
  source = "./modules/project"
  name   = "svc-app-0"
  shared_vpc_service_config = {
    host_project = module.host-project.project_id
    # Grant service agents network access (key CFF pattern)
    service_agent_iam = {
      "roles/compute.networkUser" = [
        "cloudservices", "container-engine"
      ]
    }
  }
}

Note: CFF uses service_agent_iam (not service_identity_iam) in shared_vpc_service_config. The keys are short service names like cloudservices, container-engine, not full email addresses.

VPC subnet pattern — subnets are a list of objects with private access on by default:

module "vpc" {
  source     = "./modules/net-vpc"
  project_id = module.project.project_id
  name       = "hub-vpc"
  subnets = [
    {
      name          = "subnet-eu"
      ip_cidr_range = "10.0.0.0/24"
      region        = "europe-west1"
      # enable_private_access defaults to true in CFF
      secondary_ip_ranges = {
        pods     = { ip_cidr_range = "172.16.0.0/20" }
        services = { ip_cidr_range = "192.168.0.0/24" }
      }
    }
  ]
}

Note: In CFF, secondary_ip_ranges is a map of objects with ip_cidr_range keys (not bare strings). Private Google Access is enabled by default via enable_private_access = true.

Cloud NAT pattern — always pass router_network for the VPC self-link:

module "nat" {
  source         = "./modules/net-cloudnat"
  project_id     = var.project_id
  region         = "europe-west1"
  name           = "hub-nat"
  router_network = module.vpc.self_link
}

Firewall policy rules — use layer4_configs for protocol/port matching:

module "fw-policy" {
  source    = "./modules/net-firewall-policy"
  name      = "iap-ssh"
  parent_id = var.organization_id
  rules = {
    allow-iap-ssh = {
      direction = "INGRESS"
      action    = "allow"
      priority  = 1000
      match = {
        src_ip_ranges  = ["35.235.240.0/20"]
        layer4_configs = [{ protocol = "tcp", ports = ["22"] }]
      }
    }
  }
}

3. Work with FAST stages

When modifying or extending FAST stages:

  1. Understand stage contracts — each stage consumes outputs from previous stages via variable blocks with # tfdoc:variable:source <stage> comments
  2. Use output files — FAST generates provider and tfvars files in GCS for downstream stages; maintain this system when adding outputs
  3. Leverage factories — FAST stages use factories_config to drive resource creation from YAML; prefer adding YAML files over modifying HCL
  4. Respect the stage DAG — stages 0 → 1 → 2 → 3; don't create circular dependencies

4. Customize modules

When extending or modifying CFF modules:

  1. Fork the repo — CFF is designed to be cloned and forked for production
  2. Follow the Zen of Fabric — design by logical entity, use stable interfaces, prefer flat code, don't be too opinionated
  3. Update documentation — run tools/tfdoc.py modules/<name> after changing variables or outputs
  4. Write tests — add README examples with # tftest modules=N resources=M comments; optionally add inventory YAML files
  5. Use descriptive file names — not main.tf/variables.tf/outputs.tf but iam.tf, vpc.tf, factory.tf

5. Test your code

# Format
terraform fmt -recursive

# Update docs
./tools/tfdoc.py modules/<module-name>

# Run tests
pytest tests/examples                              # all examples
pytest -k 'modules and <module>:' tests/examples   # specific module
pytest tests                                        # full suite

Checklist

  • Correct CFF module identified for the GCP resource type
  • Module block uses CFF interface patterns (IAM, naming, factories)
  • Variables use object types with defaults (not flat scalar variables)
  • prefix used instead of random suffixes for naming
  • Output depends_on includes all internal resources for safe composition
  • FAST stage contracts respected (variables sourced from correct upstream stage)
  • Factory YAML files follow the module's expected schema
  • tfdoc regenerated after variable/output changes
  • Tests pass (pytest -k 'modules and <name>:' tests/examples)

Common Mistakes

MistakeFix
Using random suffixes in resource namesUse prefix variable: prefix = "myco-gcp-dev"
Flat scalar variables for complex configUse object variables with optional attributes and defaults
Managing IAM in a separate modulePut IAM in the same module as the resource (CFF design principle)
Manually editing README variable tablesRun ./tools/tfdoc.py modules/<name> to regenerate
Referencing modules by registryClone the repo and reference locally or via git tag: source = "github.com/...//modules/project?ref=v54.0.0"
Creating sub-modules inside a moduleKeep modules flat — avoid nesting to reduce complexity
Using main.tf for everythingUse descriptive filenames: iam.tf, vpc.tf, factory.tf
Ignoring depends_on in outputsAlways add depends_on = [module.X] to outputs so consumers wait for full configuration
Breaking FAST stage contractsCheck # tfdoc:variable:source comments for required upstream outputs
Using terraform-google-modules/* patternsCFF has different conventions — don't mix patterns from CFT/terraform-google-modules

Quick Reference

OperationHow
Find a moduleBrowse modules/ directory or check the module categories table
Reference a modulesource = "./modules/<name>" (local) or "github.com/GoogleCloudPlatform/cloud-foundation-fabric//modules/<name>?ref=v54.0.0" (remote)
Add IAM to any resourceUse iam = {"roles/X" = ["member:Y"]} variable (standard across all modules)
Create projects at scaleUse project-factory module with factories_config.projects pointing to YAML dir
Create VPCs at scaleUse net-vpc-factory module with factories_config.vpcs pointing to YAML dir
Set org policiesUse org_policies factory key in project, folder, or organization modules
Configure firewall rulesUse net-firewall-policy module with factories_config for YAML-driven rules
Set up Shared VPCUse shared_vpc_host_config on host project, shared_vpc_service_config on service projects
Run FAST stagecd fast/stages/<stage> && terraform init && terraform apply
Bootstrap a new orgStart with fast/stages/0-org-setup
Update module docs./tools/tfdoc.py modules/<module-name>
Run module testspytest -k 'modules and <name>:' tests/examples
Generate test inventorypytest -s 'tests/examples/test_plan.py::test_example[modules/<name>:...]'
Check all linting./tools/lint.sh

Key Principles

  1. Design by logical entity — modules encapsulate all resources for a single functional unit (project + IAM + services + org policies), not by product. This improves readability and ensures consumers get fully-configured units.
  2. Stable interfaces — the same variable pattern (iam, factories_config, prefix, labels) is reused across all modules. Learn it once, apply everywhere.
  3. Factories for scale — YAML-driven factories (factories_config) are the preferred pattern for managing many similar resources. Add YAML files instead of duplicating HCL blocks.
  4. Fork and own — CFF is designed to be cloned and customized. Reference via git tags for stability, but expect to modify code for production needs.
  5. Flat and explicit — avoid sub-modules, magic, and deep indirection. Code should be readable as documentation. Prefer 79-char line lengths and alphabetical ordering of variables/outputs.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.92%
按下载量换算32

Claude

27.19%
按下载量换算26

Cursor

20.07%
按下载量换算19

Gemini CLI

9.35%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills