portal-connect

portal-connect is a skill for Claude Code, Codex from gosuda/portal-tunnel. It costs 224 tokens per session (2,760 once invoked), scanned A, original, MIT.

A connection guide for reaching services published through a Portal relay. A relay is a server that forwards traffic to a service on another machine, and this guide explains how to form the HTTPS or raw network address and inspect what is available.

In plain words
What is it for?
It is for finding a live service on a public or self-hosted relay and sending HTTP, TCP, or UDP requests to it.
Why use it?
It avoids using incorrect Portal commands or addresses and helps keep requests to someone else's machine deliberate and limited.

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-deploy plugin — 3 skills shipped together

Good fit It is for finding a live service on a public or self-hosted relay and sending HTTP, TCP, or UDP requests to it.

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

Made for: Claude Code, Codex.

Or install portal-deploy, the plugin that ships this one along with the rest of its 3 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-connect

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/gosuda/portal-tunnel/portal-connect"><img src="https://agentmods.dev/badge/skills/gosuda/portal-tunnel/portal-connect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 224 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,760 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00224 $0.02760
Opus 5.5 $0.00090 $0.01104
Sonnet 5.5 $0.00045 $0.00552
Haiku 4.5 $0.00022 $0.00276

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

Security

Grade A, and why

portal-connect scanned grade A with 1 finding 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 3d 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.

Makes network callslowCapability

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

curl -sS --connect-timeout 5 --max-time 15 -o /dev/null \
plugins/portal-deploy/skills/portal-connect/SKILL.md · 111 lines

How it starts

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

Connect to a Service Published with Portal

A Portal service is an ordinary public endpoint. The consumer needs no Portal account, key, or client: an HTTPS tunnel is reached with any HTTP client at https://<name>.<relay-host>/, and a raw TCP or UDP tunnel with any client at the relay-assigned host:port. The portal CLI has no connect subcommand, and portal list prints relays, not services, so do not invent one. Behind the URL is the publisher's own machine, often a laptop on a home connection, so keep every request bounded and deliberate.

Run the workflow in order. Open a reference only when that branch is taken: references/discovery-api.md for relay endpoints, JSON shapes, the hostname rule, and how to read a 402 Payment Required challenge; references/raw-transport.md for a TCP or UDP endpoint.

Identify the Target

Pick the first form that matches what the user gave:

  • Full URL: use it as given.
  • Hostname without a scheme, such as my-app.portal.example.com: prefix https://.
  • Service name plus a relay: the URL is https://<name>.<relay-host>/, with the relay's port appended when the relay does not run on 443. Confirm the lease on that relay before calling the service down.
  • Service name only: query GET /api/state on each relay the user named plus the bootstrap relays that portal list prints. Each relay knows only its own leases, and the same name can belong to different publishers on different relays, so report which relay matched.
  • "What is available", "browse", "list the services": produce a directory from /api/state with name, hostname, description, tags, readiness, and any raw TCP/UDP address.
  • Game server, SSH, database, or another non-HTTP protocol: use the lease's tcp_addr or udp_addr and follow references/raw-transport.md.
  • A route that answers 402: report its terms as step 5 describes. This skill never pays.

Ask one concise question only when the target cannot be determined safely, for example when several relays host the same name under different owners, or when the requested interaction would mutate data or require a login the user did not mention.

Read the full file on GitHub · 111 lines

Files

What ships with it

3 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. 3d ago Changed eb77f7774c05
  2. 23d ago Changed e822f60f78f5
  3. 1mo ago First seen · 111 lines · 224 tokens per session scan A 1f3b9bd0318a

Subscribe to this mod's changes

portal-connect is a skill published in the GitHub repository gosuda/portal-tunnel (291 stars, last pushed yesterday), licensed MIT. It adds 224 tokens to every session and 2,760 once invoked, about $0.0009 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-23.