weiyun-management

This skill should be used when the user needs to manage Tencent Weiyun cloud storage, including file upload/download, sharing, space management, and account authentication via QR code scanning or cookies. It provides a complete Python toolkit for automating Weiyun operations with CLI and SDK support. Trigger phrases include "upload to weiyun", "download from weiyun", "weiyun share", "weiyun space", "manage weiyun files", "weiyun login", "scan QR code", "微云管理", "微云上传", "微云下载", "微云分享", "微云空间", "扫码登录", "文件管理", "云存储管理", "微云文件", "weiyun files", "cloud storage".

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "weiyun-management" with this command: npx skills add Wscats/weiyun-skills

SKILL.md — 腾讯微云管理 Skills 定义

使用方法:本文档定义了所有可用的腾讯微云管理 Skills。AI Agent 或开发者可根据此文档调用 Python 脚本完成云存储操作。

认证方式(二选一):

# Method 1: QR code login (recommended)
python weiyun_skills/login.py --method qrcode

# Method 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" }

目录


1. 认证 Skills

1.1 qrcode_login — 扫码登录

描述:生成腾讯微云登录二维码,用户使用微信/QQ 扫码完成认证。登录成功后自动保存 Cookies 到 cookies.json

CLI

python weiyun_skills/login.py --method qrcode

Python

from weiyun_skills.login import qrcode_login

cookies = qrcode_login()
# Terminal will display QR code, scan with WeChat/QQ
# After success, cookies are saved to cookies.json

输入参数

参数名类型必填默认值说明
save_pathstringcookies.jsonCookies 保存路径

输出参数

参数名类型说明
successboolean是否登录成功
uinstring用户 UIN
nicknamestring用户昵称
cookies_strstringCookies 字符串
save_pathstringCookies 保存路径

流程

┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│ Request QR  │────▶│ Display QR   │────▶│ User scans  │
│ code URL    │     │ in terminal  │     │ with WeChat  │
└─────────────┘     └──────────────┘     └──────┬──────┘
                                                 │
┌─────────────┐     ┌──────────────┐             │
│ Save to     │◀────│ Get cookies  │◀────────────┘
│ cookies.json│     │ from server  │
└─────────────┘     └──────────────┘

1.2 cookies_login — Cookies 登录

描述:使用从浏览器复制的 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_login

cookies = cookies_login(
    cookies_str="uin=o012345678; skey=@abcdef1234; ..."
)

如何获取 Cookies

  1. 打开浏览器访问 https://www.weiyun.com/ 并登录
  2. F12 打开开发者工具
  3. 切换到 Network(网络)标签页
  4. 刷新页面,点击任意一个请求
  5. Headers(请求头)中找到 Cookie 字段
  6. 复制完整的 Cookie 值

输入参数

参数名类型必填默认值说明
cookies_strstring-从浏览器复制的 Cookie 字符串
save_pathstringcookies.jsonCookies 保存路径

输出参数

参数名类型说明
successboolean是否验证成功
uinstring用户 UIN
nicknamestring用户昵称
save_pathstringCookies 保存路径

2. 文件管理 Skills

2.1 list_files — 列出文件

描述:列出微云指定目录下的所有文件和文件夹。

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")

输入参数

参数名类型必填默认值说明
remote_pathstring/目录路径,默认根目录
sort_bystringname排序字段:name/size/time
sort_orderstringasc排序方向:asc/desc
pageinteger1分页页码
page_sizeinteger100每页数量

输出参数

参数名类型说明
filesarray文件列表
files[].file_idstring文件唯一 ID
files[].namestring文件名
files[].typestringfilefolder
files[].sizeinteger大小(字节)
files[].size_strstring可读大小(如 2.5 MB
files[].pathstring完整路径
files[].updated_atstring最后修改时间
totalinteger总数量

示例输出

{
  "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"
}

2.2 upload_file — 上传文件

描述:将本地文件上传到微云指定目录。支持大文件分片上传。

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)

输入参数

参数名类型必填默认值说明
local_pathstring-本地文件路径
remote_pathstring-微云目标路径
overwritebooleanfalse是否覆盖同名文件

输出参数

参数名类型说明
file_idstring上传后的文件 ID
namestring文件名
sizeinteger文件大小
remote_pathstring云端路径
md5string文件 MD5
uploaded_atstring上传时间

2.3 download_file — 下载文件

描述:从微云下载文件到本地。

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")

输入参数

参数名类型必填默认值说明
remote_pathstring-微云文件路径
local_pathstring-本地保存路径
overwritebooleanfalse是否覆盖本地文件

输出参数

参数名类型说明
local_pathstring本地保存路径
sizeinteger文件大小
md5stringMD5 校验值
elapsedfloat下载耗时(秒)

2.4 delete_file — 删除文件

描述:删除微云文件或文件夹(移入回收站)。

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)

输入参数

参数名类型必填默认值说明
remote_pathstring-文件/文件夹路径
permanentbooleanfalse是否永久删除(跳过回收站)

输出参数

参数名类型说明
deleted_pathstring已删除的路径
is_permanentboolean是否永久删除
deleted_atstring删除时间

2.5 move_file — 移动文件

描述:将文件或文件夹移动到另一个目录。

CLI

python weiyun_skills/main.py move /我的文档/report.pdf /归档/2026/

Python

result = client.move_file("/我的文档/report.pdf", "/归档/2026/")

输入参数

参数名类型必填默认值说明
source_pathstring-源路径
target_pathstring-目标目录路径

输出参数

参数名类型说明
source_pathstring原路径
target_pathstring新路径

2.6 copy_file — 复制文件

描述:复制文件或文件夹到另一个目录。

CLI

python weiyun_skills/main.py copy /我的文档/report.pdf /备份/

Python

result = client.copy_file("/我的文档/report.pdf", "/备份/")

输入参数

参数名类型必填默认值说明
source_pathstring-源路径
target_pathstring-目标目录路径

输出参数

参数名类型说明
source_pathstring源路径
target_pathstring副本路径
new_file_idstring副本文件 ID

2.7 rename_file — 重命名

描述:重命名文件或文件夹。

CLI

python weiyun_skills/main.py rename /我的文档/report.pdf "年度报告.pdf"

Python

result = client.rename_file("/我的文档/report.pdf", "年度报告.pdf")

输入参数

参数名类型必填默认值说明
remote_pathstring-文件当前路径
new_namestring-新文件名

输出参数

参数名类型说明
old_pathstring原路径
new_pathstring新路径

2.8 create_folder — 创建文件夹

描述:在微云上创建文件夹,支持递归创建多级目录。

CLI

python weiyun_skills/main.py mkdir /工作/2026/Q1/报告

Python

result = client.create_folder("/工作/2026/Q1/报告")

输入参数

参数名类型必填默认值说明
remote_pathstring-文件夹路径

输出参数

参数名类型说明
folder_idstring文件夹 ID
pathstring完整路径
created_atstring创建时间

2.9 search_files — 搜索文件

描述:按关键词搜索微云中的文件。

CLI

python weiyun_skills/main.py search "报告"
python weiyun_skills/main.py search "报告" --type document

Python

results = client.search_files("报告", file_type="document")

输入参数

参数名类型必填默认值说明
keywordstring-搜索关键词
file_typestringall类型过滤:all/document/image/video/audio
pageinteger1分页页码
page_sizeinteger50每页数量

输出参数

参数名类型说明
resultsarray搜索结果列表
results[].file_idstring文件 ID
results[].namestring文件名
results[].typestring类型
results[].size_strstring可读大小
results[].pathstring路径
totalinteger匹配总数

3. 分享管理 Skills

3.1 create_share — 创建分享

描述:为文件或文件夹创建分享链接,支持设置密码和有效期。

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"])

输入参数

参数名类型必填默认值说明
remote_pathstring-文件/文件夹路径
passwordstringnull分享密码(4 位)
expire_daysinteger0有效天数,0 为永久

输出参数

参数名类型说明
share_idstring分享 ID
share_urlstring分享链接
passwordstring分享密码
expire_atstring过期时间
created_atstring创建时间

示例输出

{
  "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"
}

3.2 cancel_share — 取消分享

描述:取消已创建的分享链接。

CLI

python weiyun_skills/main.py unshare s_abc123

Python

result = client.cancel_share("s_abc123")

输入参数

参数名类型必填默认值说明
share_idstring-分享 ID

输出参数

参数名类型说明
share_idstring已取消的分享 ID
cancelled_atstring取消时间

3.3 list_shares — 列出分享

描述:列出当前用户所有的分享链接。

CLI

python weiyun_skills/main.py shares
python weiyun_skills/main.py shares --status active

Python

shares = client.list_shares(status="active")

输入参数

参数名类型必填默认值说明
statusstringall状态过滤:all/active/expired
pageinteger1分页页码
page_sizeinteger20每页数量

输出参数

参数名类型说明
sharesarray分享列表
shares[].share_idstring分享 ID
shares[].share_urlstring分享链接
shares[].file_namestring文件名
shares[].statusstring状态
shares[].view_countinteger查看次数
shares[].download_countinteger下载次数
shares[].created_atstring创建时间
shares[].expire_atstring过期时间
totalinteger总数量

4. 空间管理 Skills

4.1 get_space_info — 空间信息

描述:获取微云存储空间使用情况。

CLI

python weiyun_skills/main.py space

Python

info = client.get_space_info()
print(f"Used: {info['used_space_str']} / {info['total_space_str']}")

输入参数:无

输出参数

参数名类型说明
total_spaceinteger总空间(字节)
total_space_strstring可读总空间(如 10 GB
used_spaceinteger已用空间(字节)
used_space_strstring可读已用空间
free_spaceinteger剩余空间(字节)
free_space_strstring可读剩余空间
usage_percentfloat使用百分比
file_countinteger文件总数
folder_countinteger文件夹总数

示例输出

{
  "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"
}

4.2 get_recycle_bin — 回收站

描述:获取回收站中的文件列表。

CLI

python weiyun_skills/main.py recycle

Python

items = client.get_recycle_bin()

输入参数

参数名类型必填默认值说明
pageinteger1分页页码
page_sizeinteger50每页数量

输出参数

参数名类型说明
filesarray回收站文件列表
files[].file_idstring文件 ID
files[].namestring文件名
files[].size_strstring可读大小
files[].original_pathstring原始路径
files[].deleted_atstring删除时间
totalinteger总数量
total_size_strstring回收站总大小

4.3 restore_file — 恢复文件

描述:从回收站恢复文件到原始位置。

CLI

python weiyun_skills/main.py restore f_del001

Python

result = client.restore_file("f_del001")

输入参数

参数名类型必填默认值说明
file_idstring-回收站中的文件 ID

输出参数

参数名类型说明
file_idstring文件 ID
restored_pathstring恢复后路径
restored_atstring恢复时间

4.4 clear_recycle_bin — 清空回收站

描述:清空回收站,永久删除所有回收站文件。⚠️ 此操作不可逆!

CLI

python weiyun_skills/main.py clear-recycle --confirm

Python

result = client.clear_recycle_bin(confirm=True)

输入参数

参数名类型必填默认值说明
confirmboolean-必须为 true 才执行

输出参数

参数名类型说明
deleted_countinteger删除文件数
freed_space_strstring释放的空间大小
cleared_atstring清空时间

附录 A:统一错误码

错误码说明
AUTH_EXPIREDCookies 已过期,需重新登录
AUTH_FAILED认证失败
FILE_NOT_FOUND文件不存在
FOLDER_NOT_FOUND文件夹不存在
SPACE_FULL空间已满
FILE_TOO_LARGE文件过大
DUPLICATE_NAME名称重复
PERMISSION_DENIED权限不足
RATE_LIMITED请求频率超限
NETWORK_ERROR网络错误
SHARE_EXPIRED分享已过期
INVALID_PARAM参数无效
QR_EXPIRED二维码已过期,需刷新
QR_CANCELLED用户取消了扫码

错误响应格式

{
  "success": false,
  "data": null,
  "message": "Cookies expired, please re-login",
  "error_code": "AUTH_EXPIRED"
}

附录 B:Cookies 关键字段说明

Cookie 名称说明
uin用户 QQ 号标识
skey会话密钥
p_uin加密的用户标识
p_skey加密的会话密钥
pt4_tokenPT4 认证 Token
pt2gguin辅助认证字段

提示:并非所有 Cookie 字段都是必需的,核心字段为 uinskeyp_skey

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Kafka

Kafka - command-line tool for everyday use

Registry SourceRecently Updated
General

Helm

Helm - command-line tool for everyday use

Registry SourceRecently Updated
General

Cms

Cms - command-line tool for everyday use

Registry SourceRecently Updated
General

Valuation

Valuation - command-line tool for everyday use

Registry SourceRecently Updated