networkpolicy-debug

A Kubernetes troubleshooter for NetworkPolicy rules that block traffic between pods or from pods to outside services. NetworkPolicy is a Kubernetes access-control system for network connections.

In plain words
What is it for?
Use it when pod connections time out, DNS stops working, or traffic works from some pods but not others after a policy change.
Why use it?
It identifies which policies affect a pod and whether ingress, egress, or DNS traffic is being denied. This helps distinguish policy problems from separate DNS, Service, or Ingress issues.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/scitix/siclaw/networkpolicy-debug
Any agent
npx skills add scitix/siclaw --skill networkpolicy-debug
Clone the repo
git clone --depth 1 https://github.com/scitix/siclaw

Made for: Claude Code, Codex.

Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,923 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00048 $0.03923
Opus 5 $0.00024 $0.01962
Sonnet 5 $0.00010 $0.00785
Haiku 4.5 $0.00005 $0.00392

Measured 2d ago against content hash 1cb5c285db8c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

networkpolicy-debug scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/core/networkpolicy-debug/SKILL.md · 333 lines

How it starts

The opening of the file, as written. The whole thing — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.

NetworkPolicy Connectivity Diagnosis

When pod-to-pod or pod-to-external communication is unexpectedly blocked, and Service/DNS/Ingress diagnostics show no issues, NetworkPolicy is a common root cause. Follow this flow to identify whether a NetworkPolicy is blocking traffic.

Scope: This skill is for diagnosis only. Once you identify the root cause, report it to the user and stop. Do NOT attempt to modify or delete NetworkPolicies — that should be left to the user or cluster administrator.

When to use: Pod connectivity "suddenly broke" or a newly deployed pod cannot reach other services. Typical clues:

  • service-debug shows endpoints exist and ports match, but connections time out
  • dns-debug shows DNS timeouts (may be egress NetworkPolicy blocking UDP 53)
  • Traffic works from some pods but not others in the same namespace
  • A new NetworkPolicy was recently applied

Not for other network issues: If the problem is DNS resolution → use dns-debug. If the problem is Service having no endpoints → use service-debug. If the problem is Ingress routing → use ingress-debug. This skill specifically diagnoses NetworkPolicy-level blocking.

Key Concepts

  • A NetworkPolicy selects pods via podSelector and defines allowed ingress (incoming) and/or egress (outgoing) traffic rules.
  • NetworkPolicy is deny-by-default once applied. If any NetworkPolicy selects a pod for a given direction (ingress or egress), all traffic in that direction is denied EXCEPT what is explicitly allowed by the rules. Pods with NO NetworkPolicy selecting them allow all traffic.
  • Multiple NetworkPolicies selecting the same pod are additive (union) — a connection is allowed if ANY matching policy permits it.
  • NetworkPolicy requires CNI support. If the CNI plugin does not support NetworkPolicy (e.g., Flannel without additional plugins), policies are silently ignored — they can be created but have no effect.
  • hostNetwork: true pods are exempt. Pods using the host network namespace are not selected by any NetworkPolicy — neither as targets nor as sources. A default-deny policy does not protect or restrict hostNetwork pods.

Read the full file on GitHub · 333 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 333 lines · 48 tokens per session scan A 1cb5c285db8c

Subscribe to this mod's changes

networkpolicy-debug is a skill published in the GitHub repository scitix/siclaw (230 stars, last pushed 4d ago), licensed Apache-2.0. It adds 48 tokens to every session and 3,923 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.