The Agent Skills Directory
npx skills add https://skills.volces.com/skills/bytedance/agentkit-samples此技能提供将文件和目录上传至火山引擎 TOS(Torch Object Storage)以及从 URL 下载文件的实用工具。
TOS(Torch Object Storage) 是火山引擎的对象存储服务,类似于 AWS S3。此技能支持:
当用户提供文件 URL(TOS 或外部)时,在处理前下载它们:
# 下载单个文件
python scripts/file_download.py https://example.com/data.csv
# 下载多个文件
python scripts/file_download.py https://example.com/data.csv https://example.com/config.json
# 指定保存目录和文件名
python scripts/file_download.py https://example.com/data.csv --save-dir /workspace --filenames dataset.csv
生成文件或目录(视频、图表、报告、输出文件夹等)后,将它们上传到 TOS 以供用户访问:
# 上传单个文件(自动检测)
python scripts/tos_upload.py /path/to/output.mp4 --bucket my-bucket
# 上传整个目录(自动检测)
python scripts/tos_upload.py /path/to/output_folder --bucket my-bucket
# 使用自定义区域和过期时间上传
python scripts/tos_upload.py /path/to/report.pdf --bucket my-bucket --region cn-beijing --expires 86400
scripts/file_download.py从 URL 下载文件到本地存储。
用法:
python scripts/file_download.py <url1> [url2 ...] [--save-dir DIR] [--filenames NAME1 NAME2 ...]
参数:
urls:要下载的一个或多个 URL(位置参数,必需)--save-dir:保存目录(可选,默认为 /tmp)--filenames:下载文件的自定义文件名(可选,必须与 URL 数量匹配)示例:
# 下载单个文件到 /tmp
python scripts/file_download.py https://tos-cn-beijing.volces.com/bucket/file.pdf
# 下载到指定目录
python scripts/file_download.py https://example.com/data.json --save-dir /workspace/data
# 使用自定义名称下载多个文件
python scripts/file_download.py \
https://example.com/file1.pdf \
https://example.com/file2.jpg \
--save-dir /workspace \
--filenames document.pdf image.jpg
返回: 打印下载文件的绝对路径(每行一个)
scripts/tos_upload.py将文件或目录上传到 TOS,并生成签名访问 URL(针对文件)或 TOS 路径(针对目录)。
主要特性:
TOOL_USER_SESSION_ID 环境变量来组织上传用法:
python scripts/tos_upload.py <path> --bucket BUCKET [--region REGION] [--expires SECONDS]
参数:
path:要上传的本地文件或目录路径(位置参数,必需)--bucket:TOS 存储桶名称(必需)--region:TOS 区域(可选,默认为 cn-beijing)--expires:签名 URL 过期时间(秒)(可选,默认为 604800 = 7 天,仅适用于文件上传)上传结构:
upload/{session_prefix}/{filename}
upload/skill_agent_veadk_default_user_tmp-session-20251210150057/video.mp4upload/{session_prefix}/{directory_name}/{relative_path}
upload/skill_agent_veadk_default_user_tmp-session-20251210150057/output_folder/file1.txt会话前缀:
TOOL_USER_SESSION_ID,则使用该值作为前缀YYYYMMDD_HHMMSS认证: 需要以下之一:
VOLCENGINE_ACCESS_KEY 和 VOLCENGINE_SECRET_KEY示例:
# 上传单个文件(自动检测)
python scripts/tos_upload.py /workspace/output.mp4 --bucket my-bucket
# 上传整个目录(自动检测)
python scripts/tos_upload.py /workspace/results_folder --bucket my-bucket
# 上传到不同区域,过期时间为 1 天
python scripts/tos_upload.py /workspace/report.pdf \
--bucket my-reports \
--region cn-beijing \
--expires 86400
# 使用所有选项上传目录
python scripts/tos_upload.py /workspace/output_dir \
--bucket data-storage \
--region cn-beijing
返回:
tos://bucket-name/path/to/directory 的 TOS 路径输出示例:
# 文件上传输出
============================================================
✅ 上传成功!
============================================================
签名 URL:
https://my-bucket.tos-cn-beijing.volces.com/upload/skill_agent_xxx/video.mp4?X-Tos-Signature=...
============================================================
# 目录上传输出
============================================================
✅ 上传成功!
============================================================
TOS 路径:
tos://my-bucket/upload/skill_agent_xxx/output_folder
============================================================
VOLCENGINE_ACCESS_KEY:用于 TOS 认证的火山引擎访问密钥VOLCENGINE_SECRET_KEY:用于 TOS 认证的火山引擎秘密密钥TOOL_USER_SESSION_ID:用于生成有组织上传路径的会话 ID(可选,回退到时间戳)视频处理:下载源视频 → 处理 → 上传结果
# 下载
python scripts/file_download.py https://example.com/input.mp4 --save-dir /workspace
# 处理视频(此处为您的代码)
# 上传结果
python scripts/tos_upload.py /workspace/output.mp4 --bucket video-storage
数据分析:下载数据集 → 分析 → 上传图表/报告文件夹
# 下载数据
python scripts/file_download.py https://example.com/data.csv --save-dir /workspace
# 分析并生成图表(此处为您的代码)
# 上传整个结果文件夹
python scripts/tos_upload.py /workspace/analysis_results --bucket analysis-bucket
批量处理:处理多个文件并上传输出目录
# 处理文件(此处为您的代码,生成 /workspace/batch_output/)
# 上传整个输出目录
python scripts/tos_upload.py /workspace/batch_output --bucket batch-results
项目导出:上传完整的项目目录结构
# 上传包含子目录的项目目录
python scripts/tos_upload.py /workspace/my_project --bucket project-storage
# 结果:tos://project-storage/upload/{session_id}/my_project/...
VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY are not provided or IAM Role is not configured.,请告知用户他们需要提供 VOLCENGINE_ACCESS_KEY 和 VOLCENGINE_SECRET_KEY 环境变量。将其写入工作空间的环境变量文件中。如果文件已存在,则追加到末尾。确保环境变量格式正确,使环境变量生效,并重试刚刚失败的任务。--expires 调整)tos://bucket/path 格式返回以供参考--bucket 参数指定存储桶名称(必需)每周安装数
92
来源
首次出现
2026年3月11日
安全审计
安装于
openclaw73
claude-code20
kimi-cli19
opencode17
gemini-cli17
github-copilot17
This skill provides utilities for uploading files and directories to Volcano Engine TOS (Torch Object Storage) and downloading files from URLs.
TOS (Torch Object Storage) is Volcano Engine's object storage service, similar to AWS S3. This skill enables:
When users provide file URLs (TOS or external), download them before processing:
# Download single file
python scripts/file_download.py https://example.com/data.csv
# Download multiple files
python scripts/file_download.py https://example.com/data.csv https://example.com/config.json
# Specify save directory and filenames
python scripts/file_download.py https://example.com/data.csv --save-dir /workspace --filenames dataset.csv
After generating files or directories (videos, charts, reports, output folders, etc.), upload them to TOS for user access:
# Upload single file (auto-detected)
python scripts/tos_upload.py /path/to/output.mp4 --bucket my-bucket
# Upload entire directory (auto-detected)
python scripts/tos_upload.py /path/to/output_folder --bucket my-bucket
# Upload with custom region and expiration
python scripts/tos_upload.py /path/to/report.pdf --bucket my-bucket --region cn-beijing --expires 86400
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
scripts/file_download.pyDownload files from URLs to local storage.
Usage:
python scripts/file_download.py <url1> [url2 ...] [--save-dir DIR] [--filenames NAME1 NAME2 ...]
Arguments:
urls: One or more URLs to download (positional, required)--save-dir: Save directory (optional, defaults to /tmp)--filenames: Custom filenames for downloaded files (optional, must match number of URLs)Examples:
# Download single file to /tmp
python scripts/file_download.py https://tos-cn-beijing.volces.com/bucket/file.pdf
# Download to specific directory
python scripts/file_download.py https://example.com/data.json --save-dir /workspace/data
# Download multiple files with custom names
python scripts/file_download.py \
https://example.com/file1.pdf \
https://example.com/file2.jpg \
--save-dir /workspace \
--filenames document.pdf image.jpg
Returns: Prints absolute paths of downloaded files (one per line)
scripts/tos_upload.pyUpload files or directories to TOS and generate signed access URLs (for files) or TOS paths (for directories).
Key Features:
TOOL_USER_SESSION_ID environment variable to organize uploadsUsage:
python scripts/tos_upload.py <path> --bucket BUCKET [--region REGION] [--expires SECONDS]
Arguments:
path: Local file or directory path to upload (positional, required)--bucket: TOS bucket name (required)--region: TOS region (optional, defaults to cn-beijing)--expires: Signed URL expiration in seconds (optional, defaults to 604800 = 7 days, only applies to file uploads)Upload Structure:
upload/{session_prefix}/{filename}
upload/skill_agent_veadk_default_user_tmp-session-20251210150057/video.mp4upload/{session_prefix}/{directory_name}/{relative_path}
upload/skill_agent_veadk_default_user_tmp-session-20251210150057/output_folder/file1.txtSession Prefix:
TOOL_USER_SESSION_ID is set, uses that value as prefixYYYYMMDD_HHMMSSAuthentication: Requires one of:
VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEYExamples:
# Upload single file (auto-detected)
python scripts/tos_upload.py /workspace/output.mp4 --bucket my-bucket
# Upload entire directory (auto-detected)
python scripts/tos_upload.py /workspace/results_folder --bucket my-bucket
# Upload to different region with 1-day expiration
python scripts/tos_upload.py /workspace/report.pdf \
--bucket my-reports \
--region cn-beijing \
--expires 86400
# Upload directory with all options
python scripts/tos_upload.py /workspace/output_dir \
--bucket data-storage \
--region cn-beijing
Returns:
tos://bucket-name/path/to/directoryOutput Examples:
# File upload output
============================================================
✅ Upload Successful!
============================================================
Signed URL:
https://my-bucket.tos-cn-beijing.volces.com/upload/skill_agent_xxx/video.mp4?X-Tos-Signature=...
============================================================
# Directory upload output
============================================================
✅ Upload Successful!
============================================================
TOS Path:
tos://my-bucket/upload/skill_agent_xxx/output_folder
============================================================
VOLCENGINE_ACCESS_KEY: Volcano Engine access key for TOS authenticationVOLCENGINE_SECRET_KEY: Volcano Engine secret key for TOS authenticationTOOL_USER_SESSION_ID: Session ID used to generate organized upload paths (optional, falls back to timestamp)Video Processing : Download source video → process → upload result
# Download
python scripts/file_download.py https://example.com/input.mp4 --save-dir /workspace
# Process video (your code here)
# Upload result
python scripts/tos_upload.py /workspace/output.mp4 --bucket video-storage
Data Analysis : Download datasets → analyze → upload charts/reports folder
# Download data
python scripts/file_download.py https://example.com/data.csv --save-dir /workspace
# Analyze and generate charts (your code here)
# Upload entire results folder
python scripts/tos_upload.py /workspace/analysis_results --bucket analysis-bucket
Batch Processing : Process multiple files and upload output directory
# Process files (your code here, generates /workspace/batch_output/)
# Upload entire output directory
python scripts/tos_upload.py /workspace/batch_output --bucket batch-results
Project Export : Upload a complete project directory structure
# Upload project directory with subdirectories
python scripts/tos_upload.py /workspace/my_project --bucket project-storage
# Result: tos://project-storage/upload/{session_id}/my_project/...
VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY are not provided or IAM Role is not configured., inform the user that they need to provide the VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY environment variable. Write it to the environment variable file in the workspace. If the file already exists, append it to the end. Ensure the environment variable format is correct, make the environment variable effective, and retry the task that just failed.--expires)tos://bucket/path format for reference--bucket parameter (required)Weekly Installs
92
Source
First Seen
Mar 11, 2026
Security Audits
Installed on
openclaw73
claude-code20
kimi-cli19
opencode17
gemini-cli17
github-copilot17
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
104,900 周安装
WhoDB数据库助手:简化数据库操作,支持SQL查询、模式探索与数据导出
93 周安装
Xcode MCP 设置指南:连接 Claude、Cursor、VS Code 等 AI 助手到 Xcode 开发环境
101 周安装
Kotlin Multiplatform AGP 9.0 迁移指南:解决插件兼容性与项目重构
71 周安装
Vercel安全与访问控制:RBAC、SSO、部署保护、防火墙、审计日志配置指南
98 周安装
Better Auth Core - TypeScript身份验证库,支持无状态会话和社交登录
104 周安装
Medusa 开源无头电商系统 - 基于 Node.js 和 TypeScript 的完全可定制电商平台
95 周安装