Token导航 LogoToken导航TokenDH.com
开发需要联网clawhub未标认证来源可访问clear审计通过

tmpfiles-upload-stdlibtmpfiles 上传 stdlib

Agent Skill

tmpfiles-upload-stdlib 用于辅助 Python 项目开发、测试和数据处理,适合在 OpenClaw 中需要阅读 Python 代码、运行测试或整理脚本流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,068

周安装

163

GitHub Stars

公开资料未说明

下载量

1,317
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tmpfiles-upload-stdlib(tmpfiles 上传 stdlib)
来源仓库:https://github.com/donigwapo/tmpfiles-upload-stdlib
安装命令:
openclaw skills install tmpfiles-upload-stdlib
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install tmpfiles-upload-stdlib

简介

仅使用 Python 标准库将本地文件上传到 tmpfiles.org,然后以严格的 JSON 返回直接下载链接。

SKILL.md

name
tmpfiles-upload-stdlib
description
Upload a local file to tmpfiles.org using Python standard library only, then return a direct download link in strict JSON.
version
1.0.0
metadata
openclaw
requires
bins
emoji
📤
os
homepage
https://tmpfiles.org

Tmpfiles Upload (Standard Library)

Use this skill when the user wants to upload a local file that already exists in the OpenClaw workspace or container and receive a temporary public download link.

This skill is for:

  • uploading a file from a known local path
  • returning a temporary download link
  • producing machine-friendly output for workflows such as n8n

This skill is not for:

  • downloading files from remote URLs first
  • handling private or sensitive documents
  • long-term or secure file storage
  • inventing file paths that do not exist

Safety and scope

Before uploading, always check the following:

  1. The file path is explicitly provided by the user or clearly available in context.
  2. The file exists locally.
  3. The file is not obviously sensitive, unless the user clearly asked to upload it anyway.
  4. The user understands the link is temporary and public.

Never upload:

  • secrets, credentials, tokens, key files
  • private IDs, tax records, contracts, or financial files unless the user explicitly insists
  • arbitrary system files outside the task scope

If the file appears sensitive, warn the user briefly before proceeding.

Required input

You need:

  • a local file path, such as /root/.openclaw/workspace-default/report.pdf

If no local file path is available, ask for it or explain that the file must already exist locally in the workspace/container.

Output format

Always return strict JSON only with no markdown and no extra commentary.

Success format:

{
  "success": true,
  "file_path": "/root/.openclaw/workspace-default/report.pdf",
  "file_name": "report.pdf",
  "download_url": "https://tmpfiles.org/xxxxxxxx/report.pdf",
  "note": "Temporary public link generated."
}

Failure format:

{
  "success": false,
  "file_path": "/root/.openclaw/workspace-default/report.pdf",
  "error": "File not found"
}

Procedure

Follow these steps exactly:

  1. Confirm the local file path.
  2. Check whether the file exists.
  3. Upload the file to tmpfiles.org using Python standard library only.
  4. Extract the returned URL.
  5. Return strict JSON only.

Python upload method

Use python3 and standard library modules only.

Preferred approach:

  • os for file checks
  • mimetypes for content type guess if needed
  • urllib.request and uuid for multipart upload
  • json for parsing response

Use a one-shot Python command or heredoc script.

Reference implementation

python3 <<'PY'
import os
import json
import uuid
import mimetypes
import urllib.request

file_path = "/absolute/path/to/file.ext"

if not os.path.isfile(file_path):
    print(json.dumps({
        "success": False,
        "file_path": file_path,
        "error": "File not found"
    }))
    raise SystemExit(0)

file_name = os.path.basename(file_path)
mime_type = mimetypes.guess_type(file_name)[0] or "application/octet-stream"
boundary = "----WebKitFormBoundary" + uuid.uuid4().hex

with open(file_path, "rb") as f:
    file_bytes = f.read()

body = []
body.append(f"--{boundary}\
\
".encode())
body.append(
    f'Content-Disposition: form-data; name="file"; filename="{file_name}"\
\
'.encode()
)
body.append(f"Content-Type: {mime_type}\
\
\
\
".encode())
body.append(file_bytes)
body.append(f"\
\
--{boundary}--\
\
".encode())

data = b"".join(body)

req = urllib.request.Request(
    "https://tmpfiles.org/api/v1/upload",
    data=data,
    headers={
        "Content-Type": f"multipart/form-data; boundary={boundary}",
        "Accept": "application/json"
    },
    method="POST"
)

try:
    with urllib.request.urlopen(req, timeout=60) as resp:
        raw = resp.read().decode("utf-8", errors="replace")
    parsed = json.loads(raw)

    download_url = None
    if isinstance(parsed, dict):
        data_obj = parsed.get("data", {})
        if isinstance(data_obj, dict):
            download_url = data_obj.get("url")

    if download_url:
        print(json.dumps({
            "success": True,
            "file_path": file_path,
            "file_name": file_name,
            "download_url": download_url,
            "note": "Temporary public link generated."
        }))
    else:
        print(json.dumps({
            "success": False,
            "file_path": file_path,
            "error": "Upload response did not include a download URL",
            "raw_response": parsed
        }))
except Exception as e:
    print(json.dumps({
        "success": False,
        "file_path": file_path,
        "error": str(e)
    }))
PY

Execution rules

  • Replace /absolute/path/to/file.ext with the real local file path.
  • Do not use requests.
  • Do not return prose before or after the JSON.
  • Prefer a single final JSON object.
  • If upload fails, return the failure JSON.
  • If the file is missing, do not attempt upload.

When to decline

Decline or warn when:

  • the file path is missing
  • the file does not exist
  • the file is likely sensitive and public upload would be risky
  • the user asks for secure/private hosting instead of a public temporary link

In those cases, suggest using private storage such as S3 or Supabase instead.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

83.58%
按下载量换算1,101

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills