portal-relay-diagnose

portal-relay-diagnose is a skill for Claude Code, Codex from gosuda/portal-tunnel. It costs 149 tokens per session (1,410 once invoked), scanned B, original, MIT.

A troubleshooting guide for a self-hosted Portal relay, a relay the operator runs on their own server. It checks the service, containers, network ports, DNS, DNSSEC, TLS, QUIC, and access policies in order using read-only tests.

In plain words
What is it for?
Use it to investigate stopped containers, occupied ports, DNS or DNSSEC errors, certificate and routing problems, connection backhaul failures, and approval-policy issues.
Why use it?
It narrows a failure to the first broken layer instead of treating every symptom as a separate problem. It avoids restarting or changing the relay during diagnosis.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the portal-relay plugin — 6 skills shipped together

Good fit Use it to investigate stopped containers, occupied ports, DNS or DNSSEC errors, certificate and routing problems, connection backhaul failures, and approval-policy issues.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gosuda/portal-tunnel/portal-relay-diagnose
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 gosuda/portal-tunnel --skill portal-relay-diagnose
Clone the repo
git clone --depth 1 https://github.com/gosuda/portal-tunnel

Made for: Claude Code, Codex.

Or install portal-relay, the plugin that ships this one along with the rest of its 6 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 portal-relay-diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/gosuda/portal-tunnel/portal-relay-diagnose/github.svg)](https://agentmods.dev/skills/gosuda/portal-tunnel/portal-relay-diagnose)
Your own site
<a href="https://agentmods.dev/skills/gosuda/portal-tunnel/portal-relay-diagnose"><img src="https://agentmods.dev/badge/skills/gosuda/portal-tunnel/portal-relay-diagnose/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 portal-relay-diagnose

Your own site · 80×15
<a href="https://agentmods.dev/skills/gosuda/portal-tunnel/portal-relay-diagnose"><img src="https://agentmods.dev/badge/skills/gosuda/portal-tunnel/portal-relay-diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,410 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00149 $0.01410
Opus 5.5 $0.00060 $0.00564
Sonnet 5.5 $0.00030 $0.00282
Haiku 4.5 $0.00015 $0.00141

Measured 9d ago against content hash 926e79959735, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

portal-relay-diagnose scanned grade B with 2 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.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- `sudo ss -tulpn | grep -E ':(443|53) '`: the relay owns `443/tcp`, `53/tcp`, `53/udp`, and `443/udp` when UDP leases are on. Another process on `53` is often `systemd-resolved`.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Work from the bottom layer up and stop at the first layer that fails: a DNS check means nothing while the container is down. Every check here is read-only and bounded (`curl --max-time 10`, `dig +time=3 +tries=1`, `--tai
plugins/portal-relay/skills/portal-relay-diagnose/SKILL.md · 64 lines

How it starts

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

Diagnose a Portal relay

Work from the bottom layer up and stop at the first layer that fails: a DNS check means nothing while the container is down. Every check here is read-only and bounded (curl --max-time 10, dig +time=3 +tries=1, --tail 200 on logs). Do not restart, recreate, or reconfigure anything during diagnosis; propose the fix and let the operator approve it.

Run checks from two places when possible, because a check on the relay host passes through no cloud firewall:

  • Host: a shell on the relay machine.
  • Outside: any other network, for example the agent's own environment.

Say which place each result came from.

1. Process and container (host)

  • docker compose ps portal is running and not restarting.
  • docker compose logs portal --tail 200: look for bind errors (address already in use on 443 or 53), permission denied on IDENTITY_PATH (the image runs as uid/gid 65532), embedded DNS start failures, and the ds_record line.
  • sudo ss -tulpn | grep -E ':(443|53) ': the relay owns 443/tcp, 53/tcp, 53/udp, and 443/udp when UDP leases are on. Another process on 53 is often systemd-resolved.

2. Ports (outside)

  • curl -fsS --max-time 10 https://<relay>/api/healthz. A timeout with the container healthy points to a cloud firewall or host firewall, not to Portal.
  • dig +time=3 +tries=1 @<relay IP> <relay domain> SOA and the same with +tcp: one passing and one failing means only one of 53/udp and 53/tcp is open.
  • Compare with the provider's firewall rules. OCI images also reject inbound in host iptables; Lightsail and Hetzner use their own firewalls in front of the host.

3. DNS delegation (outside)

  1. dig @<relay IP> test.<relay domain> A answers: the embedded DNS works.
  2. dig +short NS <relay domain> @1.1.1.1 returns ns.<relay domain>, and dig +short A ns.<relay domain> @1.1.1.1 (and AAAA) returns the relay address: the parent delegation and glue are right.
  3. If 1 passes and 2 fails, the problem is at the parent zone: a missing NS, a wrong glue address (common after a public IP changed), a proxied glue record, or propagation still in progress. Read the parent's records with dig @<parent NS> <relay domain> NS +norec.
  4. An empty AAAA on an IPv4-only relay is expected.

Read the full file on GitHub · 64 lines

Files

What ships with it

1 file 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 Changed 926e79959735
  2. 21d ago First seen · 64 lines · 149 tokens per session scan B 265c39d886bb

Subscribe to this mod's changes

portal-relay-diagnose is a skill published in the GitHub repository gosuda/portal-tunnel (304 stars, last pushed today), licensed MIT. It adds 149 tokens to every session and 1,410 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-09.

Related

portal-relay-diagnose compared with skills from other repositories

portal-relay-diagnose next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
portal-relay-diagnosegosuda/portal-tunnelSkill304todayMITB149Claude Code, Codex
gke-kueue-troubleshootinggoogle/skillsSkill25ktodayApache-2.0A253Claude Code, Codex
smoke-testgarrytan/gbrainSkill34ktodayMITA79Claude Code
competition-container-runtimezhaoxuya520/reverse-skillSkill46k16d agoMITA109Codex
fastgen-runtimeNVIDIA/skillsSkill4.2ktodayApache-2.0A55Claude Code, Codex
aks-troubleshootingmicrosoft/skillsSkill3.3ktodayMITA221Claude Code
debugging-executionsn8n-io/n8nSkill213ktodaynoneA86Claude Code, Codex