back
loading skill details...
Send large files or files to other people via Gokapi; offer it for large self-directed transfers, upload on request, and revoke shared links.
---
name: "gokapi-file-sharing"
description: "Send large files or files to other people via Gokapi; offer it for large self-directed transfers, upload on request, and revoke shared links."
metadata: {"openclaw":{"emoji":"📤","primaryEnv":"GOKAPI_BASE_URL","requires":{"bins":["curl","python3"]}}}
---
# Gokapi file sharing
1. For a requested file send to anyone other than the agent's owner, use Gokapi unless the owner explicitly chose another transport. If the owner describes a self-directed transfer as large, or the file exceeds the chosen channel's known attachment limit, proactively offer Gokapi but do not upload until the owner accepts. Do not invent a universal size threshold; compare the actual file size to channel limits when available. Also run for an explicit upload or link revocation. Identify the exact file or Gokapi link and intended recipient/channel. Verify authority for upload, external delivery, or deletion; stop if identity or scope is unresolved.
2. List secret-entry metadata. Keep GOKAPI_BASE_URL and GOKAPI_API_KEY separate: store the owner's HTTPS URL as an env-kind GOKAPI_BASE_URL entry via local CLI or Settings (stdin/value-file, never a literal command argument), then bind its store SecretRef to skills.entries.gokapi-file-sharing.apiKey. The generic field's primaryEnv maps the readable URL to GOKAPI_BASE_URL; a secret-kind URL becomes an opaque egress sentinel and cannot be a request destination. Do not launch an API-key-labeled prompt for the URL. Request only GOKAPI_API_KEY as a protected secret through the masked prompt with the exact Gokapi hostname allowed. Verify the URL has HTTPS scheme, key is present, and Gateway egress is enabled without printing either value.
3. Before an upload, ask the owner how many whole days the file may remain online. In the same question, offer an optional maximum number of downloads. Use expiryDays as a positive integer, or 0 only if unlimited time was explicit. Use allowedDownloads as the requested positive integer, or 0 for unlimited downloads when the owner declines a cap. For hours or fractional days, explain the API's day granularity and get a compatible choice. Resolve retention before upload.
4. Use Gateway-host exec so the protected key sentinel can be substituted by the egress proxy. Accept only an HTTPS base URL without userinfo, query, or fragment; never follow redirects with the API key. POST multipart file, expiryDays, and allowedDownloads to /api/files/add. Follow references/api-upload.md for the exact request and chunked fallback. Require HTTP success, JSON Result=OK, a valid FileInfo.UrlDownload, and returned expiry/download metadata matching the choices.
5. For upload-only, return the download link and limits to the owner. For an authorized send, deliver only the link to the verified recipient on the requested channel; do not post a private link to a broader chat. Report upload and delivery as distinct outcomes.
6. For an explicit revocation, validate that the link belongs to the configured instance and identify its file ID. DELETE /api/files/delete with the ID in the id header using a key with DELETE permission; omit delay for immediate revocation. Require HTTP 200, then verify GET /api/files/list/{id} returns 404 with VIEW permission. A public download path may return HTTP 200 with an HTML error redirect after deletion; do not treat that status alone as proof the file remains available. Do not delete any other ID.
Simple and chunked API uploads do not provide Gokapi end-to-end encryption. If client-side E2EE is required, use Gokapi's encrypted client workflow instead; server-side storage encryption is not E2EE.
don't have the plugin yet? install it then click "run inline in claude" again.