# Expose localhost

> Expose localhost is an open-source agent skill for developer tools. Gives a local dev server a public HTTPS URL over a single ssh command. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/klipitkas/tunnl.gg/tree/main/plugins/tunnl/skills/expose-localhost
- **Repository:** https://github.com/klipitkas/tunnl.gg
- **GitHub stars:** 695
- **License:** MIT
- **Skill name:** expose-localhost
- **Collection:** https://github.com/klipitkas/tunnl.gg
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill walks the agent through exposing a local port on the public internet using tunnl.gg, which relies on the system OpenSSH client rather than any installed tool or account. The agent checks that ssh is available and that the app is listening, picks between a random URL and a stable one tied to the machine's SSH key, and starts the tunnel in the background with JSON output so it can read the public URL and track requests.

The workflow also covers the practical details: passing a Host header so frameworks like Vite or Django accept forwarded requests, pointing OAuth or webhook callbacks at the tunnel, checking the request log to confirm a webhook arrived, and shutting the tunnel down when the task ends. It includes a troubleshooting table for common failures such as 502 errors, host-key prompts and rate limits, plus guidance on not exposing secrets or admin panels through a public URL.

No scripts ship with the skill; the commands are inline in SKILL.md and need a POSIX-style shell with ssh available. Pro-only options such as basic auth and IP allow lists are described but require a paid tunnl.gg account.

## When your agent uses it

> Give a local dev server a public HTTPS URL with tunnl.gg (one ssh command, nothing to install, no account). Use when the user wants to expose localhost, get a public URL for a local port, receive webhooks (Stripe, GitHub, Slack...) locally, register an OAuth callback, share a dev preview, test on a phone, or asks for ngrok / Cloudflare Tunnel / localtunnel-style tunneling.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/klipitkas/tunnl.gg/tree/HEAD/plugins/tunnl/skills/expose-localhost)
- [License: MIT](https://github.com/klipitkas/tunnl.gg/tree/HEAD/plugins/tunnl/skills/expose-localhost)

## Features

- **Public HTTPS URL:** Maps a local port to a tunnl.gg subdomain using a single ssh -R command.
- **Stable or random URLs:** Chooses between a fresh URL per session and a fixed URL tied to the SSH key.
- **Background start and URL capture:** Launches the tunnel detached and reads the public URL from JSON output.
- **Request log inspection:** Reads per-request lines to confirm webhooks arrived and diagnose failures.
- **Host header override:** Sends a custom Host header so dev servers with host allow-lists accept requests.
- **Troubleshooting guide:** Maps common errors such as 502, host-key failures and rate limits to fixes.

## Good for

- Receive Stripe or GitHub webhooks on my local server
- Register a local OAuth callback URL with a provider
- Share a running dev preview with a teammate
- Test my local web app on a phone over HTTPS
- Expose a local port without installing ngrok

## Install

### Claude Code

This skill ships in the `tunnl` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add klipitkas/tunnl.gg
/plugin install tunnl@tunnl-gg
```

Or copy only this skill to `~/.claude/skills/expose-localhost`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/klipitkas/tunnl.gg.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/expose-localhost &&
cp -R "$tmp/plugins/tunnl/skills/expose-localhost" ~/.claude/skills/expose-localhost &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/expose-localhost` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/expose-localhost` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/klipitkas/tunnl.gg.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/expose-localhost &&
cp -R "$tmp/plugins/tunnl/skills/expose-localhost" ~/.agents/skills/expose-localhost &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/expose-localhost` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/expose-localhost` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/klipitkas/tunnl.gg.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/expose-localhost &&
cp -R "$tmp/plugins/tunnl/skills/expose-localhost" ~/.cursor/skills/expose-localhost &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/expose-localhost` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/klipitkas/tunnl.gg.git --path plugins/tunnl/skills/expose-localhost
```

Or copy the folder to `~/.gemini/skills/expose-localhost` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/expose-localhost`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/klipitkas/tunnl.gg.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/expose-localhost &&
cp -R "$tmp/plugins/tunnl/skills/expose-localhost" ~/.copilot/skills/expose-localhost &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/expose-localhost` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/klipitkas/tunnl.gg.git
```

Then copy `tunnl.gg/plugins/tunnl/skills/expose-localhost` into your agent's skills folder as `expose-localhost`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Expose localhost need installed?

Only the OpenSSH client, which the skill notes is built into macOS, Linux and Windows 10 and later. No account is required for the basic random URL.

### How long does a tunnel stay open?

On the free tier a tunnel closes after 2 hours without requests and after 24 hours in any case, at which point the ssh process exits.

### Why do browsers see a warning page?

Free-tier browser requests are shown a phishing warning page once a day before reaching the app. Webhooks, curl and SDKs do not see it, and the skill describes a header to skip it in scripts.

### Which options need a paid plan?

The auth, allow and cors options require tunnl.gg Pro. Host and JSON output work on the free tier.

### How do I install Expose localhost in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/expose-localhost to use it in all your projects, or to .claude/skills/expose-localhost in one project. Or install the tunnl plugin, which includes it: /plugin marketplace add klipitkas/tunnl.gg, then /plugin install tunnl@tunnl-gg.

### Does Expose localhost run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Expose localhost?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Expose localhost?

The closest alternatives to Expose localhost are Browse local sentry, Agent runtime gateway smoke test, Server, Tangle sandbox and Tenki sandbox.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Browse local sentry](https://ai-powered.com/skills/browse-local-sentry): Browse local sentry is an open-source agent skill for developer tools.
- [Agent runtime gateway smoke test](https://ai-powered.com/skills/agent-runtime-gateway-smoke-test): Agent runtime gateway smoke test is an open-source agent skill for developer tools.
- [Server](https://ai-powered.com/skills/server): Server is an open-source agent skill for developer tools.
- [Tangle sandbox](https://ai-powered.com/skills/tangle-sandbox): Tangle sandbox is an open-source agent skill for developer tools.
- [Tenki sandbox](https://ai-powered.com/skills/tenki-sandbox): Tenki sandbox is an open-source agent skill for developer tools.
- [Interactive debugging](https://ai-powered.com/skills/interactive-debugging): Interactive debugging is an open-source agent skill for developer tools.
- [Tinyplace](https://ai-powered.com/skills/tinyplace-tinyhumansai-2): Tinyplace is an open-source agent skill for developer tools.
- [Tensorlake sandbox](https://ai-powered.com/skills/tensorlake-sandbox): Tensorlake sandbox is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/expose-localhost
