agentleFS
Aidas-devAidas-dev/k8s-agent-skills/skills/tailscale/SKILL.md

tailscale

Skill4 starsChanged 5 months agoMITView on GitHub

Use when working with Tailscale — mesh VPN, tailnet device discovery, connectivity troubleshooting, subnet routing, or running Tailscale on Talos/Kubernetes. Triggers: tailscale, tailnet, 100.x.y.z IP, ts.net, tailscale status, tailscale ping, MagicDNS.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If ping returns relayed, run tailscale status to check if a direct path exists.

    line 85

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Tailscale

HARD RULE: Always run tailscale status --json before assuming any IP addresses. The tailnet is the source of truth — more authoritative than files, config, or code. Device IPs change, nodes join/leave, routes shift. Status tells you what's actually reachable right now.

Sub-Skills

TaskLoad skillWhat it does
Talos-specific Tailscale integration (system extension, machine config, node IP config, subnet routes)tailscale-talosExtensionServiceConfig, certSANs, kubelet.nodeIP, IP forwarding, static pods, cluster cross-connect
Tailscale CLI — status, ping, up, down, ip(inline, no sub-skill needed)Reference for common diagnostic commands

Decision Flow

  • Need to find a device's current IP? → run tailscale status --json (source of truth, don't guess)
  • Need to check if a peer is online / direct vs relay? → run tailscale status --json
  • Integrating Tailscale into Talos Linux machine config? → tailscale-talos
  • Configuring tailscale in Kubernetes (operator, subnet router, proxy)? → tailscale-talos (K8s section)
  • Debugging connectivity between two devices? → tailscale ping <ip-or-hostname> then tailscale status
  • Managing ACLs, tags, keys via API? → use curl against Tailscale API directly

CLI Reference

tailscale status — Source of Truth

# Human-readable table (default)
tailscale status

# Machine-readable JSON — preferred for automation
tailscale status --json

# Filter to only active peers
tailscale status --active

JSON output structure (tailscale status --json):

FieldDescription
Self.TailscaleIPsIPs of the current machine
Self.DNSNameMagicDNS FQDN of current machine
PeerObject keyed by node key, each entry is a PeerStatus
Peer[HOST].TailscaleIPsArray of IPs for peer
Peer[HOST].DNSNameFQDN like host.tailnet-id.ts.net.
Peer[HOST].OSOperating system string
Peer[HOST].OnlineBoolean — connected to control plane
Peer[HOST].ActiveBoolean — recent traffic (last ~2 min)
Peer[HOST].ExitNodeBoolean — currently selected exit node
Peer[HOST].ExitNodeOptionBoolean — can be exit node
Peer[HOST].RelayDERP relay region if not direct
Peer[HOST].CurAddrCurrent direct endpoint address
Peer[HOST].TagsACL tags applied to node
Peer[HOST].PrimaryRoutesSubnet routes this node advertises
# Extract specific device IP
tailscale status --json | jq -r '.Peer[] | select(.HostName == "myserver") | .TailscaleIPs[0]'

# Map all hostnames to IPs
tailscale status --json | jq -r '[.Self] + [.Peer[]] | sort_by(.DNSName) | map({(.DNSName | split(".")[0]): (.TailscaleIPs[0])}) | add'

tailscale ip — Device IP

tailscale ip          # Both IPv4 + IPv6
tailscale ip -4       # Only Tailscale IPv4
tailscale ip -6       # Only Tailscale IPv6
tailscale ip <hostname>  # Get specific peer's IP

tailscale ping — Connectivity Test

tailscale ping 100.x.y.z          # Ping by Tailscale IP
tailscale ping hostname           # Ping by MagicDNS name
tailscale ping --c 5 --until-direct 100.x.y.z  # Wait for direct connection

If ping returns relayed, run tailscale status to check if a direct path exists. --until-direct waits up to 5s for a direct path to establish.

tailscale up — Join/Auth

tailscale up                               # Authenticate interactively
tailscale up --authkey tskey-auth-xxx      # Auth key for automation
tailscale up --accept-routes               # Accept subnet routes
tailscale up --advertise-routes 10.0.0.0/16  # Advertise subnet
tailscale up --advertise-exit-node         # Act as exit node
tailscale up --hostname mynode             # Custom tailnet hostname
tailscale up --reset                       # Reset state, re-auth

Other Useful Commands

tailscale down                                     # Disconnect from tailnet
tailscale logout                                   # Log out, invalidate key
tailscale switch --list                            # List available profiles
tailscale switch <profile>                         # Switch Tailscale profile
tailscale serve                                    # Expose local service via tailnet
tailscale funnel                                   # Expose to internet via tailnet
tailscale netcheck                                 # NAT/direct connection diagnostics
tailscale version                                  # Show version

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.