← 返回 Skills 市场
solarise94

123pan upload and share

作者 solarise94 · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ✓ 安全检测通过
417
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install 123pan-upload
功能描述
Upload files to 123pan (123云盘) and generate shareable links. Use when users need to upload files to 123pan and get links for sharing. Supports short share li...
使用说明 (SKILL.md)

123pan-upload

Upload files to 123云盘 and generate shareable links. Supports both short links (privacy-friendly) and direct download links.

⚠️ Security Notice

Before using WebDAV/rclone features, read this:

  1. Rclone Config Isolation (Important)

    • By default, scripts may read ~/.config/rclone/rclone.conf
    • This file may contain credentials for other cloud services
    • Recommendation: Use dedicated rclone config:
      # Create isolated config
      rclone config --config ~/123pan-rclone.conf
      
      # Use it with the skill
      export RCLONE_CONFIG="$HOME/123pan-rclone.conf"
      
  2. Credential Storage

    • Use environment variables (not hardcoded in files)
    • Or use .env file (add to .gitignore)
    • Never commit credentials to version control
  3. Upload Timeouts

    • Large files involve long-running API verification
    • May take 30-90 seconds after upload completes
    • Script includes automatic retry logic

Configuration

Required for API Uploads

export PAN123_ACCESS_TOKEN="your_access_token"
export PAN123_DIRECT_FOLDER_ID="your_folder_id"
  • PAN123_ACCESS_TOKEN: Get from \x3Chttps://www.123pan.com/dashboard/dev>
  • PAN123_DIRECT_FOLDER_ID: The numeric ID of a folder with direct link enabled

Optional for WebDAV Uploads (>10GB files)

export PAN123_WEBDAV_USER="your_webdav_username"
export PAN123_WEBDAV_PASS="your_webdav_password"
export RCLONE_BIN="/path/to/rclone"  # Optional, defaults to system PATH
export RCLONE_CONFIG="$HOME/123pan-rclone.conf"  # Recommended for isolation

WebDAV Setup

  1. Login to \x3Chttps://www.123pan.com>
  2. Go to: Account → Third-party Mount → WebDAV Authorization
  3. Create an app to get WebDAV credentials
  4. Important: Set up isolated rclone config:
    # This creates a config file that only contains 123pan
    rclone config --config ~/123pan-rclone.conf
    # Follow prompts to add "123pan-webdav" remote
    
    # Export the config path
    export RCLONE_CONFIG="$HOME/123pan-rclone.conf"
    

Quick Start

# Default: returns short share link (recommended)
python scripts/upload.py --file /path/to/file

# Get direct link instead
python scripts/upload.py --file /path/to/file --short-link=false

Usage

Default (Short Link)

Returns privacy-friendly short link:

python scripts/upload.py --file /path/to/file.txt
# Output: https://www.123pan.com/s/xxxxx

Direct Link (Long URL)

Returns direct download link (contains user ID in URL):

python scripts/upload.py --file /path/to/file.txt --short-link=false

Specify Target Folder

python scripts/upload.py --file /path/to/file.txt --folder 30767843

Output Format

Short Link (Default)

{
  "success": true,
  "file_id": 12345678,
  "filename": "example.zip",
  "size": 10485760,
  "link": "https://www.123pan.com/s/xxxxx",
  "link_type": "short_link"
}

Direct Link

{
  "success": true,
  "file_id": 12345678,
  "filename": "example.zip",
  "size": 10485760,
  "link": "https://xxx.v.123pan.cn/xxx/xxx/example.zip",
  "link_type": "direct_link"
}

API Workflow

  1. Get upload domain - Call /upload/v2/file/domain to get upload server
  2. Upload file - POST to /upload/v2/file/single/create (\x3C1GB files)
  3. Create share link (default) - POST /api/v1/share/create for short link
  4. Get direct link (optional) - GET /api/v1/direct-link/url?fileID={id}

Privacy Note

  • Short links (--short-link): Privacy-friendly format, no user ID exposed in URL
  • Direct links: Contain user ID and full path, less private but allows direct download

Limitations

  • Single upload limit: 1GB per file for single-step upload
  • Chunked upload supports up to 10GB per file (API limit)
  • Requires folder with direct link enabled

Large Files (>10GB)

For files larger than 10GB, use WebDAV instead:

Option 1: Simple WebDAV Upload

# Set up environment first
export PAN123_WEBDAV_USER="your_user"
export PAN123_WEBDAV_PASS="your_pass"
export RCLONE_CONFIG="$HOME/123pan-rclone.conf"  # Isolated config

python scripts/upload_rclone.py --file /path/to/large/file --verify

Option 2: WebDAV Upload + Auto Link Generation

export PAN123_ACCESS_TOKEN="your_token"
export PAN123_WEBDAV_USER="your_user"
export PAN123_WEBDAV_PASS="your_pass"
export RCLONE_CONFIG="$HOME/123pan-rclone.conf"

# Upload via WebDAV, then use API to find file and generate direct link
python scripts/upload_webdav_link.py --file /path/to/large/file

# Generate share link instead
python scripts/upload_webdav_link.py --file /path/to/large/file --link-type share

Note: WebDAV uploads may take 30-90 seconds to appear in API listings due to indexing delays.

安全使用建议
This skill is internally consistent with its stated purpose, but take these precautions before installing: (1) Source is unknown — review the included scripts yourself or run them in a sandbox if you don't trust the author. (2) Do not place unrelated credentials in your default rclone config: set RCLONE_CONFIG to an isolated file and only put 123pan credentials there, or use environment variables. (3) Provide only a 123pan API token with the minimal required scope (don't reuse broad or highly privileged tokens). (4) Ensure Python dependencies (requests, webdav3) are installed in an isolated virtualenv to avoid unexpected package interactions. (5) The scripts may perform long-running polling and spawn rclone subprocesses; expect network traffic only to 123pan endpoints and rclone destinations. (6) If you want higher assurance, run the upload scripts manually (not via an automated agent) the first time to confirm behavior and outputs.
功能分析
Type: OpenClaw Skill Name: 123pan-upload Version: 1.0.4 The skill bundle provides legitimate functionality for uploading files to the 123pan cloud service using its official OpenAPI and WebDAV protocols. The implementation is security-conscious, featuring explicit warnings about rclone configuration isolation and providing guidance on secure credential management in SKILL.md and manifest.json. The Python scripts (upload.py, upload_rclone.py) use parameterized subprocess calls and standard API interactions without any evidence of data exfiltration, obfuscation, or malicious intent.
能力评估
Purpose & Capability
Name/description, manifest, SKILL.md and code all consistently implement 123pan uploads (API for <1GB, chunked uploads, WebDAV/rclone for large files). Required env vars (PAN123_ACCESS_TOKEN, PAN123_DIRECT_FOLDER_ID, optional WebDAV creds) match the stated functionality and no unrelated credentials or external services are requested.
Instruction Scope
Runtime instructions and code stay within the upload/share workflow (calling 123pan API endpoints and WebDAV/rclone). The SKILL.md explicitly warns about rclone config leaking other cloud credentials and recommends using an isolated RCLONE_CONFIG. Note: the scripts will read local config.json (in the skill) and may read ~/.config/rclone/rclone.conf if RCLONE_CONFIG is not set; webdav script also inserts the user's local site-packages path to sys.path to import webdav3. These behaviors are relevant to scope and are documented but worth attention.
Install Mechanism
No install spec (instruction-only installation), which means the included Python scripts will run directly. The package does not auto-download code from arbitrary URLs. However, the manifest/README do not fully enumerate Python dependencies (requests is mentioned; webdav3 is used but not listed in manifest). The scripts call subprocesses (rclone) and expect rclone to be present or at a default path; they do not auto-install rclone.
Credentials
Environment variables requested are proportional and specific to the 123pan use case: PAN123_ACCESS_TOKEN and PAN123_DIRECT_FOLDER_ID are required; PAN123_WEBDAV_USER/PASS, RCLONE_BIN and RCLONE_CONFIG are optional and justified for WebDAV/rclone flows. There are no unrelated tokens/keys requested.
Persistence & Privilege
The skill is not marked always:true and is user-invocable. It does not request permanent platform-wide privileges or modify other skills. It executes user-local commands (Python, rclone) at runtime as expected for an uploader.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install 123pan-upload
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /123pan-upload 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.4
**Security improvements and configuration updates for safer rclone/WebDAV usage:** - Added a prominent security notice encouraging users to isolate rclone config and avoid credential leakage when using WebDAV features. - Clarified required and optional environment variables for both API and WebDAV uploads. - Provided step-by-step instructions for setting up an isolated rclone configuration dedicated to 123pan. - Recommended best practices for credential storage (environment variables or `.env`, never code or version control). - Noted upload delays and built-in retry logic for large file uploads via WebDAV. - No functional changes to file upload workflows or API usage.
v1.0.2
- Added support for WebDAV uploads, enabling handling of files larger than 10GB. - Introduced new scripts: upload_rclone.py, upload_webdav_link.py, and webdav_upload.py for advanced upload and link-generation workflows. - Updated documentation to explain WebDAV setup, usage, and API indexing delays. - Removed legacy and redundant files (api-reference.md, references/api-reference.md, upload.py). - Single-step upload remains limited to 1GB; chunked and WebDAV uploads extend maximum supported file size.
v1.0.1
Version 1.0.1 adds support for large file uploads via WebDAV. - Added scripts for uploading via rclone/WebDAV and for auto-generating share links after WebDAV upload. - Updated documentation to explain WebDAV upload workflow and new file size limits. - Removed legacy scripts and API documentation files. - Large file support increased: single-step upload up to 1GB, chunked upload up to 10GB, and WebDAV for files larger than 10GB.
v1.0.0
123pan-upload 1.0.0 - Initial release: upload files to 123pan (123云盘) and generate shareable links. - Supports both privacy-friendly short links and direct download links. - CLI tool for uploading files under 1GB in a single step. - Lets you specify target folder and link format via command-line options. - Output includes file details and generated link in JSON format.
元数据
Slug 123pan-upload
版本 1.0.4
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

123pan upload and share 是什么?

Upload files to 123pan (123云盘) and generate shareable links. Use when users need to upload files to 123pan and get links for sharing. Supports short share li... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 417 次。

如何安装 123pan upload and share?

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

123pan upload and share 是免费的吗?

是的,123pan upload and share 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

123pan upload and share 支持哪些平台?

123pan upload and share 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 123pan upload and share?

由 solarise94(@solarise94)开发并维护,当前版本 v1.0.4。

💬 留言讨论