Weiyun Skills
This skill should be used when the user needs to manage Tencent Weiyun cloud storage, including file upload/download, sharing, space management, and account...
This skill should be used when the user needs to manage Tencent Weiyun cloud storage, including file upload/download, sharing, space management, and account...
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
使用方法:本文档定义了所有可用的腾讯微云管理 Skills。AI Agent 或开发者可根据此文档调用 Python 脚本完成云存储操作。
认证方式(二选一):
# Method 1: QR code login (recommended) python weiyun_skills/login.py --method qrcodeMethod 2: Copy cookies from browser
python weiyun_skills/login.py --method cookies --cookies "uin=o012345678; skey=@abcdef1234; ..."调用方式:
# CLI python weiyun_skills/main.py <command> [args] [options]Python SDK
from weiyun_skills.client import WeiyunClient client = WeiyunClient() client.<skill_name>(**params)统一返回格式:
{ "success": true, "data": { ... }, "message": "ok" }
描述:生成腾讯微云登录二维码,用户使用微信/QQ 扫码完成认证。登录成功后自动保存 Cookies 到
cookies.json。
CLI:
python weiyun_skills/login.py --method qrcode
Python:
from weiyun_skills.login import qrcode_logincookies = qrcode_login()
Terminal will display QR code, scan with WeChat/QQ
After success, cookies are saved to cookies.json
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ❌ | | Cookies 保存路径 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 是否登录成功 |
| | 用户 UIN |
| | 用户昵称 |
| | Cookies 字符串 |
| | Cookies 保存路径 |
流程:
┌─────────────┐ ┌──────────────┐ ┌─────────────┐ │ Request QR │────▶│ Display QR │────▶│ User scans │ │ code URL │ │ in terminal │ │ with WeChat │ └─────────────┘ └──────────────┘ └──────┬──────┘ │ ┌─────────────┐ ┌──────────────┐ │ │ Save to │◀────│ Get cookies │◀────────────┘ │ cookies.json│ │ from server │ └─────────────┘ └──────────────┘
描述:使用从浏览器复制的 Cookies 字符串完成登录认证。
CLI:
python weiyun_skills/login.py --method cookies --cookies "uin=o012345678; skey=@abcdef1234; p_uin=o012345678; pt4_token=xxxxx; p_skey=xxxxx"
Python:
from weiyun_skills.login import cookies_logincookies = cookies_login( cookies_str="uin=o012345678; skey=@abcdef1234; ..." )
如何获取 Cookies:
F12 打开开发者工具Network(网络)标签页Headers(请求头)中找到 Cookie 字段输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 从浏览器复制的 Cookie 字符串 |
| | ❌ | | Cookies 保存路径 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 是否验证成功 |
| | 用户 UIN |
| | 用户昵称 |
| | Cookies 保存路径 |
描述:列出微云指定目录下的所有文件和文件夹。
CLI:
python weiyun_skills/main.py list / python weiyun_skills/main.py list /我的文档 --sort size --order desc
Python:
files = client.list_files("/我的文档", sort_by="size", sort_order="desc")
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ❌ | | 目录路径,默认根目录 |
| | ❌ | | 排序字段:// |
| | ❌ | | 排序方向:/ |
| | ❌ | | 分页页码 |
| | ❌ | | 每页数量 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 文件列表 |
| | 文件唯一 ID |
| | 文件名 |
| | 或 |
| | 大小(字节) |
| | 可读大小(如 ) |
| | 完整路径 |
| | 最后修改时间 |
| | 总数量 |
示例输出:
{ "success": true, "data": { "files": [ { "file_id": "f_abc123", "name": "report.pdf", "type": "file", "size": 2621440, "size_str": "2.5 MB", "path": "/我的文档/report.pdf", "updated_at": "2026-03-15 10:30:00" }, { "file_id": "d_folder01", "name": "照片", "type": "folder", "size": 0, "size_str": "-", "path": "/我的文档/照片", "updated_at": "2026-03-14 08:00:00" } ], "total": 2 }, "message": "ok" }
描述:将本地文件上传到微云指定目录。支持大文件分片上传。
CLI:
python weiyun_skills/main.py upload ./report.pdf /我的文档/ python weiyun_skills/main.py upload ./big_video.mp4 /视频/ --overwrite
Python:
result = client.upload_file("./report.pdf", "/我的文档/report.pdf", overwrite=True)
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 本地文件路径 |
| | ✅ | - | 微云目标路径 |
| | ❌ | | 是否覆盖同名文件 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 上传后的文件 ID |
| | 文件名 |
| | 文件大小 |
| | 云端路径 |
| | 文件 MD5 |
| | 上传时间 |
描述:将本地文件夹递归上传到微云,自动创建对应的目录结构。跳过隐藏文件和
__pycache__ 等缓存目录。
CLI:
# Upload folder to Weiyun root python weiyun_skills/main.py upload-folder ./my_docs/Upload folder to a specific remote directory
python weiyun_skills/main.py upload-folder ./my_docs/ /目标文件夹/
Overwrite existing files
python weiyun_skills/main.py upload-folder ./my_docs/ / --overwrite
Python:
# Upload to root result = client.upload_folder("./my_docs/")Upload to a specific folder, overwrite existing
result = client.upload_folder("./my_docs/", remote_path="/目标文件夹/", overwrite=True)
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 本地文件夹路径 |
| | ❌ | | 微云目标路径( 表示根目录) |
| | ❌ | | 是否覆盖同名文件 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 上传的文件夹名称 |
| | 成功上传的文件列表 |
| | 文件名 |
| | 文件大小(字节) |
| | 可读大小 |
| | 是否秒传 |
| | 上传失败的文件列表 |
| | 文件名 |
| | 错误信息 |
| | 成功上传数量 |
| | 失败数量 |
| | 总上传大小 |
| | 上传耗时(秒) |
示例输出:
{ "success": true, "data": { "folder_name": "upload_file", "uploaded_files": [ { "name": "abc.txt", "size": 6, "size_str": "6.00 B", "instant_upload": false } ], "failed_files": [], "uploaded_count": 1, "failed_count": 0, "total_size_str": "6.00 B", "elapsed": 2.35 }, "message": "ok" }
描述:从微云下载文件到本地。
CLI:
python weiyun_skills/main.py download /我的文档/report.pdf ./downloads/ python weiyun_skills/main.py download /我的文档/report.pdf ./downloads/ --overwrite
Python:
result = client.download_file("/我的文档/report.pdf", "./downloads/report.pdf")
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 微云文件路径 |
| | ✅ | - | 本地保存路径 |
| | ❌ | | 是否覆盖本地文件 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 本地保存路径 |
| | 文件大小 |
| | MD5 校验值 |
| | 下载耗时(秒) |
描述:从微云下载整个文件夹到本地。支持两种模式:递归下载(保留目录结构)和打包下载(下载为 zip 文件)。
CLI:
# Recursive download (preserves folder structure) python weiyun_skills/main.py download-folder QQ ./downloads/ python weiyun_skills/main.py download-folder QQ ./downloads/ --overwriteDownload as zip
python weiyun_skills/main.py download-folder QQ ./downloads/ --zip
Python:
# Recursive download result = client.download_folder("QQ", "./downloads/")Download as zip
result = client.download_folder("QQ", "./downloads/", as_zip=True)
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 微云上的文件夹名称 |
| | ✅ | - | 本地保存目录(或 zip 文件路径) |
| | ❌ | | 是否覆盖已存在的本地文件 |
| | ❌ | | 是否打包为 zip 下载 |
输出参数(递归模式):
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 文件夹名称 |
| | 本地保存路径 |
| | 成功下载的文件列表 |
| | 文件名 |
| | 本地路径 |
| | 文件大小(字节) |
| | 可读大小 |
| | 下载失败的文件列表 |
| | 文件名 |
| | 错误信息 |
| | 成功下载数量 |
| | 失败数量 |
| | 总下载大小 |
| | 下载耗时(秒) |
输出参数(zip 模式):
| 参数名 | 类型 | 说明 |
|---|---|---|
| | zip 文件本地路径 |
| | 文件大小(字节) |
| | 可读大小 |
| | MD5 校验值 |
| | 下载耗时(秒) |
示例输出(递归模式):
{ "success": true, "data": { "folder_name": "QQ", "local_path": "./downloads/QQ", "downloaded_files": [ { "name": "report.pdf", "local_path": "./downloads/QQ/report.pdf", "size": 8663503, "size_str": "8.26 MB" } ], "failed_files": [], "downloaded_count": 6, "failed_count": 0, "total_size_str": "33.11 MB", "elapsed": 5.88 }, "message": "ok" }
描述:删除微云文件或文件夹(移入回收站)。
CLI:
python weiyun_skills/main.py delete /我的文档/old_file.pdf python weiyun_skills/main.py delete /我的文档/old_file.pdf --permanent
Python:
result = client.delete_file("/我的文档/old_file.pdf", permanent=False)
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 文件/文件夹路径 |
| | ❌ | | 是否永久删除(跳过回收站) |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 已删除的路径 |
| | 是否永久删除 |
| | 删除时间 |
描述:将文件或文件夹移动到另一个目录。
CLI:
python weiyun_skills/main.py move /我的文档/report.pdf /归档/2026/
Python:
result = client.move_file("/我的文档/report.pdf", "/归档/2026/")
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 源路径 |
| | ✅ | - | 目标目录路径 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 原路径 |
| | 新路径 |
描述:复制文件或文件夹到另一个目录。
CLI:
python weiyun_skills/main.py copy /我的文档/report.pdf /备份/
Python:
result = client.copy_file("/我的文档/report.pdf", "/备份/")
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 源路径 |
| | ✅ | - | 目标目录路径 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 源路径 |
| | 副本路径 |
| | 副本文件 ID |
描述:重命名文件或文件夹。
CLI:
python weiyun_skills/main.py rename /我的文档/report.pdf "年度报告.pdf"
Python:
result = client.rename_file("/我的文档/report.pdf", "年度报告.pdf")
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 文件当前路径 |
| | ✅ | - | 新文件名 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 原路径 |
| | 新路径 |
描述:在微云上创建文件夹,支持递归创建多级目录。
CLI:
python weiyun_skills/main.py mkdir /工作/2026/Q1/报告
Python:
result = client.create_folder("/工作/2026/Q1/报告")
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 文件夹路径 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 文件夹 ID |
| | 完整路径 |
| | 创建时间 |
描述:按关键词搜索微云中的文件。
CLI:
python weiyun_skills/main.py search "报告" python weiyun_skills/main.py search "报告" --type document
Python:
results = client.search_files("报告", file_type="document")
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 搜索关键词 |
| | ❌ | | 类型过滤://// |
| | ❌ | | 分页页码 |
| | ❌ | | 每页数量 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 搜索结果列表 |
| | 文件 ID |
| | 文件名 |
| | 类型 |
| | 可读大小 |
| | 路径 |
| | 匹配总数 |
描述:为文件或文件夹创建分享链接,支持设置密码和有效期。
CLI:
python weiyun_skills/main.py share /我的文档/report.pdf python weiyun_skills/main.py share /我的文档/report.pdf --expire 7 --password abc1
Python:
share = client.create_share( "/我的文档/report.pdf", expire_days=7, password="abc1" ) print(share["share_url"])
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 文件/文件夹路径 |
| | ❌ | | 分享密码(4 位) |
| | ❌ | | 有效天数,0 为永久 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 分享 ID |
| | 分享链接 |
| | 分享密码 |
| | 过期时间 |
| | 创建时间 |
示例输出:
{ "success": true, "data": { "share_id": "s_abc123", "share_url": "https://share.weiyun.com/xxxx", "password": "abc1", "expire_at": "2026-03-22 21:00:00", "created_at": "2026-03-15 21:00:00" }, "message": "ok" }
描述:取消已创建的分享链接。
CLI:
python weiyun_skills/main.py unshare s_abc123
Python:
result = client.cancel_share("s_abc123")
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 分享 ID |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 已取消的分享 ID |
| | 取消时间 |
描述:列出当前用户所有的分享链接。
CLI:
python weiyun_skills/main.py shares python weiyun_skills/main.py shares --status active
Python:
shares = client.list_shares(status="active")
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ❌ | | 状态过滤:// |
| | ❌ | | 分页页码 |
| | ❌ | | 每页数量 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 分享列表 |
| | 分享 ID |
| | 分享链接 |
| | 文件名 |
| | 状态 |
| | 查看次数 |
| | 下载次数 |
| | 创建时间 |
| | 过期时间 |
| | 总数量 |
描述:获取微云存储空间使用情况。
CLI:
python weiyun_skills/main.py space
Python:
info = client.get_space_info() print(f"Used: {info['used_space_str']} / {info['total_space_str']}")
输入参数:无
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 总空间(字节) |
| | 可读总空间(如 ) |
| | 已用空间(字节) |
| | 可读已用空间 |
| | 剩余空间(字节) |
| | 可读剩余空间 |
| | 使用百分比 |
| | 文件总数 |
| | 文件夹总数 |
示例输出:
{ "success": true, "data": { "total_space": 10737418240, "total_space_str": "10.00 GB", "used_space": 5368709120, "used_space_str": "5.00 GB", "free_space": 5368709120, "free_space_str": "5.00 GB", "usage_percent": 50.0, "file_count": 1234, "folder_count": 56 }, "message": "ok" }
描述:获取回收站中的文件列表。
CLI:
python weiyun_skills/main.py recycle
Python:
items = client.get_recycle_bin()
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ❌ | | 分页页码 |
| | ❌ | | 每页数量 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 回收站文件列表 |
| | 文件 ID |
| | 文件名 |
| | 可读大小 |
| | 原始路径 |
| | 删除时间 |
| | 总数量 |
| | 回收站总大小 |
描述:从回收站恢复文件到原始位置。
CLI:
python weiyun_skills/main.py restore f_del001
Python:
result = client.restore_file("f_del001")
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 回收站中的文件 ID |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 文件 ID |
| | 恢复后路径 |
| | 恢复时间 |
描述:清空回收站,永久删除所有回收站文件。⚠️ 此操作不可逆!
CLI:
python weiyun_skills/main.py clear-recycle --confirm
Python:
result = client.clear_recycle_bin(confirm=True)
输入参数:
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| | ✅ | - | 必须为 才执行 |
输出参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| | 删除文件数 |
| | 释放的空间大小 |
| | 清空时间 |
| 错误码 | 说明 |
|---|---|
| Cookies 已过期,需重新登录 |
| 认证失败 |
| 文件不存在 |
| 文件夹不存在 |
| 空间已满 |
| 文件过大 |
| 名称重复 |
| 权限不足 |
| 请求频率超限 |
| 网络错误 |
| 分享已过期 |
| 参数无效 |
| 二维码已过期,需刷新 |
| 用户取消了扫码 |
错误响应格式:
{ "success": false, "data": null, "message": "Cookies expired, please re-login", "error_code": "AUTH_EXPIRED" }
| Cookie 名称 | 说明 |
|---|---|
| 用户 QQ 号标识 |
| 会话密钥 |
| 加密的用户标识 |
| 加密的会话密钥 |
| PT4 认证 Token |
| 辅助认证字段 |
提示:并非所有 Cookie 字段都是必需的,核心字段为
、uin、skey。p_skey
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.