brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
tos-file-accessUpload files or directories to TOS-compatible object storage for Volcano Engine or BytePlus and download files from URLs. Use this skill when (1) Upload Agent-generated files or directories for sharing, (2) Download files from URLs before Agent processing.
Independent GitHub snapshot · Automated classification · Original documentation governs
This skill provides utilities for uploading files and directories to TOS-compatible object storage for Volcano Engine or BytePlus, and downloading files from URLs.
TOS-compatible object storage is used by Volcano Engine and BytePlus, 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 to BytePlus with custom expiration
TOS_REGION=ap-southeast-1 python scripts/tos_upload.py /path/to/report.pdf --bucket my-bucket --expires 86400
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 TOS_REGION, DATABASE_TOS_REGION, or provider default: ap-southeast-1 for BytePlus, cn-beijing for Volcano Engine)--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_HHMMSSCloud provider and authentication: Requires one of:
TOS_REGION=ap-southeast-1 selects BytePlus endpoint firstCLOUD_PROVIDER=byteplus selects BytePlus endpoint when TOS_REGION is not ap-southeast-1VOLCENGINE_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 BytePlus with 1-day expiration
TOS_REGION=ap-southeast-1 python scripts/tos_upload.py /workspace/report.pdf \
--bucket my-reports \
--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
============================================================
TOS_REGION: TOS region (optional). ap-southeast-1 selects BytePlus endpoint.CLOUD_PROVIDER: Cloud provider (optional). byteplus selects BytePlus endpoint when TOS_REGION is not ap-southeast-1; otherwise Volcano Engine endpoint is used.VOLCENGINE_ACCESS_KEY: Access key for object storage authenticationVOLCENGINE_SECRET_KEY: Secret key for object storage authenticationDATABASE_TOS_REGION: Optional region fallback when --region and TOS_REGION are not providedTOOL_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)TOS_REGION=ap-southeast-1 takes priority for BytePlus. Otherwise CLOUD_PROVIDER=byteplus selects BytePlus. All other cases use Volcano Engine.