agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when diagnosing network failures: connection refused, timeouts, TLS errors, DNS problems, and intermittent failures. Covers layer-by-layer isolation and the tools that answer each question.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill network-troubleshooting --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/network-troubleshootingContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when diagnosing network failures: connection refused, timeouts, TLS errors, DNS problems, and intermittent failures. Covers layer-by-layer isolation and the tools that answer each question.
name: network-troubleshooting description: Use when diagnosing network failures: connection refused, timeouts, TLS errors, DNS problems, and intermittent failures. Covers layer-by-layer isolation and the tools that answer each question. metadata: category: devops version: 1.0.0 tags: [networking, dns, tls, debugging, connectivity]
Isolate a network failure to a specific layer instead of guessing. Nearly every network problem is DNS, TLS, a firewall, or a timeout — and each has a distinct signature that identifies it in seconds.
1. **Read the error precisely** — "Connection refused" means something is listening but rejecting, or nothing is there and the host answered. "Timeout" means nothing answered at all — usually a firewall dropping packets silently. These have completely different causes. 2. **Resolve the name** — `dig +short host`. If DNS is wrong or slow, nothing downstream matters. Check the resolver being used, not just your laptop's. 3. **Open a socket** — `nc -vz host port`. This separates "the network path is blocked" from "the application is broken", which is the single most valuable distinction available. 4. **Complete the handshake** — `openssl s_client -connect host:443 -servername host`. Certificate chain, expiry, and SNI problems all surface here. 5. **Make the request** — `curl -v`. Now, and only now, are you debugging the application. 6. **For intermittent failures, look at exhaustion** — Connection pools, ephemeral ports, conntrack tables, and DNS caches. Intermittent almost always means "a limit is being hit under load".
**Layer-by-layer isolation, run from inside the failing pod:**
# 1. DNS — does the name resolve, and to what? dig +short api.internal.example.com # empty -> DNS failure. Check the resolver, the search path, the record itself. # 10.0.4.17 -> continue. # 2. TCP — is the path open at all? nc -vz 10.0.4.17 8443 # "succeeded" -> the path is open; the problem is above TCP. # "Connection refused" -> reachable host, nothing listening on that port. # hangs, then times out -> a firewall/security group/NACL is dropping. This is # the most common cloud networking failure. # 3. TLS — does the handshake complete, and is the chain valid? openssl s_client -connect 10.0.4.17:8443 -servername api.internal.example.com </dev/null 2>&1 \ | grep -E "Verify return code|subject=|issuer=|NotAfter" # "unable to get local issuer certificate" -> missing intermediate, or the client # lacks the CA bundle. # "certificate has expired" -> it is 3am and it is the certificate. # 4. HTTP — only now is it an application problem. curl -v --max-time 5 https://api.internal.example.com/healthz
**Intermittent failure that is actually exhaustion:**
# Symptom: ~4% of outbound calls fail with "cannot assign requested address" # under load, and never in staging. ss -s # TCP: 28901 (estab 210, closed 28180, timewait 28180/0) # ^^^^^ ephemeral ports exhausted by TIME_WAIT # Cause: a new HTTP client per request, so no connection reuse. Every request # opens and closes a socket, and each lingers in TIME_WAIT for 60 seconds. # Fix: a single client with keep-alive and a connection pool. Not a kernel tunable.
A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…