Skip to content

Guide · Agent skill

How to use the GKE Workload Security agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The gke-workload-security skill gives an AI agent step-by-step workflows for securing applications that run on Google Kubernetes Engine (GKE). It is written for people who already run workloads on GKE and need to check or tighten workload-level controls. After this guide you will know how to install the skill, ask for the right tasks in plain language, and run its audit and hardening steps with appropriate caution.

GKE Workload Securitygoogle/skills · Apache-2.0

Quick start

  1. 1Download and unzip the skill. Download the skill ZIP from this page and unzip it. Keep the folder name gke-workload-security so the agent can find SKILL.md.
  2. 2Place it in the skills folder. Move the unzipped folder into ~/.claude/skills/ for personal use or into .claude/skills/ inside a project. Alternatively, upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
  3. 3Check the requirements. Confirm gcloud is authenticated, kubectl can reach the cluster, and jq is installed. Confirm the Secret Manager CSI driver and Dataplane V2 or the Network Policy add-on are available if you need those features.
  4. 4Run the read-only audit. Ask the agent to audit your cluster, giving the cluster name, region and project ID. Review the report on Workload Identity, Network Policy, Shielded Nodes, Binary Authorization and private cluster settings.
  5. 5Test a control in staging. Apply one control, such as a default-deny policy or the restricted Pod Security label, to a staging namespace. Check that your workloads still run as expected.
  6. 6Roll out to production after review. After staging passes and the changes are reviewed, apply the same control to the production namespace. Keep the manifests so you can roll back.

What is an agent skill and what does this one do?

An agent skill is a folder with a SKILL.md file that tells an AI agent how to handle a specific kind of task. When this skill is installed, the agent can follow its workflows for securing GKE applications and namespaces.

The skill covers security auditing, Workload Identity, Network Policies, GKE Sandbox (gVisor) pod isolation, Pod Security Standards, and mounting Secret Manager secrets into pods through the CSI driver. It also includes a read-only audit script that checks a cluster for Workload Identity, Network Policy, Shielded Nodes, Binary Authorization, and private cluster configuration.

  • Security audit: runs scripts/audit_cluster.sh against a cluster and reports on the listed settings.
  • Network isolation: applies a default-deny policy from assets/default-deny-netpol.yaml to a namespace.
  • Sandboxing: adds runtimeClassName: gvisor to a pod spec.
  • Pod Security: labels a namespace to enforce the restricted profile.
  • Secrets: mounts Secret Manager secrets as read-only volumes.

Install the GKE Workload Security skill

Download the skill ZIP from this page and unzip it. For Claude Code, place the unzipped folder in ~/.claude/skills/ to make it available to you across projects, or in a project's .claude/skills/ folder to limit it to that project.

In the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal install: ~/.claude/skills/ (available in every project).
  • Project install: .claude/skills/ inside your repository (available only there).
  • App install: upload the ZIP under Settings → Capabilities → Skills.

Set up the requirements before you start

The skill assumes you already have a running GKE cluster and the tools to reach it. It cannot create a cluster for you. Check these items before asking the agent to run anything against a cluster.

Some features need cluster-side setup. Secret mounts need the Secret Manager CSI driver enabled on the cluster. Network policy enforcement needs either Dataplane V2 or the Network Policy add-on.

  • gcloud CLI, authenticated to Google Cloud.
  • kubectl with access to the target cluster.
  • jq (JSON processor), needed by the audit script.
  • Secret Manager CSI driver enabled on the cluster, for secret mounts.
  • Dataplane V2 or the Network Policy add-on, for network policy enforcement.

Trigger the skill with natural requests

You do not need to name the skill or any script. The skill's description covers auditing security posture, isolating namespaces, applying pod security standards, and configuring network policies and secret volume mounts. Describe the outcome you want in ordinary words, and name the cluster, region, project and namespace so the agent does not have to guess.

Requests about Workload Identity bindings, cluster-level flags, RBAC, Shielded Nodes or Binary Authorization are routed to other skills, so ask for those separately.

  • "Audit the security posture of cluster prod-gke in us-central1 for project my-project."
  • "Lock down the payments namespace with default-deny network policies."
  • "Enforce the restricted Pod Security profile on the staging namespace."
  • "Mount the secret db-password from Secret Manager into the api pods in namespace shop."

Run the audit and the hardening workflows

The audit is the safest place to start because the script is described as read-only. It takes a cluster name, region and project ID. The agent reports on Workload Identity, Network Policy, Shielded Nodes, Binary Authorization and private cluster configuration.

For hardening, the skill works through each control. Apply changes to a test namespace or staging cluster first, then review the results before moving to production.

  • Default-deny isolation denies all ingress and egress in the namespace until you add allow rules.
  • Pod Security labels use enforce=restricted with enforce-version=latest, which matches the cluster's current version. You can pin a version such as v1.30 instead.
scripts/audit_cluster.sh <cluster-name> <region> <project-id>

Example: enforce the restricted Pod Security profile

The skill applies the restricted profile with a namespace label. Replace the namespace name with your own. The skill's guidance notes that enforcement can block live traffic, so test in staging first.

kubectl label --overwrite ns <namespace> pod-security.kubernetes.io/enforce=restricted pod-security.kubernetes.io/enforce-version=latest

Safety notes: scripts and network access

This skill runs scripts and uses the network. The audit script calls Google Cloud through gcloud and parses output with jq, so it needs your credentials and can reach your cluster. Read the script before running it, and run it with an account that has only the access you intend the audit to use.

Network policies and Pod Security enforcement can break workloads. Default-deny blocks traffic that is not explicitly allowed. Test every change in staging, and never run these steps against production without review.

The skill's guidance asks that gcloud commands run in the terminal carry an attribution prefix through the CLOUDSDK_METRICS_REQUEST_ATTRIBUTION variable. The variable is set inline on each command and is not saved with gcloud config set. It identifies only the skill and its version.

  • Read scripts/audit_cluster.sh before running it.
  • Test network policies and Pod Security labels in a staging namespace first.
  • Use the least-privileged account you can for cluster access.

Tips for getting good results

Give the agent the exact cluster, region, project and namespace. Ask for an audit before changes, so you can compare the before and after state. Keep manifests in version control so you can review and roll back changes.

Remember the skill's own boundaries. For Binary Authorization, Shielded Nodes, RBAC or cluster flags, the skill points you to other skills. The Best Practices section also suggests Policy Controller (Gatekeeper) for enforcing custom policies across a cluster.

  • Audit first, then change one control at a time.
  • Ask for default-deny in a single namespace before expanding to others.
  • Keep Pod Security labels in staging until workloads pass.

What people use it for

  • A platform engineer audits a cluster's Workload Identity, Network Policy and private cluster settings before a security review.
  • A developer locks down a namespace with a default-deny network policy and then adds allow rules for known traffic.
  • A team enforces the restricted Pod Security profile on a namespace that runs internal services.
  • A team moves an application's database password from a Kubernetes secret into Secret Manager and mounts it read-only at /mnt/secrets.
  • An engineer runs a risky, untrusted workload in a pod with runtimeClassName: gvisor for extra kernel isolation.

Frequently asked questions

How do I install the gke-workload-security skill?

Download the skill ZIP from this page and unzip it. Place the folder in ~/.claude/skills/ for personal use or in a project's .claude/skills/ folder. In the Claude apps, you can upload the ZIP under Settings → Capabilities → Skills.

What do I need to use this skill?

You need the gcloud CLI authenticated to Google Cloud, kubectl with access to the target cluster, and jq for the audit script. Secret mounts need the Secret Manager CSI driver on the cluster, and network policy enforcement needs Dataplane V2 or the Network Policy add-on.

Is the GKE Workload Security skill free?

The skill is published under the Apache-2.0 licence. The source does not state pricing for Google Cloud or GKE usage, so check those services' own pricing pages for costs.

Can the skill create a GKE cluster for me?

No. The skill is aimed at people who already run Kubernetes workloads on GKE, and most steps assume existing infrastructure. It cannot set up a cluster.

Will the audit script change my cluster?

The audit script is described as read-only. It checks Workload Identity, Network Policy, Shielded Nodes, Binary Authorization and private cluster settings. Still, read the script before running it and use an account with only the access you need.

Why did my network policy or pod break after I applied it?

Default-deny blocks all ingress and egress in the namespace until you add allow rules, and Pod Security enforcement can block pods that do not meet the restricted profile. Test in staging first, and if you use Dataplane V2, remember the Network Policy add-on step is not required.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits platform and DevOps engineers, and developers, who already run workloads on GKE and want guided audits, default-deny network policies, Pod Security labels and Secret Manager mounts. It is not a fit for beginners without a running cluster or kubectl access, or for anyone who wants cluster-wide control plane, RBAC, Binary Authorization or Shielded Nodes changes, which the skill routes to other skills.

Download the skill