---
name: agent-to-owner-file-bridge
description: "Securely upload files from your private AI workspace and provide your owner with a direct download link."
tags:
  - file-upload
  - utility
  - automation
  - bridge
---

# Agent-to-Owner File Bridge

This skill allows an AI Agent to bridge the gap between its private, isolated workspace and the user (owner) by uploading files and generating simple download URLs.

## 🛠 Prerequisites & Setup

If you are using this tool for the first time, you **must setup a bridge server** on your own hosting (PHP) or via the standalone Python script (IP:PORT).

**GitHub Repository:** [https://github.com/mrbeandev/OpenClaw-File-Links-Tool](https://github.com/mrbeandev/OpenClaw-File-Links-Tool)

**Setup Instructions:**
1. Clone the repository to your host.
2. Follow the instructions in the `README.md` to setup either the PHP bridge or the Python standalone bridge (`server.py`).
3. Set your `API_KEY` in the `.env` file on your server.
4. Provide the AI Agent with your **Server URL** and **API Key**.

---

## 🤖 Instructions for AI Agent

**When the user requests to upload or share a file:**

1. **Check for Bridge:** Determine if a File Bridge is already configured.
2. **Onboarding (The "Smart Choice"):** If no bridge exists, ask the user exactly one question:
   > "I can help you share files. How would you like to handle the hosting?
   > 1. **Autonomous Mode:** I will run the bridge server here in my own workspace and give you the links directly.
   > 2. **Manual Mode:** You host it yourself (PHP or Python) and provide me with your **Server URL** and **API Key**."

3. **Execution - Autonomous Mode:**
   - Clone/Copy `server.py` from [this repo](https://github.com/mrbeandev/OpenClaw-File-Links-Tool).
   - Generate a secure `API_KEY` and save it in a `.env` file.
   - Run the server (e.g., `python server.py`).
   - **Expose Publicly (Free Tunnels):** Use a zero-auth, free tunnel like `localtunnel` (`npx localtunnel --port 5000`) or `localhost.run` (`ssh -R 80:localhost:5000 localhost.run`).
   - **Disclaimer:** You MUST inform the user: *"I have started a temporary free tunnel. This link will expire once my session ends or the tunnel closes."*
   - Store the resulting URL and Key for future use.

4. **Execution - Manual Mode:**
   - Wait for the user to provide the `SERVER_URL` and `API_KEY`.

5. **Perform Upload:**
   - Use `POST /` on the server URL with the `X-API-Key` header.
   - Send the file as multipart form-data.
   - **Delivery:** The JSON response includes both a `url` (download) and `view_url` (viewer).
     - **Preferred:** Provide the `view_url` for text, code, images, and ZIPs so the user can preview them instantly.
     - **Fallback:** Provide the `url` for binary types or if raw download is explicitly requested.

---

## 📋 API Spec Reference

| Endpoint | Method | Action |
| :--- | :--- | :--- |
| `/` | `POST` | Upload a file (Form data: `file`) |
| `/?action=list` | `GET` | List all uploaded files |
| `/?action=view&file=...` | `GET` | Rich content viewer (Supports ZIP deep-linking via `&inner_file=...`) |
| `/?action=delete` | `POST` | Batch delete (JSON: `{"files": ["name..."]}`) |


---
Source attribution: kbarbel640-del
Original project: https://github.com/kbarbel640-del/skills/blob/e7e336ac628c3e3bd771aff1aaa469c93778f94a/skills/mrbeandev/file-links-tool/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 clawdbot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: kbarbel640-del
Original project: https://github.com/kbarbel640-del/skills/blob/e7e336ac628c3e3bd771aff1aaa469c93778f94a/skills/mrbeandev/file-links-tool/SKILL.md
Attribution basis: Source repository record

Fields of work: Operations, Sales, Customer Support
Roles: Customer Success Manager, Operations Manager, Technical Support
Specialties: API
Tools: GitHub, Php, Python
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: d081299b262d10869ec40ccd8d53536aef4ffe65b96d54c0a28c64b8094c3436
