share-local
Skill4 starsChanged 19 days agoMITView on GitHub
Open the local environment to someone outside with a public tunnel, without deploying anything. Picks the available route, fixes the application's absolute addresses so the page does not arrive broken, checks that it really renders from outside and leaves the tunnel closed when finished. Use when you need to show work in progress to a client or a colleague, review a design among several people, test on a real phone, or receive a call from an external service that needs a public address.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-repo-to-docsSkill
- adrSkill
- auth-bypass-localSkill
- before-afterSkill
- bug-huntSkill
- carry-envSkill
- code-healthSkill
- crux-doctorSkill
- crux-initSkill
- css-to-componentsSkill
- deploy-fallbackSkill
- deploy-watchSkill
- device-loopSkill
- drive-browserSkill
- e2eSkill
- end-sessionSkill
- eval-fixturesSkill
- explain-planSkill
- flowSkill
- grillSkill
- merge-conflictsSkill
- motion-videoSkill
- oauth-reauthorizeSkill
- prod-signalsSkill
- promote-to-docsSkill
- prose-checkSkill
- read-documentSkill
- render-loopSkill
- repo-mapSkill
- review-prSkill
- root-causeSkill
- runbookSkill
- security-auditSkill
- shipSkill
- skill-auditSkill
- skill-creatorSkill
- teachSkill
- ui-behaviourSkill
- ui-tellsSkill
- visual-diffSkill
- visual-testSkill
- wizardSkill
- workspaceSkill
- write-testsSkill
- x-postsSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
If the application stores its own address as localhost, from outside a blank or unstyled page arrives while you see it fine.
- Distinctive: line 102
If you launched it in the background in an agent session, it does not close by itself when the conversation ends.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
share-local
Publishes what runs on your machine under an internet address, without
deploying. The details of each problem and the full supervisor are in
<this-skill-directory>/references/why.md.
It is not a permanent test deployment: the tunnel lasts as long as the session and its address changes. For something stable, deploy.
Before opening anything
The tunnel exposes everything that port serves. Check out loud: is there an admin panel without a password? does the local database hold personal data? are keys or environment files being served? If any answer is yes, close it first or do not open the tunnel. A random address is not security.
Choosing the route
1. cloudflared, without installing anything:
npx --yes cloudflared tunnel --url http://localhost:<port>The address lasts the session, but sometimes it takes a while to resolve or
never does (NXDOMAIN). Check that it responds before handing out the link.
2. Plain SSH, if the first does not resolve. It responds in seconds; the address rotates:
ssh -tt -o StrictHostKeyChecking=accept-new -o ServerAliveInterval=30 \
-o ExitOnForwardFailure=yes -R 80:localhost:<port> nokey@localhost.run-tt is mandatory (without it the address is not printed) and the user is
nokey@ (with your own key you must have registered it). Do not install a
downloaded binary just for this.
Absolute addresses
If the application stores its own address as localhost, from outside a blank
or unstyled page arrives while you see it fine. It lives in places like
WP_HOME/WP_SITEURL in WordPress, the public URL variable of a JavaScript
framework, or a base_url/app_url.
The address is deduced from the request when it is not local, and the connection is marked as secure (the tunnel encrypts outwards and talks to you over HTTP):
$host = $_SERVER['HTTP_HOST'] ?? '';
$es_local = $host === '' || preg_match('/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/', $host);
if (!$es_local) {
$_SERVER['HTTPS'] = 'on';
define('WP_HOME', 'https://' . $host);
define('WP_SITEURL', 'https://' . $host);
}Check that it renders
That the process is still alive means nothing. Request the page through the public address:
curl -sS -o /tmp/tunel.html -w "%{http_code} · %{size_download} bytes\n" \
-m 45 https://<tunnel-address>/<path>
grep -c "localhost" /tmp/tunel.html # 0, or almostAnd open it at a phone's width. References to localhost stored in the
database (favicon, canonical) are usually cosmetic.
If it has to last
Supervise it: a loop that reopens the connection when it drops, with growing
back-off, decoupled from the session (setsid) and that rereads the address
while the connection lives and writes the current one to a file (the last one
that appears in the output, not the first). The address can change without the
connection dropping. The example supervisor is in the reference.
Each reconnection brings a new address. Do not promise a stable address without having registered the key with the service first, a tunnel with its own domain or a redirect against a server of yours.
When finished
Close the tunnel by its PID. Never with pkill or killall: they kill other
processes by name, and the destructive-command guard blocks them.
pgrep -af "localhost.run|cloudflared" # locates the PID
kill <PID>If you launched it in the background in an agent session, it does not close by itself when the conversation ends.
Signs that something is wrong
| What you see | What it usually is |
| Tunnel connected but no address | Missing -tt |
Permission denied (publickey) after the greeting | Your key is not registered; use nokey@ |
| Blank page from outside, fine from inside | Absolute addresses to localhost |
| Styles missing and mixed-content warnings | The application does not know the connection is HTTPS |
| Slow and intermittently down | Free-service limit; for something sustained, deploy |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

