executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
headscale-node-lifecycleManage the full lifecycle of nodes in a Headscale tailnet — generate pre-authenticated keys, register, approve, tag, list, and decommission nodes. Use when adding new devices, generating auth keys for automation, or managing node inventory.
Independent GitHub snapshot · Automated classification · Original documentation governs
Headscale manages nodes in a tailnet with two identity models:
yourname@domain). The node key is tied to that user's identity.tagged-devices user (created automatically by Headscale). These nodes are identified by one or more tags (e.g. tag:webserver, tag:monitoring) and are typically used for infrastructure service nodes.Registration happens through:
headscale commands or REST API callsAuth keys streamline automated node registration. Key attributes:
| Parameter | Description |
|---|---|
| Expiration | Default: 1 hour. Use 0 for no expiry (not recommended). |
| Reusable | Single-use by default. Mark reusable for fleet provisioning. |
| Ephemeral | Ephemeral nodes are removed from the tailnet when they disconnect. Perfect for CI runners and ephemeral workloads. |
| Tags | Assign tags to create a tagged node automatically. |
tailscale up --auth-key=<key> on the device → approve in Headscale if registration is open.--tags → run tailscale up --auth-key=<key> → the node is auto-approved and tagged.List nodes filtered by user, tag, or online status. Output includes:
Tags can be added or replaced on existing nodes. Tags always carry the tag: prefix in Headscale. When adding tags, existing tags are preserved unless --replace is specified.
To decommission a node permanently:
headscale nodes delete -i <node-id>
Or via the REST API: DELETE /api/v1/node/<node-id>
Decommissioning is irreversible. For ephemeral nodes, disconnection alone is sufficient — the server removes them automatically.
| Variable | Description |
|---|---|
HEADSCALE_URL | Base URL of the Headscale server (e.g. https://headscale.example.com) |
HEADSCALE_API_KEY | API key from headscale apikeys create |
Both env vars are required for API-based operations when the headscale CLI is not available on PATH.
tagged-devices user. Do not try to assign them to a personal user.Connected: true) to test connectivity. Offline nodes do not respond to ping/ICMP within the tailnet.--ephemeral means the node is fully removed on disconnection — there is no record of it in the tailnet afterward.Create pre-authenticated keys via Headscale CLI or REST API.
hs-create-authkey.sh --user <user> --tags <tag> --expiration <duration> --reusable --ephemeral [--json] [--dry-run]
List all nodes in the tailnet with status and metadata.
hs-list-nodes.sh [--json] [--user <user>] [--tag <tag>] [--online-only]
Approve pending node registrations.
hs-approve-nodes.sh [--all] [--auth-id <id>] [--dry-run] [--json]
Update tags on an existing node.
hs-tag-node.sh --node <id/name> --tags <tag1,tag2> [--replace | --add] [--dry-run] [--json]
Do not use this skill for installing or configuring the Tailscale client (load tailscale-client instead) or for ACL/policy authoring (load tailnet-policy). It covers node registration, tagging, listing, and decommissioning only.