Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

alioss-upload别名上传

Agent Skill

alioss-upload 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

291

周安装

12

GitHub Stars

1

下载量

95
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/wvlvik/toy-skills --skill alioss-upload

简介

支持将文件上传至阿里云对象存储 OSS。

  • 通过 Python SDK v2 实现,需配置 Access Key 与 Bucket 信息。
  • 支持自定义域名与递归目录上传,适用于静态资源托管。
  • 通过 GitHub 安装,需提前设置环境变量并确保网络连通。
  • alioss-upload 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

OSS Upload

Upload files and directories to Alibaba Cloud Object Storage Service (OSS) using Python SDK v2.

Configure Environment Variables

Get Access Key

# 在 shell 配置文件中设置 (~/.zshrc, ~/.bashrc, 或 ~/.config/fish/config.fish)
export OSS_ACCESS_KEY_ID="your_access_key_id"
export OSS_ACCESS_KEY_SECRET="your_access_key_secret"
export OSS_REGION="cn-hangzhou"           # 可选, 默认: cn-hangzhou
export OSS_BUCKET="your-bucket-name"      # 可选, 也可通过 --bucket 参数传递
export OSS_DOMAIN="cdn.example.com"       # 可选, 自定义显示域名 (CDN 加速域名等)

# 使环境变量生效 (二选一)
source ~/.zshrc  # 或 source ~/.bashrc

Note: Environment variables must be set in your shell configuration. The script reads from os.environ, so it works automatically when variables are exported in your shell.

Output Behavior (Important)

After upload succeeds, display the OSS URL directly to the user!

When upload completes, output in this format:

✓ Upload complete!
  URL: https://bucket.oss-region.aliyuncs.com/path/to/file
  Key: path/to/file
  Size: 1.5 MB
  ETag: "abc123..."

For images uploaded with --image, the URL is publicly accessible.

Quick Start

Install Dependency

pip install alibabacloud-oss-v2

Important:

  • Ensure the SDK is installed in the same Python environment that will run the script
  • If you see "ModuleNotFoundError", check which Python is being used: which python3
  • You may need to install to a specific Python: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install alibabacloud-oss-v2

Upload Single File

# Basic upload
scripts/upload.py file.txt --bucket my-bucket

# Upload with custom key (path in bucket)
scripts/upload.py photo.jpg --key images/2024/photo.jpg --bucket my-bucket

# Upload with public-read access
scripts/upload.py document.pdf --bucket my-bucket --acl public-read

Upload Image (Public URL)

# Quick image upload with public-read ACL
scripts/upload.py photo.jpg --bucket my-bucket --image

# Output: https://my-bucket.oss-cn-hangzhou.aliyuncs.com/photo.jpg

Specify File Paths

When user wants to upload files, ask them to provide file paths in one of these ways:

1. Direct Path Input (推荐)

用户: 上传 /Users/me/Desktop/photo.png 到 statics/i/img
用户: 上传这张图片到 OSS: /path/to/image.jpg

2. Multiple Files

用户: 上传这些文件: /path/a.png, /path/b.jpg
用户: 批量上传 /Users/me/Downloads/*.png

3. Current File in Editor If user mentions "当前文件" or "this file", ask for the file path:

用户: 上传当前文件
助手: 请提供文件的完整路径,例如: /Users/me/Desktop/image.png

4. Drag & Drop Paths If user provides paths from drag-and-drop (common in terminal):

用户: 上传 /Users/me/Desktop/截图2024-01-01.png

Note: This model does not support image input directly. User must provide file paths as text, not attach images.

Upload from Clipboard (macOS)

使用剪贴板上传文件,无需手动输入路径:

# 步骤 1: 在 Finder 中选择文件
# 步骤 2: 复制文件 (Cmd+C)
# 步骤 3: 运行上传脚本

# 上传复制的文件为图片
scripts/upload-clipboard.sh --images

# 自定义前缀
scripts/upload-clipboard.sh --images --prefix statics/i/img/custom

# 指定 bucket
scripts/upload-clipboard.sh --images --bucket my-bucket

支持的剪贴板内容:

  • Finder 中复制的文件 (Cmd+C)
  • 复制的文件路径文本 (一行一个路径)

示例输出:

Files to upload:
  - /Users/me/Desktop/screenshot.png
  - /Users/me/Desktop/photo.jpg

✓ 上传完成: 2/2 张图片
  Bucket: my-bucket
  Region: cn-hangzhou
  Key 前缀: statics/i/img

Interactive Input (No Paths Required)

When no file paths are provided via command line, the script will prompt for input:

# Run without paths - will prompt interactively
scripts/upload.py --images --bucket my-bucket

# Interactive prompt example:
# Enter file paths to upload (one per line, empty line to finish):
#   Supported formats:
#     - Plain path: /Users/me/photo.jpg
#     - Path with spaces: /Users/me/My Photos/photo.jpg
#     - file:// URL: file:///Users/me/photo.jpg
#     - Home directory: ~/Desktop/photo.png
#   Or paste multiple paths (one per line):
# --------------------------------------------------
# /Users/me/Desktop/photo1.jpg
# /Users/me/My Photos/photo2.png
# ~/Downloads/screenshot.png
# file:///Users/me/Desktop/live-2746.png
#
# (press Enter on empty line to start upload)

Supported Input Formats:

  • Plain paths: /Users/me/photo.jpg
  • Paths with spaces: /Users/me/My Photos/photo.jpg
  • file:// URLs: file:///Users/me/photo.jpg (automatically converted to local path)
  • Home directory: ~/Desktop/photo.png (tilde expansion)
  • Environment variables: $HOME/Desktop/photo.png (expanded automatically)

Path Validation:

  • Invalid paths are automatically filtered out with warnings
  • Duplicates are removed
  • Paths are normalized and resolved to absolute paths

Stdin Pipe Input

# Pipe file paths via stdin
echo "/path/to/file1.jpg /path/to/file2.png" | scripts/upload.py --images --bucket my-bucket

# Or from a file containing paths
cat file_list.txt | scripts/upload.py --images --bucket my-bucket

Upload Multiple Images (推荐)

批量上传多张图片,自动处理中文/特殊字符文件名:

# 上传多张图片 (默认 key 前缀: statics/i/img)
scripts/upload.py img1.jpg img2.png photo.jpg --images --bucket my-bucket

# 自定义 key 前缀
scripts/upload.py photo1.jpg "照片.jpg" banner.png --images --bucket my-bucket --prefix assets/img

# 输出格式:
# ✓ 上传完成: 3/3 张图片
#   Key 前缀: statics/i/img
#
# 上传结果:
#   - statics/i/img/photo1.jpg (photo1.jpg)
#   - statics/i/img/a1b2c3d4e5f6.jpg (照片.jpg)  # 自动重命名
#   - statics/i/img/banner.png (banner.png)

特性:

  • 中文/特殊字符文件名自动重命名为安全的 MD5 哈希名
  • 保持原始文件扩展名
  • 默认公开访问 (public-read)
  • 返回 key + 原始文件名 格式

Upload Directory

# Upload all files in directory
scripts/upload.py ./images --prefix assets/images --bucket my-bucket --dir

# Upload with sanitized filenames (auto-rename Chinese/special chars)
scripts/upload.py ./photos --prefix photos --bucket my-bucket --dir --sanitize

# Upload only JPG files
scripts/upload.py ./photos --prefix photos --bucket my-bucket --dir --pattern "*.jpg"

# Non-recursive (skip subdirectories)
scripts/upload.py ./assets --prefix assets --bucket my-bucket --dir --no-recursive

特性 (with --sanitize):

  • 中文/特殊字符文件名自动重命名为安全的 MD5 哈希名
  • 保持原始文件扩展名
  • 保持目录结构

Upload Large File (Resumable)

# Large file with automatic multipart and resumable upload
scripts/upload.py video.mp4 --bucket my-bucket --large

# Custom part size and parallelism
scripts/upload.py big-data.zip --bucket my-bucket --large --part-size 10 --parallel 5

Command-Line Options

scripts/upload.py PATHS [OPTIONS]
Arguments:
  PATHS                 Local file or directory paths to upload (supports multiple)
Required (one of):
  --bucket, -b          OSS bucket name (or set OSS_BUCKET env var)
  --prefix, -p          OSS key prefix (default for images: statics/i/img)
Upload Modes (mutually exclusive):
  --large, -l           Use multipart upload for large files (with resumable)
  --image, -i           Upload single image with public access
  --images              Upload multiple images (auto-sanitize filenames)
  --dir, -d             Upload directory contents

Options:
  --key, -k             OSS object key (default: filename)
  --region, -r          OSS region (default: cn-hangzhou)
  --domain, -D          Custom domain for display URLs (e.g., cdn.example.com)
  --acl                 Object ACL: private, public-read, public-read-write
  --storage-class       Storage class: Standard, IA, Archive
  --pattern             File pattern for directory upload (default: *)
  --no-recursive        Don't include subdirectories
  --sanitize, -s        Sanitize filenames with Chinese/special chars (for --dir)
  --part-size           Part size in MB for large files (default: 6)
  --parallel            Parallel uploads for large files (default: 3)
  --no-checkpoint       Disable resumable upload

Output:
  --quiet, -q           Suppress progress output
  --json                Output raw JSON response

Environment Variables:
  OSS_ACCESS_KEY_ID       Access Key ID (required)
  OSS_ACCESS_KEY_SECRET   Access Key Secret (required)
  OSS_REGION              Region (default: cn-hangzhou)
  OSS_BUCKET              Default bucket name
  OSS_DOMAIN              Custom domain for display URLs (e.g., cdn.example.com)
  OSS_CHECKPOINT_DIR      Checkpoint directory for resumable uploads

Upload Scenarios

1. Upload Website Assets

# Upload static assets to OSS
scripts/upload.py ./dist --prefix static --bucket my-web-bucket --dir

2. Upload Log Files to Archive

# Upload to Archive storage class for cost savings
scripts/upload.py logs.tar.gz --bucket archive-bucket --storage-class Archive

3. Upload User-Generated Images

# Batch upload with pattern
scripts/upload.py ./uploads --prefix user-content/2024 --bucket media-bucket --dir --pattern "*.jpg"

4. Upload Large Video Files

# Resumable upload for large files (handles network interruptions)
scripts/upload.py ./videos/webinar.mp4 --bucket video-bucket --large --key videos/2024/webinar.mp4

Error Handling

ErrorCauseSolution
NoSuchBucketBucket doesn't existCreate bucket in OSS console
AccessDeniedInvalid credentials or permissionsCheck Access Key and bucket ACL
EntityTooLargeFile exceeds 5GB limitUse --large for multipart upload
InvalidAccessKeyIdWrong Access Key IDVerify OSS_ACCESS_KEY_ID
SignatureDoesNotMatchWrong Secret KeyVerify OSS_ACCESS_KEY_SECRET

OSS URL Format

Uploaded files are accessible at:

https://{bucket}.oss-{region}.aliyuncs.com/{key}

Example:

https://my-bucket.oss-cn-hangzhou.aliyuncs.com/images/photo.jpg

Custom Domain (CDN)

If you have a custom domain or CDN bound to your OSS bucket, use --domain to display custom URLs:

# Using command-line option
scripts/upload.py photo.jpg --bucket my-bucket --image --domain cdn.example.com

# Or set environment variable
export OSS_DOMAIN="cdn.example.com"
scripts/upload.py photo.jpg --bucket my-bucket --image

Output will show:

✓ 上传完成!
  URL: https://cdn.example.com/statics/i/img/photo.jpg
  Key: statics/i/img/photo.jpg

Note: The custom domain only affects the displayed URL, not the actual upload process.

Storage Classes

ClassUse CasePrice
StandardFrequent accessHighest
IA (Infrequent Access)Rare access, 30-day minLower
ArchiveLong-term archival, 60-day minLowest

Reference Documentation

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

38.3%
按下载量换算36

Claude

29.07%
按下载量换算28

Cursor

16.81%
按下载量换算16

Gemini CLI

10.12%
按下载量换算10

安全审计

Gen Agent Trust Hub

未通过

Socket

未通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills