Configures Cloudflare DNS parent zone records for a Portal relay: NS delegation, glue A/AAAA records, and DS record for DNSSEC. Verifies delegation and DNSSEC from public resolvers.
Ships in portal-relay. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Cloudflare is the parent DNS provider here, not the host. The relay serves its own subdomain from embedded DNS; this skill writes only the parent-zone records that point to it. Follow ../portal-relay/references/provider-contract.md (the portal-relay skill's contract in this same plugin; the path is relative to this file, so it matches the installed version and needs no network) for the phase order, credential rules, and approval rules. Take the record layout and DNSSEC facts from portal-relay and the Embedded DNS reference.
For relay domain relay.example.com in Cloudflare zone example.com:
| Type | Name | Content | When |
|---|---|---|---|
NS | relay.example.com | ns.relay.example.com | Delegation |
A | ns.relay.example.com | relay public IPv4, DNS only | Glue, when IPv4 is reachable |
AAAA | ns.relay.example.com | relay public IPv6, DNS only | Glue, when IPv6 is reachable |
DS | relay.example.com | key tag, algorithm, digest type, digest from the relay startup log | After the delegation resolves |
Change nothing else. If any other record already exists at relay.example.com or below it, stop and show it: Cloudflare cannot keep other records at a delegated name, and removing them is a separate decision. Glue records must not be proxied.
Cloudflare cannot delegate a subdomain of a zone on a partial (CNAME) setup. Glue at the registrar is needed only when the relay domain is the registered domain itself, which this layout avoids.
Zone - DNS - Edit (add Zone - Zone - Read only if the zone ID must be looked up), and to put it in this environment as CLOUDFLARE_API_TOKEN through a secret store or protected session, not in chat, files in the repository, or a command line.curl -fsS -H @<(printf 'Authorization: Bearer %s\n' "$CLOUDFLARE_API_TOKEN") https://api.cloudflare.com/client/v4/.... Never echo the variable.GET /user/tokens/verify (account-owned tokens use GET /accounts/<account_id>/tokens/verify), then find the zone with GET /zones?name=example.com and read its DNSSEC state with GET /zones/<zone_id>/dnssec.This skill runs in two parts at two points of the portal-relay workflow:
Return to portal-relay after each part.
GET /zones/<zone_id>/dns_records?name=<name>&type=<type> for each row of the table. Decide one action per row and show the plan with current values:
create with POST /zones/<zone_id>/dns_records.data, or proxied: true on glue): update with PATCH /zones/<zone_id>/dns_records/<id> on that same id. Never delete and re-create it.no-op. Send no request.id (from the read for an update, from the POST response for a create), the action, and for an update the full previous record (type, content or data, ttl, proxied).POST and PATCH: {"type": "NS", "name": "relay.example.com", "content": "ns.relay.example.com"} and {"type": "A", "name": "ns.relay.example.com", "content": "<ip>", "proxied": false} (AAAA likewise).dig @<cloudflare NS of the zone> relay.example.com NS +norec lists ns.relay.example.com with the glue address. Then return to portal-relay for Deploy.dig @<relay IP> relay.example.com SOA answers, then apply the DS action with the same create / update / no-op rule and the body {"type": "DS", "name": "relay.example.com", "data": {"key_tag": <tag>, "algorithm": 13, "digest_type": 2, "digest": "<hex>"}}, copying every field exactly from the relay's ds_record log line. That line is in zone-file form, relay.example.com. <ttl> IN DS <key tag> <algorithm> <digest type> <digest>; the embedded DNS uses algorithm 13 and digest type 2. A DS only builds a chain of trust when DNSSEC is active on the Cloudflare zone; if it is not, report that and let the user decide whether to enable it.After Part B, return to portal-relay at Verify. Publishing a DS for a zone that does not answer yet makes validating resolvers fail for the whole subdomain.
dig +short NS relay.example.com @1.1.1.1 returns ns.relay.example.com, and dig +short A ns.relay.example.com @1.1.1.1 returns the relay address.dig @<relay IP> relay.example.com SOA answers from the relay itself.dig +dnssec relay.example.com SOA @1.1.1.1 has the ad flag, and dig DS relay.example.com @1.1.1.1 matches the log. Allow for record TTLs before calling a check failed.Report each record with its action and previous value, and the DNSSEC state of the parent zone.
Rollback uses the saved rollback record, never a blanket delete:
DELETE /zones/<zone_id>/dns_records/<id>.PATCH the same id back to its saved previous value. Do not delete it; the old delegation or glue may still be in use.Keep DNSSEC safe while rolling back. Undo the DS first: delete a created DS, or restore an updated DS to its previous value. Then undo the NS and glue changes. If the restored DS does not match the key that the restored NS target serves, say so and do not restore both blindly; a DS that points to the wrong key breaks validation for the whole subdomain, and so does a DS left in place after its NS is removed.
Portal can also use Cloudflare as its ACME DNS provider (ACME_DNS_PROVIDER=cloudflare with CLOUDFLARE_TOKEN) instead of embedded DNS. That is a relay configuration choice with different records, covered by the configuration reference, not by this skill.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/portal-relay:portal-relay-cloudflarefrom portal-relay
npx claudepluginhub gosuda/portal-tunnel --plugin portal-relay7 skills in this plugin
/portal-relaySet up and run a public Portal relay on any Linux host with a public IP — Docker Compose deployment, embedded authoritative DNS with one-time NS delegation, optional TCP/UDP lease ports for game hosting, and registration in the public relay pool. Use when the user asks to run their own relay, contribute a relay to the Portal network, self-host a relay instead of using public ones, or open a relay with game-server support. Do not use for exposing a local service (portal-expose), reaching a published service as a client (portal-connect), or for accessing a CLI agent remotely. Administration of a running relay is portal-relay-admin, and failure diagnosis is portal-relay-diagnose./portal-relay-adminOperate a running Portal relay through its admin and policy API - sign in with the relay ADMIN_TOKEN without exposing it, list leases and their approval state, approve, deny, ban, or rate-limit one identity, switch approval mode between auto and manual, change UDP and TCP lease limits, and read admin metrics. Use when the user runs a Portal relay and asks to approve or deny a tunnel, ban an identity, throttle a lease, change approval mode or lease limits, or check who is connected. Do not use for first deployment (portal-relay), for failure diagnosis (portal-relay-diagnose), or for exposing an app (portal-expose)./portal-relay-awsCreate an AWS host for a Portal relay - an EC2 instance with a security group and an Elastic IP, or a Lightsail instance with its public ports and a static IP - using the user's existing AWS CLI profile or IAM Identity Center sign-in, and hand the host to portal-relay for deployment. Use when the user wants to run a Portal relay on AWS, EC2, or Lightsail. Do not use for a host that already exists (portal-relay), for Route 53 as the relay's ACME DNS provider (relay configuration), or for other clouds./portal-relay-diagnoseFind which layer of a self-hosted Portal relay is failing - container and process, open ports, embedded DNS and NS/glue delegation, DNSSEC and the parent DS, TLS and SNI routing, the QUIC UDP backhaul and TCP/UDP lease ports, or approval and source policy - with bounded read-only checks, then report the cause and the fix. Use when a relay operator says the relay, its DNS, its certificates, its tunnels, or its game ports do not work. Do not use when the user is a publisher or visitor of one tunnel (portal-expose or portal-connect), for approving or banning leases (portal-relay-admin), or for first deployment (portal-relay)./portal-relay-hetznerCreate a Hetzner Cloud server for a Portal relay with the hcloud CLI, attach a Hetzner Cloud Firewall that opens only the relay ports, keep a stable primary IPv4, and hand the host to portal-relay for deployment. Use when the user wants to run a Portal relay on Hetzner Cloud. Do not use for a server that already exists (portal-relay), for DNS changes at Cloudflare (portal-relay-cloudflare), or for Hetzner Robot dedicated servers./portal-relay-oracleCreate an Oracle Cloud Infrastructure (OCI) compute instance for a Portal relay, including Always Free Ampere A1 shapes, open the VCN and host firewall for the relay ports, attach a stable public IP, and hand the host to portal-relay for deployment. Use when the user wants to run a Portal relay on Oracle Cloud or OCI, or asks to use an Oracle free-tier VM as a relay. Do not use for a host that already exists (portal-relay), for DNS changes at Cloudflare (portal-relay-cloudflare), or for other clouds.Other plugins' skills for the same job