- name
SKILL.md
技能檔案保留在發布者的儲存庫中。
在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add gosuda/portal-tunnel --skill portal-relay-cloudflare -a cursor -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add gosuda/portal-tunnel --skill portal-relay-cloudflare -a claude-code -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add gosuda/portal-tunnel --skill portal-relay-cloudflare -a codex -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add gosuda/portal-tunnel --skill portal-relay-cloudflare -a grok -y在 Grok Bot 聊天中傳送複製的訊息。Bot 會從 GitHub 取得這個 SKILL.md,並加入你所有 Bot 共用的技能中。
Install this skill: https://github.com/gosuda/portal-tunnel/tree/HEAD/plugins/portal-relay/skills/portal-relay-cloudflare來自發布者
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:
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.
Configure a Cloudflare-hosted parent zone for a Portal relay - the NS delegation of the relay subdomain to the relay's embedded DNS, the glue A/AAAA records, and the DS record for DNSSEC - with a zone
---name: portal-relay-cloudflaredescription: Configure a Cloudflare-hosted parent zone for a Portal relay - the NS delegation of the relay subdomain to the…---# plugins/portal-relay/skills/portal-relay-cloudflare/SKILL.md總覽
Configure a Cloudflare-hosted parent zone for a Portal relay - the NS delegation of the relay subdomain to the relay's embedded DNS, the glue A/AAAA records, and the DS record for DNSSEC - with a zone-scoped API token, then verify delegation and DNSSEC from public resolvers. Use when the parent domain of a Portal relay is on Cloudflare DNS and the user wants the delegation or DS record created or checked. Do not use for hosting the relay (Cloudflare is not the VM provider here), for proxying relay traffic through Cloudflare, or for zones that are not on Cloudflare.
常見問題
從發布者下載 plugins/portal-relay/skills/portal-relay-cloudflare/SKILL.md,或複製路徑後開啟儲存庫。PlugMCP 只收錄這項技能,不代管檔案。
發布者將它存放在 https://github.com/gosuda/portal-tunnel。
Claude、Cursor、Codex 和 Grok Build 可以讀取你從發布者儲存庫加入的 SKILL.md。在聊天中傳送技能的 GitHub 資料夾連結,Grok Bot 就會安裝它。