← 返回 Skills 市场
tradmangh

Expiring Local Fileshare

作者 Thomas J. Radman · GitHub ↗ · v1.0.2
cross-platform ✓ 安全检测通过
867
总下载
0
收藏
3
当前安装
3
版本数
在 OpenClaw 中安装
/install expiring-local-fileshare
功能描述
Lets OpenClaw safely share single files from its local workspace via expiring, tokenized HTTP links (local-network/VPN only). Hours are configurable (default...
使用说明 (SKILL.md)

Internal Fileshare

Share single workspace files via expiring HTTP links (tokenized, local-network only).

Features

  • Single-file sharing (no directory browsing)
  • Time-limited tokens (default 1h, configurable; max 24h)
  • Optional one-time access (token invalid after first successful download)
  • Local/VPN-only (RFC1918 private ranges + localhost)
  • UTF-8 encoding (proper display of German umlauts, etc.)
  • No-cache headers (always fresh content)
  • Auto-cleanup (servers can be killed when done)

Install / Update (ClawHub)

Install:

clawhub install expiring-local-fileshare

Update:

clawhub update expiring-local-fileshare

Usage

Share a single file

{baseDir}/scripts/share.sh /path/to/file.md [port] [hours] [once]

Parameters:

  • file-path (required): Absolute path to file
  • port (optional): Port number (default: auto-assigned 8888+)
  • hours (optional): Validity in hours (default: 1, max: 24)
  • once (optional): Set to once or 1 for one-time access

Output: Returns clickable HTTP link with token, valid for specified duration.

Example

# Share a markdown file (1h, auto-port)
{baseDir}/scripts/share.sh ~/.openclaw/workspace/projects/my-project/README.md

# Share an image (12h, port 9000)
{baseDir}/scripts/share.sh ~/image.png 9000 12

# Share a file (one-time access, 1h)
{baseDir}/scripts/share.sh ~/secrets.txt 9001 1 once

How It Works

  1. Starts a lightweight Node.js HTTP server on specified port
  2. Generates random 32-char hex token
  3. Returns URL: http://192.168.0.219:PORT/?token=XXXXX
  4. Validates:
    • Source IP (must be LAN or VPN)
    • Token match
    • Expiry time
  5. Serves file with correct MIME type and UTF-8 encoding
  6. Logs all access attempts

Security

  • Workspace-only by default: refuses to share files outside ~/.openclaw/workspace (override via FILESHARE_ALLOW_ANY_PATH=1, not recommended)
  • Local-only: Only serves to private IP ranges (RFC1918) + localhost (VPN counts).
  • Token-based: 128-bit random tokens (computationally infeasible to guess)
  • Time-limited: Hard expiry after N hours (default 1h, max 24h)
  • Optional one-time: Token invalid after first successful download
  • No listing: Only serves the specified file, no directory browsing
  • No caching: Forces fresh content load

Supported File Types

Auto-detected MIME types:

  • .pngimage/png
  • .jpg, .jpegimage/jpeg
  • .mdtext/markdown; charset=utf-8
  • .txttext/plain; charset=utf-8
  • Others → application/octet-stream

Disable / Uninstall

There is no background service by default.

Stop active shares

# Kill a specific port
kill $(lsof -t -i:8888)

# Kill all fileshare servers started via this skill
pkill -f "share-file.js"

Uninstall (ClawHub)

If installed into ~/.openclaw/skills:

rm -rf ~/.openclaw/skills/expiring-local-fileshare

Stopping Shares

# Kill a specific port
kill $(lsof -t -i:8888)

# Kill all fileshare servers started via this skill
pkill -f "share-file.js"

Policy / Defaults

  • Single files only (no folder shares)
  • Default validity: 1h
  • Max validity: 24h
  • Local/VPN only (RFC1918 + localhost)
  • No public "anyone with link"

Troubleshooting

Wrong encoding (umlauts broken)? → Fixed in latest version (UTF-8 charset in headers)

Old version served? → Kill old server + restart (no-cache headers prevent browser caching)

Can't access from outside? → VPN required (home network topology uses NAT/masquerade, see docs/internal-fileshare.md)

Port already in use? → Use different port or kill existing server

安全使用建议
This skill appears to do what it says: start a short-lived local HTTP server that serves a single file to devices on the private network using a random token. Before installing/using it: (1) avoid setting FILESHARE_ALLOW_ANY_PATH=1 unless you fully trust the environment — that override allows sharing any file; (2) be aware the server listens on 0.0.0.0 and enforces access by checking client IPs in-app — network topology or VPN setups can affect who can reach the server; (3) the generated link and some metadata are written to /tmp/share-<port>.log and the share script may print absolute paths if the file is outside the workspace — treat those logs as sensitive and remove them after use; (4) use one-time links for sensitive files and keep validity short; (5) if you need stronger guarantees, run the skill in an isolated container or VM and audit network exposure. Overall the skill is coherent with its purpose, but follow the above precautions.
功能分析
Type: OpenClaw Skill Name: expiring-local-fileshare Version: 1.0.2 The OpenClaw AgentSkills bundle provides a secure, local-network-only file sharing utility. The `SKILL.md` clearly outlines its purpose and security features, which are robustly implemented in `scripts/share-file.js`. Key security measures include strict path validation (`fs.realpathSync` and `resolved.startsWith` check) to prevent sharing files outside the OpenClaw workspace by default, enforcement of local/private IP access (RFC1918), strong token generation, and time-limited/one-time access controls. There is no evidence of malicious intent such as data exfiltration, unauthorized command execution, persistence mechanisms, or prompt injection attempts against the agent. The `FILESHARE_ALLOW_ANY_PATH` override is explicitly documented as 'not recommended', indicating transparency rather than a hidden vulnerability.
能力评估
Purpose & Capability
The files (share-file.js and share.sh), SKILL.md, and METADATA all implement a single-file, tokenized, time-limited HTTP share restricted to private IP ranges and the workspace by default. The required binaries (node, bash, lsof) and declared filesystem/network permissions are coherent with the stated purpose. Minor metadata inconsistency: the top-level registry metadata lists only node as required, while METADATA.json lists node, bash, and lsof.
Instruction Scope
Runtime instructions are narrowly scoped to starting a local HTTP server to serve one file and to stopping it. The server logs the generated link to /tmp/share-<port>.log and share.sh prints a path relative to the workspace (or the full path if the file is outside workspace). The skill supports an explicit override (FILESHARE_ALLOW_ANY_PATH=1) to allow arbitrary paths — this weakens the default guard and should not be set lightly. The server listens on 0.0.0.0 but enforces client IP checks at the application layer; network topology could affect exposure (e.g., certain NATs/VPN setups or IPv6 peers).
Install Mechanism
This is instruction-only with included scripts; there is no remote download or archive extraction. Nothing in the install path writes external binaries or fetches code at runtime, so install risk is low.
Credentials
No credentials are requested. Optional env vars are reasonable (OPENCLAW_WORKSPACE and FILESHARE_ALLOW_ANY_PATH). FILESHARE_ALLOW_ANY_PATH is a powerful override and can enable sharing arbitrary local files; its existence should be treated as a conscious risk/configuration choice. METADATA declares filesystem/network permissions which match the functionality.
Persistence & Privilege
always:false and no background service by default — the skill runs only when invoked and spawns ephemeral servers. It does not modify other skills or system-wide agent settings. The ability to run background node processes is expected for its purpose.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install expiring-local-fileshare
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /expiring-local-fileshare 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Docs: add disable/uninstall instructions; clarify stopping active shares and removal.
v1.0.1
Security hardening: workspace-only by default; safer path handling.
v1.0.0
Initial release (default 1h, optional one-time access)
元数据
Slug expiring-local-fileshare
版本 1.0.2
许可证
累计安装 3
当前安装数 3
历史版本数 3
常见问题

Expiring Local Fileshare 是什么?

Lets OpenClaw safely share single files from its local workspace via expiring, tokenized HTTP links (local-network/VPN only). Hours are configurable (default... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 867 次。

如何安装 Expiring Local Fileshare?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install expiring-local-fileshare」即可一键安装,无需额外配置。

Expiring Local Fileshare 是免费的吗?

是的,Expiring Local Fileshare 完全免费(开源免费),可自由下载、安装和使用。

Expiring Local Fileshare 支持哪些平台?

Expiring Local Fileshare 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Expiring Local Fileshare?

由 Thomas J. Radman(@tradmangh)开发并维护,当前版本 v1.0.2。

💬 留言讨论