google/workload-manager-basics
>- Use this skill to manage Google Cloud Workload Manager evaluations, rules, scanned resources, and validation results by using public client libraries and the REST API. Use when you need to inspect workload best-practice rules, create and run evaluations for Google Cloud general best practices, SAP, SQL Server, or custom organizational rules, review violations, export results to BigQuery, or automate Workload Manager through client libraries because no service-specific public CLI or MCP server is available. Don't use for general Google Compute Engine instance management, VPC configuration, or standard IAM auditing.
npx skills add https://github.com/google/skills --skill workload-manager-basics
Workload Manager validates enterprise workloads against Google Cloud best
practices and recommendations. The public client libraries are centered on
evaluations: define a resource scope, choose built-in or custom rules, run an
evaluation, then inspect results and scanned resources.
flowchart LR
Rules["List rules"] --> Eval["Create or update evaluation"]
Resources["Project, folder, or org scope"] --> Eval
Eval --> Run["Run evaluation"]
Run --> Results["Inspect evaluation results"]
Results --> Remediate["Remediate findings"]
Results --> Export["Optional BigQuery export"]
To ensure compatibility, security, and successful integration:
using the official public google-cloud-workloadmanager client library or
the public REST API (workloadmanager.googleapis.com/v1).
protocols, private service backends, or undocumented discovery mechanisms.
They are not supported for public integrations and will fail.
gcloud workload-managerCLI command group. Use gcloud only for authentication, IAM role
assignment, and fetching raw REST tokens.
authentication or Workload Manager API calls fail in sandboxed or restricted
environments (e.g., due to Context Aware Access token blocks, missing API
enablement, or
mock resources returning 404/403), immediately fall back to presenting
example code and static findings from your references instead of entering
retry loops. Present the correct client library code structure or REST API
payload example, clearly explain the auth or resource limitation, and list
typical rules or mock findings statically to satisfy the request.
gcloud services enable workloadmanager.googleapis.com --quiet
using client libraries:
gcloud auth application-default login
your project (mandatory for API/client library usage, see
IAM & Security).
roles/workloadmanager.viewer for read-only access to evaluation resources
and use roles/workloadmanager.evaluationAdmin or
roles/workloadmanager.admin only when creating, updating, running, or
deleting evaluations.
Use the Python client library for the first working automation path:
python3 -m pip install --upgrade google-cloud-workloadmanager
from google.cloud import workloadmanager_v1
project_id = "PROJECT_ID"
location = "LOCATION"
parent = f"projects/{project_id}/locations/{location}"
client = workloadmanager_v1.WorkloadManagerClient()
rules = client.list_rules(
request=workloadmanager_v1.ListRulesRequest(
parent=parent,
evaluation_type=workloadmanager_v1.Evaluation.EvaluationType.OTHER,
)
)
for rule in rules.rules:
print(rule.name, rule.display_name, rule.severity)
scanned resources, supported workload types, and API shape.
general best-practice posture checks, OTHER evaluation guidance, custom
Rego rules, and scale/automation patterns.
library examples for listing rules, creating evaluations, running
evaluations, and reading findings.
Workload Manager API and operations polling.
service-specific gcloud workload-manager command group; use gcloud only
for auth, IAM, API enablement, and REST tokens.
Workload Manager MCP server; use client libraries or REST API instead.
only for adjacent prerequisites such as API enablement, IAM, BigQuery export
datasets, and KMS keys. This is not Workload Manager resource management.
least-privilege guidance, service agents, data handling, and CMEK notes.
If product behavior or API fields are not covered here, check the current
Workload Manager product documentation and client library reference before
implementing.
search_documents tool.Take google/workload-manager-basics from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip.
Without those the skill loads but fails at the first command.