Agent skill

K8s Network Policy

by automateyournetwork in automateyournetwork/netclaw

Review Kubernetes NetworkPolicies — what is actually permitted to reach a workload, and whether the answer can be trusted.

Apache-2.0Auto-check passedDevOps & Cloud

Install K8s Network Policy

skills CLI
$ npx skills add automateyournetwork/netclaw --skill k8s-network-policy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install automateyournetwork/netclaw k8s-network-policy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/automateyournetwork/netclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/workspace/skills/k8s-network-policy .claude/skills/k8s-network-policy && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
k8s-network-policy
GitHub stars
676
Token cost
~1.5k tokens
SKILL.md length
692 words
Files
1
Skills in repo
120
Repo updated
First seen
Licence
Apache-2.0

At a glance

Review Kubernetes NetworkPolicies — what is actually permitted to reach a workload, and whether the answer can be trusted.

  • Works in 2 steps: No NetworkPolicy means ALL traffic is… → An empty result may mean you could not…
  • Asked what can talk to a pod
  • SKILL.md covers Server, ⚠ Two rules before anything else, The procedure — do this every… and The six reasons you get…, plus 4 more sections
  • Calls kubectl

What it does

K8s Network Policy is an agent skill from automateyournetwork/netclaw. Review Kubernetes NetworkPolicies — what is actually permitted to reach a workload, and whether the answer can be trusted. Use when asked what can talk to a pod, whether a namespace is restricted, why traffic is being blocked, or for any security review of cluster network segmentation.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Container orchestration and Security review. It works with Kubernetes. The repository describes itself as: An AI agent that claws through your network. The licence is Apache-2.0.

When your agent uses it

  • Asked what can talk to a pod
  • Whether a namespace is restricted
  • Why traffic is being blocked
  • For any security review of cluster network segmentation

Example prompts

  • “/k8s-network-policy”

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. No NetworkPolicy means ALL traffic is permitted
  2. An empty result may mean you could not see, not that nothing exists

What it can do on your machine

Read from SKILL.md and the folder at commit aa90e7d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • kubectl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use kubectl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

K8s Network Policy loads about 1.5k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 692 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from automateyournetwork/netclaw at commit aa90e7d, republished under its Apache-2.0 licence (© automateyournetwork). 692 words, ~1,488 tokens.

Download SKILL.mdSave it as .claude/skills/k8s-network-policy/SKILL.md (or your agent's skills folder).
name
k8s-network-policy
description
Review Kubernetes NetworkPolicies — what is actually permitted to reach a workload, and whether the answer can be trusted. Use when asked what can talk to a pod, whether a namespace is restricted, why traffic is being blocked, or for any security review of cluster network segmentation.
version
1.0.0
license
Apache-2.0
tags
kubernetes, k8s, networkpolicy, security, segmentation, audit, cni
user-invocable
true

Kubernetes NetworkPolicy Review

Server

k8s-mcp — vendored third-party (containers/kubernetes-mcp-server v0.0.66, Apache-2.0), a pinned static Go binary. 7 tools, strictly read-only, Secrets denied.

⚠ Two rules before anything else

1. No NetworkPolicy means ALL traffic is permitted

Kubernetes is default-allow. A namespace with zero policies permits everything, in both directions.

So "no policies found" is not a neutral observation — it is a finding, and reporting it without the consequence invites exactly the wrong conclusion. Someone reading "no policies" while thinking about security will hear "nothing to worry about". The opposite is true.

Always say the consequence: "No NetworkPolicy applies to this workload, so all ingress and egress traffic is permitted."

2. An empty result may mean you could not see, not that nothing exists

This is the one that gets people, and this server makes it worse.

Given a credential without cluster-wide list permission, the adopted server does not return an error. It silently rewrites your cluster-wide query to a single namespace and hands back that result with no caveat. Reproduced against a live cluster:

raw kubectl  →  Forbidden: cannot list networkpolicies at the cluster scope
this server  →  success, one policy          ← the cluster actually had two

For a security review that is an audit lie: "no policy restricts this pod" when the truth is "I could not see them".

The procedure — do this every time

Step 1 — confirm scope before you trust anything.

kubectl --kubeconfig $K8S_KUBECONFIG auth can-i list networkpolicies --all-namespaces
  • yes → cluster-wide answers are trustworthy. Proceed.
  • no → stop treating empty results as absence. Any answer you give is namespace-scoped at best, and you must say so explicitly.

The supported deployment uses a dedicated cluster-wide-read ServiceAccount precisely so this returns yes and the narrowing branch never executes. If it returns no, the deployment is misconfigured — say that rather than working around it.

Step 2 — list the policies.

jsonc
resources_list({"apiVersion": "networking.k8s.io/v1", "kind": "NetworkPolicy"})
resources_list({"apiVersion": "networking.k8s.io/v1", "kind": "NetworkPolicy", "namespace": "app1"})

Step 3 — report selectors, policy types and rules, not merely that a policy exists. "There is a policy" tells a reviewer nothing about what is permitted. Give the podSelector, the policyTypes (Ingress/Egress), and the actual from/to rules.

Step 4 — state the scope you actually queried, and which cluster answered. An operator with several clusters must never have to guess.

The six reasons you get nothing back

CauseHow to tellHow to say it
Permission insufficientStep 1 returned no"Scope could not be established — this is not evidence that no policies exist"
Namespace does not existnamespaces_list does not contain it"No such namespace" — not "no policies"
Namespace exists but is emptyit is in namespaces_list"No policies in this namespace, so all traffic there is permitted"
Selector matched nothingyou passed a label selector"No match for <selector>" — and show the selector, so a typo is visible
CRD not installedGVK resolution error"Cilium/Calico policies are not installed on this cluster" — a real error, distinguishable
Cluster unreachabletransport failure"The cluster could not be reached" — never "no policies"

A typo'd selector and a genuine non-match are identical over the wire — both return HTTP 200 with an empty list. Showing the selector you used is the only thing that lets a reader spot the difference.

Show full SKILL.md (201 more words)Show less

Completeness caveat

A namespace-scoped policy list is not a complete picture of what can reach a workload. Policies in other namespaces, and cluster-scoped CRD policies (Cilium CiliumClusterwideNetworkPolicy, Calico GlobalNetworkPolicy), also apply. Say so unless cluster-wide scope was confirmed and CRDs were checked.

Traffic observed is not traffic permitted

kubeshark-traffic shows packets that flowed. This shows what is declared. They answer different questions and are constantly confused:

  • Traffic flowing does not prove a policy permits it — the policy may have been added after.
  • No traffic does not prove a policy blocks it — nothing may have tried.

When both are used, report them as two kinds of evidence, never as one conclusion.

Boundaries

Want to…Use
See actual packetskubeshark-traffic — observed traffic, not declared config
Workload metricsprometheus, grafana
Build a labcontainerlab, gns3, cml
Service/ingress pathk8s-service-path
Pod inventoryk8s-workload-inventory
Change anythingnothing here. Strictly read-only; no mutation is reachable

Rules

  1. Run the Step 1 preflight. An empty result without confirmed scope is not an absence.
  2. Never report "no policies" without "therefore all traffic is permitted."
  3. Show the selector and the scope in every answer.
  4. Say which cluster answered.
  5. Read-only. Secrets are denied and no mutation exists.

© automateyournetwork, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in workspace/skills/k8s-network-policy of automateyournetwork/netclaw.

Open the folder on GitHubat commit aa90e7d

Compare with similar skills

K8s Network Policy next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

K8s Network Policy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
K8s Network Policy this skillautomateyournetwork/netclaw676—~1.5kAutomated safety check: PassApache-2.0
Iac Security ReviewOWASP/secure-agent-playbook188—~694Automated safety check: PassCC-BY-4.0
Infrastructure Auditforefy/.context152—~3.7kAutomated safety check: NotesMIT
Operate Kubernetes Toolchaincyberful/cyberful135—~898Automated safety check: PassAGPL-3.0
Audit Cloud Native Securitycyberful/cyberful135—~852Automated safety check: PassAGPL-3.0
Performing Kubernetes Etcd Security Assessmentmukul975/Anthropic-Cybersecurity-Skills34k—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • Iac Security Review

    OWASP/secure-agent-playbook

    Security review of Infrastructure-as-Code (Terraform, Kubernetes, CloudFormation).

    188 GitHub stars~694 tokensUpdated 15 days ago
    DevOps & CloudAuto-check passed
  • Infrastructure Audit

    forefy/.context

    Comprehensive infrastructure security audit framework for IaC, Docker, Kubernetes, and cloud configurations.

    152 GitHub stars~3.7k tokensUpdated 6 days ago
    DevOps & CloudAuto-check: notes
  • Operate kubectl, kube-bench, Trivy, Prowler, and manifest/runtime evidence for advanced Kubernetes security assessment.

    135 GitHub stars~898 tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Route a cloud-native security audit across effective IAM, infrastructure as code, build and release paths, containers, Kubernetes, serverless workloads, secrets, event sources, and control-plane…

    135 GitHub stars~852 tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Performing Kubernetes Etcd Security Assessment

    mukul975/Anthropic-Cybersecurity-Skills

    Assesses the security posture of the etcd cluster backing Kubernetes: encryption at rest, TLS peer and client transport, access control, backup encryption, and network isolation.

    34k GitHub stars~1.9k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Container Security Hardening

    sickn33/agentic-awesome-skills

    Harden Docker/container images and runtime deployments with secure base images, non-root users, CVE scanning, SBOM/signing, seccomp/AppArmor, and Kubernetes pod security controls.

    47k GitHub starsUsed in 1 repo~1k tokens
    SecurityAuto-check: notes

More from automateyournetwork/netclaw

All 120 skills in this repo
  • EVE-NG Lab Topology Design

    automateyournetwork/netclaw

    Entry point for designing EVE-NG network labs: classifies the request, gathers missing requirements, proposes options and validates the resulting topology.

    677 GitHub stars~612 tokensUpdated today
    Auto-check passed
  • ACI Policy Change Deployment

    automateyournetwork/netclaw

    Deploys Cisco ACI policy changes only behind an approved ServiceNow Change Request, capturing pre and post-change fault baselines and rolling back automatically on a fault delta.

    677 GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Cisco ACI Fabric Health Audit

    automateyournetwork/netclaw

    Runs a phased health audit of a Cisco ACI fabric through MCP tools: node status, links, tenant and policy review, faults and endpoint learning.

    677 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Anta Validation

    automateyournetwork/netclaw

    Validate Arista EOS network state against ANTA's pre-built 208-test catalogue, with structured pass/fail verdicts.

    677 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Arista Cvp

    automateyournetwork/netclaw

    Arista CloudVision Portal (CVP) automation via REST API — device inventory, events, connectivity monitoring, tag management (4 tools).

    677 GitHub stars~2.2k tokensUpdated today
    Auto-check: notes
  • AWS Cloud Monitoring

    automateyournetwork/netclaw

    AWS CloudWatch monitoring — metrics, alarms, log queries, VPC flow log analysis, network performance.

    677 GitHub stars~1k tokensUpdated today
    Auto-check passed

Works with

Questions about K8s Network Policy

What does K8s Network Policy do?

Review Kubernetes NetworkPolicies — what is actually permitted to reach a workload, and whether the answer can be trusted. K8s Network Policy is an agent skill from automateyournetwork/netclaw. Review Kubernetes NetworkPolicies — what is actually permitted to reach a workload, and whether the answer can be trusted.

When should I use K8s Network Policy?

K8s Network Policy fits situations like: asked what can talk to a pod; whether a namespace is restricted; why traffic is being blocked; for any security review of cluster network segmentation.

How do I install K8s Network Policy in Claude Code?

Run `npx skills add automateyournetwork/netclaw --skill k8s-network-policy -a claude-code`. Or copy the skill folder (workspace/skills/k8s-network-policy in automateyournetwork/netclaw) into .claude/skills/k8s-network-policy in your project. Claude Code loads it when a task matches its description.

How do I install K8s Network Policy in Codex?

Run `npx skills add automateyournetwork/netclaw --skill k8s-network-policy -a codex`. Or copy the skill folder (workspace/skills/k8s-network-policy in automateyournetwork/netclaw) into .agents/skills/k8s-network-policy in your project. Codex loads it when a task matches its description.

Can I use K8s Network Policy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add automateyournetwork/netclaw --skill k8s-network-policy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/k8s-network-policy, .gemini/skills/k8s-network-policy, .github/skills/k8s-network-policy and .opencode/skills/k8s-network-policy in your project.

What does K8s Network Policy need to run?

Going by SKILL.md and its folder, K8s Network Policy needs the command-line tools its instructions call (kubectl).

Does K8s Network Policy access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is K8s Network Policy safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does K8s Network Policy use?

K8s Network Policy is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does K8s Network Policy use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to K8s Network Policy?

Skills that share tags, products or a category with K8s Network Policy: Iac Security Review (OWASP/secure-agent-playbook, 188 stars), Infrastructure Audit (forefy/.context, 152 stars), Operate Kubernetes Toolchain (cyberful/cyberful, 135 stars) and Audit Cloud Native Security (cyberful/cyberful, 135 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains K8s Network Policy?

automateyournetwork (a GitHub user) maintains it in automateyournetwork/netclaw, which has 676 GitHub stars. The repository holds 120 skills in this directory. The repository was last updated on October 9, 2026.

Source: automateyournetwork/netclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.