About sealtun
An operational guidance skill for Sealtun that selects tunnel, configuration, or troubleshooting procedures based on user intent. It is for users exposing local services, accessing cluster services, or managing tunnels, and distinguishes Stable, Alpha, and Deprecated commands.
Key features
- 01Route requests to matching guidance
- 02Prefer Stable commands
- 03Distinguish Alpha and Deprecated commands
- 04Preflight and verify operations
- 05Provide troubleshooting procedures
Use cases
- 01Make a local development service public
- 02Configure multiple tunnels and review changes
- 03Troubleshoot login, connectivity, or certificate issues
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ gitlayzer/ sealtun --skill sealtunAfter installing, type/sealtunin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/cli.mddeclarative.mdevals.mdtroubleshooting.mdDetails
From the project READMESealtun
First Decision
Classify the request before answering or editing:
- User operation: install, shell completion, TUI/console, guided init, login,
up, discover local ports, expose HTTPS, remote HTTP upstream targets, SSH, or generic TCP, access cluster-internal Services/Pods withconnect, build service-level cross-region Mesh, generate protocol templates, secure public HTTP traffic, show/set policy, audit access, create/list/revoke/rotate temporary share links, rotate server secret, plan/add/verify a custom domain, inspect state, watch status, view or tune resources, stop/start/resume, clean up, or export YAML. Readreferences/cli.md. - Declarative configuration:
sealtun.yaml,apply -f,diff -f,export, multi-tunnel management, stable names,ttl, Pod resources, HTTPS access policies, SSH tunnel declarations, or generic TCP tunnel declarations. Readreferences/declarative.md. - Troubleshooting: login/profile mismatch, daemon/session issues, local port discovery/failures, SSH/TCP direct NodePort problems, remote Kubernetes problems, resource lists/resource occupancy, DNS, Ingress, certificate, logs, metrics, or events. Read
references/troubleshooting.md. - Skill maintenance or quality review: trigger precision, workflow scoring, or regression prompts for this skill. Read
references/evals.md.
If the request is inside the Sealtun repository, prefer the current source tree, README, and QuickStart docs over these references when they conflict. Use rg to inspect Cobra commands and flags before changing CLI usage guidance.
Stability Routing
- Prefer Stable commands for normal guidance and automation.
- Current Alpha entrypoints are
init,tui/console,connect,mesh,ssh connect, and the standalonediscover,template,export,events,metrics,resources, andwatchcommands. Their capabilities remain available, but their interfaces may change or be removed without backward-compatibility guarantees. State this briefly before recommending an Alpha path. repair,domain set, and top-leveldisconnectare Deprecated compatibility commands. Do not recommend them for new usage; usedoctor <id> --fix,domain add, andconnect disconnect.- Alpha does not mean broken or incomplete. Use an Alpha feature when it uniquely matches the user's explicit request, then apply the same preflight, mutation, and verification rules as Stable features.
Intent Routing
Use the user's intent to choose the shortest safe path:
| User intent | Primary path | Verify with |
|---|---|---|
| Make a local web app, dev server, callback, preview, or webhook public | status -> up for interactive/dev use; expose <port> for scripts | URL from output, list --check, inspect <id> |
| Manage tunnels from an interactive terminal | Alpha tui or console | disclose Alpha status; selected tunnel state, confirmed action result, list --check |
| Make an HTTP service reachable from this machine public | status -> up --target http://host:port for dev use; expose --target for scripts | URL from output, inspect <id>, protected request behavior |
| Add Basic Auth, Bearer token, IP rules, rate limit, audit, or temporary links | HTTPS expose, policy, share, or YAML access policy | inspect <id>, policy show/audit, protected request behavior |
| Expose SSH directly | expose 22 --protocol ssh | printed SSH host/port, inspect <id> --remote, user SSH client output |
| Expose database, queue, MQTT, or arbitrary TCP | Alpha template <protocol> for guidance, then stable expose <port> --protocol tcp | disclose template Alpha status; printed <host>:<node-port>, protocol client, list --check |
| Access a Service/Pod inside the active Sealos namespace from local tools | Alpha connect --check, then Linux sudo sealtun connect | disclose Alpha status; Service FQDN, ClusterIP, or Pod IP TCP access; no SOCKS/proxy config |
| Import a Kubernetes Service across Sealos regions | Alpha mesh init, mesh login, mesh up, then mesh service publish/check | disclose Alpha status; imported mesh-<name> ClusterIP Service and mesh service check |
| Manage many tunnels or stable config | edit sealtun.yaml, then apply --dry-run, diff, real apply only when requested | apply output, list, inspect |
| Custom domain | domain plan first; domain add --wait only when mutation is requested | domain verify/status, DNS CNAME, certificate status |
| Tune tunnel Pod resources | Alpha resources <id> first, then resources set or YAML resources when requested | disclose Alpha status; resources <id>, rollout/start behavior |
| Debug connectivity or unclear state | stable checks first: status, list --check, inspect, doctor, logs; use Alpha resources/events/metrics only when needed | disclose Alpha status when used; layer-specific finding and next action |
| Watch or repair tunnel state | Alpha watch for status changes; stable doctor <id> --fix --dry-run before execution | disclose watch Alpha status; dry-run plan, then verified state |
Required Execution Flow
Follow this flow after the skill triggers:
- Scope gate: verify the request is about making a local/dev service publicly reachable, operating a Sealtun tunnel, troubleshooting Sealtun, or declarative Sealtun config. If it is only generic production deployment, buying a domain, DNS-only configuration, generic Kubernetes, or generic SSH without Sealtun tunneling, do not force Sealtun into the answer.
- Select one mode before acting:
- Guidance mode: user asks how to use Sealtun. Load the matching reference and give commands; do not run live tunnel/cloud commands.
- Live operation mode: user explicitly asks to execute, create, apply, stop, clean up, or bind a domain. Run preflight checks first, then the requested command, then verification.
- Troubleshooting mode: user reports a problem. Run non-mutating diagnostics first, identify the likely layer, then propose or perform fixes only when the requested action is clear.
- Gather minimum context. Inside this repo, inspect current code/README/QuickStart docs before relying on references. Outside the repo, use the references as the command source. Prefer stable non-mutating checks such as
sealtun --version,sealtun status,sealtun profile current,sealtun region current,sealtun list,sealtun inspect, andsealtun doctor. Use Alphasealtun discover,sealtun resources, orsealtun initonly when their specific discovery, resource, or first-run output is useful. - Handle first-use authorization gently. If
statusshows no login, explain that Sealtun needs Sealos authorization and kubeconfig before creating cloud resources. Guide the user throughsealtun login, orsealtun login <region> --profile <name>when region/profile matters. If a browser/device authorization flow opens, tell the user to complete it in the browser and wait; do not treat the pause as a failure. After login, verify withsealtun status,sealtun region current, and optionallysealtun profile current. - Control mutations. Do not run
sealtun up,sealtun expose, realsealtun apply, Alphasealtun mesh up/down, Alphasealtun mesh service publish/unpublish, Alphasealtun resources set/unset,sealtun share create/revoke,sealtun domain add/clear,sealtun stop,sealtun cleanup, orsealtun logoutunless the user explicitly asked for that operation in the current task. Alphasealtun template, Alphasealtun export,sealtun domain plan, Alphasealtun mesh status, Alphasealtun mesh service list/check,sealtun share list,apply --dry-run,diff, and read-only diagnostics are safe guidance steps. For declarative changes, preferapply --dry-runanddiffbefore realapply. - Verify completion. After live operations, use the contract below, then report the exact command sequence and final state without printing secrets.
Verification Contracts
up/expose: capture tunnel ID, public endpoint, and protocol-specific output; verify withsealtun list --checkandsealtun inspect <tunnel-id>. Forup, mention whether it reused.sealtun/state.json, selected a discovered port, or used explicit port/target input.apply: run or recommendapply --dry-runanddifffirst; after real apply, verify every intended tunnel withlistandinspect.domain add/clear: verify withdomain statusordomain verify; foradd --wait, report DNS/CNAME and certificate readiness separately. Treatdomain setonly as a Deprecated alias.share create/revoke/rotate: verify withshare list; never repeat a one-time share token unless it is the command's immediate output.stop/start/cleanup: verify withlistorinspect; rememberstoppreserves entry resources whilecleanupremoves stopped, expired, stale, or error tunnel resources.- Alpha
resources set/unset: disclose stability and verify withresources <id>; stopped tunnels stay scaled to 0 while their Deployment template is updated. - Alpha
mesh: disclose stability, then verifymesh auth status,mesh status, andmesh service check <name> --from <region>; explain that Mesh v1 is service-level HTTP/TCP import, not transparent Pod IP/CNI routing. - Troubleshooting: name the failing layer before proposing a mutation: local login/profile, local port, daemon/session, remote resource, DNS/certificate, access policy, or user protocol/auth. Use
doctor <id> --reportwhen the user needs a redacted support artifact.
Operating Rules
- Do not expose user secrets in final answers, logs, commits, or generated docs. Prefer
*Envfields and environment variables for passwords and tokens unless the user explicitly wants a one-shot inline example. - Explain that Sealtun public access controls are enforced in the Sealtun server proxy layer, not by Ingress annotations. They protect HTTPS public business traffic, including
--targetupstream traffic, not the internal/_sealtun/wscontrol channel and not SSH/TCP direct NodePort traffic. - For SSH exposure, prefer stable
sealtun expose 22 --protocol sshwhen the region supports public TCP NodePort. Use Alphasealtun ssh connect <tunnel-id>only as a WebSocket ProxyCommand fallback and disclose its stability. - For generic TCP exposure, prefer
sealtun expose <port> --protocol tcpand report the generated<public-host>:<node-port>endpoint. - For declarative work, run or recommend
sealtun apply -f sealtun.yaml --dry-runandsealtun diff -f sealtun.yamlbefore a real apply when feasible. - For HTTPS policy operations, use
policy show,policy set --rate-limit 60/m --audit, andpolicy audit --since 10m; audit output must not include plaintext tokens, Authorization headers, or Basic Auth passwords. - For temporary share links, use
sealtun share create <tunnel-id> --ttl 1h --name reviewonly for HTTPS tunnels; tell users the URL is shown once because Sealtun stores only a token hash. Useshare rotateto invalidate an old token and print a new one-time URL,share listfor metadata, andshare revokeby name. - For server secret rotation, use
sealtun rotate <tunnel-id> --server-secret; note the new secret is one-time output and SSH/TCP access policy remains unchanged. - For Alpha config export, disclose stability and use
sealtun export <tunnel-id>orsealtun export --all -o sealtun.yaml. Explain that stored password/token hashes cannot be recovered;--include-secret-placeholdersemits env var placeholders. - For Alpha cluster-internal access, disclose stability, use
sealtun connect --check, then on Linuxsudo sealtun connect; stop withsudo sealtun connect disconnect. Explain that it transparently redirects TCP Service FQDN, Service ClusterIP, and Pod IP traffic through Kubernetespods/portforward; it is not SOCKS/HTTP proxy config and does not support ICMP/ping or UDP. - For Alpha cross-region Mesh, disclose stability, then use
sealtun mesh init --regions ...,mesh login,mesh up, andmesh service publish <name> --from <region> --k8s-service <namespace>/<service>:<port> --import .... Explain that it creates one gateway per region and imports Services asmesh-<name>ClusterIP Services in other regions. - For first-time users, prioritize a clear path: install,
sealtun login, then stablesealtun upfor interactive local development orsealtun exposefor exact scripted creation. Use Alphasealtun initonly when the user wants a read-only command/YAML recommendation. Mention that login stores credentials under~/.sealtun, project tunnel state lives in.sealtun/state.json, and profiles are useful for multiple Sealos accounts, regions, or workspaces. - Use exact command names and flags from the repository when modifying instructions. Supported tunnel protocols are
https, dedicatedssh, and generictcp; UDP/gRPC are not supported unless the repo adds them.
Response Shape
For usage questions, give a short working command sequence and explain only the relevant gotchas. For troubleshooting, start with the lowest-cost local checks, then escalate to remote Kubernetes diagnostics.