headscale-derp

headscale-derp is a skill for Claude Code from magnus919/agent-skills. It costs 58 tokens per session (1,512 once invoked), scanned A, original, MIT.

A guide to configuring DERP relay servers for Tailscale and Headscale. DERP is a fallback relay used when two devices cannot connect directly.

In plain words
What is it for?
Use it to run embedded or standalone relays, test latency, and diagnose connections that fall back to DERP.
Why use it?
It helps maintain connectivity through restrictive firewalls, complex network address translation, or blocked UDP traffic, while explaining the added latency.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the tailscale plugin — 8 skills shipped together

Good fit Use it to run embedded or standalone relays, test latency, and diagnose connections that fall back to DERP.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magnus919/agent-skills/headscale-derp
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.

Any agent
npx skills add magnus919/agent-skills --skill headscale-derp
Clone the repo
git clone --depth 1 https://github.com/magnus919/agent-skills

Made for: Claude Code.

Or install tailscale, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for headscale-derp

README.md
[![agentmods](https://agentmods.dev/badge/skills/magnus919/agent-skills/headscale-derp/github.svg)](https://agentmods.dev/skills/magnus919/agent-skills/headscale-derp)
Your own site
<a href="https://agentmods.dev/skills/magnus919/agent-skills/headscale-derp"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/headscale-derp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for headscale-derp

Your own site · 80×15
<a href="https://agentmods.dev/skills/magnus919/agent-skills/headscale-derp"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/headscale-derp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,512 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 106
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
How audits are shown
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.1 $0.00058 $0.01512
Opus 5 $0.00029 $0.00756
Sonnet 5 $0.00012 $0.00302
Haiku 4.5 $0.00006 $0.00151

Measured 9d ago against content hash 53a9fd235028, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

headscale-derp 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 9d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/deploy-derp.sh, scripts/derp-health-check.py, scripts/test-derp-latency.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

tailscale/skills/headscale-derp/SKILL.md · 150 lines

How it starts

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

headscale-derp Skill

Overview

DERP = Designated Encrypted Relay Protocol. DERP is Tailscale's TURN-like fallback mechanism used when direct peer-to-peer NAT traversal fails. Traffic through DERP is fully encrypted (WireGuard inside TLS), but it routes through a relay server rather than directly between peers, so it introduces additional latency.

Common scenarios where DERP is used:

  • Symmetric NAT — Both peers behind symmetric NAT gateways
  • Corporate firewalls — Restrictive egress policies that block UDP/STUN
  • Double NAT — Carrier-grade NAT on both sides
  • Blocked STUN — UDP port 3478 is filtered

DERP in Headscale

Headscale includes an embedded DERP server that is enabled by default in the config.yaml:

derp:
  server:
    enabled: true
    region_id: 999
    region_code: "headscale"
    region_name: "Headscale Embedded DERP"
    stun_listen_addr: "0.0.0.0:3478"
    private_key_path: "/var/lib/headscale/derp_server_private.key"

The embedded server runs a STUN endpoint on port 3478 and relays on port 443 (or whatever port Headscale listens on). It's suitable for small tailnets (under ~50 nodes).

Key config options

Option Default Description
derp.server.enabled true Enable the embedded DERP server
derp.server.region_id 999 Numeric region identifier (must be unique across all regions)
derp.urls [] Additional DERP map URLs (for standalone servers)
derp.paths [] Local DERP map JSON file paths
derp.auto_update true Automatically fetch Tailscale's default DERP map
derp.stun_listen_addr 0.0.0.0:3478 STUN listener address

DERP Map

A DERP map is a JSON structure that defines relay regions and nodes. Example:

{
  "Regions": {
    "900": {
      "RegionID": 900,
      "RegionCode": "us-nyc",
      "RegionName": "New York",
      "Nodes": [
        {
          "Name": "900a",
          "RegionID": 900,
          "HostName": "derp-nyc.example.com",
          "DERPPort": 443,
          "STUNPort": 3478,
          "STUNOnly": false
        }
      ]
    }
  }
}

Read the full file on GitHub · 150 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 150 lines · 58 tokens per session scan A 53a9fd235028

Subscribe to this mod's changes

headscale-derp is a skill published in the GitHub repository magnus919/agent-skills (76 stars, last pushed yesterday), licensed MIT. It adds 58 tokens to every session and 1,512 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

routine

Manage CocoRoutine Snowflake task scheduling. Usage: $routine list, $routine schedule --cadence , $routine disable , $routine delete .

Snowflake-Labs/cocoplus · 44 tokens

terraform-expert

Expert-level Terraform infrastructure as code, modules, state management, and production best practices. Use when the user mentions infrastructure as code, devops, or automation, or when the task involves Terraform Basics, Resource Management, Modules, or State Management.

personamanagmentlayer/pcl · 53 tokens

floom

Create, run, and manage Floom AI workers — cloud automations that run on a schedule or a trigger and report back. Reach for this whenever the user wants something to happen repeatedly or in the background rather than a one-off script: a recurring task, "every day / every hour / every week", "schedule this", "run it on…

floomhq/floom · 194 tokens

bridge-health

Quick health check on the bridge daemon (CEO machine + any exec mirrors). Surfaces heartbeat staleness, version drift, active sessions, and the Phase 1 to Phase 2 adoption gate metrics. Use when the dashboard feels stale, the sync-pill is red, the daemon may have crashed, or before a /push-updates that changes daemon…

mishahanin/heading-os · 86 tokens

control-plane-ops

Operar o control-plane local-first do agents-lab com board canônico, long-runs bounded, handoff/checkpoint, rollout/rollback e espelhos externos sem perder governança.

aretw0/agents-lab · 43 tokens

gandi

Gère les domaines, DNS et emails via l'API Gandi v5. Permet de lister les domaines, consulter/modifier les enregistrements DNS, gérer les boîtes mail et configurer les redirections.

RobinBeraud/hermes-skills · 49 tokens