alivirgo/Major-AI-Skills / plugins/mas-desktop-ops/skills/tailscale
tailscale
FlaggedJoin devices to a Tailscale mesh, advertise subnet/exit routes with IP forwarding and admin approval, tune MagicDNS, and diagnose DERP-relayed vs direct WireGuard paths.
gpt.md
View on GitHub---
title: "Tailscale Mesh VPN AI Skill Guide (GPT & Codex)"
description: "Automate Tailscale join scripts, tagged auth-key flows, ACL/autoApprovers snippets, and CI validators—without inventing credentials."
category: "Zero-Config Mesh VPN & Mesh Networking"
tags: ["tailscale", "subnet-router", "acl", "gpt-codex", "automation"]
---
# Tailscale Mesh VPN AI Skill Guide (GPT & Codex)
## Overview & Engine Architecture
GPT/Codex acts as a **Mesh Network Automation Engineer**: emit **idempotent install/join scripts**, **HuJSON ACL fragments**, **GitHub Actions steps** for ephemeral nodes, and **preflight checks** (`netcheck`, route approval reminders). Credentials are always `$TAILSCALE_AUTH_KEY` / OIDC—never literals.
```
┌─────────────────────────────────────────────────────────────┐
│ Tailscale automation stack │
│ install.sh → tailscale up/set → advertise routes/tags │
│ ACL + autoApprovers → CI policy lint │
│ netcheck/ping gates in smoke tests │
└─────────────────────────────────────────────────────────────┘
```
---
## Operational Capabilities & Agent Directives
1. **Generate sysctl.d + advertise-routes** together; print explicit “approve in Admin Console” unless `autoApprovers` is in the same change.
2. **Prefer tags** for servers (`--advertise-tags=tag:ci`) over user-owned always-on nodes.
3. **Script path checks**: assert `ip_forward=1` before declaring subnet router success.
4. **Emit ACL diffs** as HuJSON with comments; do not invent employee emails—use `group:` / `tag:` placeholders.
5. **Never print auth keys**; accept only env/secret references.
---
## Production Python: require accept-routes hint in README/scripts
```python
"""Fail CI if subnet advertise scripts omit client accept-routes guidance."""
from __future__ import annotations
import re
import sys
from pathlib import Path
NEEDLES = (
re.compile(r"advertise-routes", re.I),
re.compile(r"accept-routes", re.I),
)
def main(path: Path) -> None:
text = path.read_text(encoding="utf-8")
if not NEEDLES[0].search(text):
print(f"{path}: no advertise-routes")
raise SystemExit(0)
if not NEEDLES[1].search(text):
print(f"{path}: advertises routes but never mentions accept-routes")
raise SystemExit(1)
print("subnet script mentions both advertise and accept-routes")
if __name__ == "__main__":
main(Path(sys.argv[1]))
```
---
## Technical Troubleshooting Matrix
| CI/automation signature | Automation check | Script fix |
| :--- | :--- | :--- |
| Job joins but cannot reach LAN | Missing accept-routes on runner | `tailscale set --accept-routes` in workflow |
| Routes pending forever | No autoApprovers / no manual step | Add tagged autoApprovers or human gate |
| DNS flakes in container | accept-dns + minimal image | Document `--accept-dns=false` + quad100 |
| Key expired mid-pipeline | User-owned node | Switch to tagged auth key |
---
## Agent Operational Directive
> **MANDATORY**: Automate advertise + approval path + client accept-routes. Persist forwarding via sysctl.d. Never emit Tailscale auth key literals. Prefer tags for non-interactive nodes.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |