首页龙虾技能列表 › super-weiyun-skill — 技能工具

super-weiyun-skill — 技能工具

v1.0.0

[自动翻译] This skill should be used when the user needs to manage Tencent Weiyun cloud storage, including file upload/download, sharing, space management, and a...

0· 31·0 当前·0 累计
by @subaru0573 (Subaru0573)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/10
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The package implements a self-consistent Weiyun (Tencent 微云) client: the code, CLI, and SKILL.md match the described file-management and login functionality and request only the cookies/session data needed to operate.
评估建议
This skill appears to be what it says: a Python toolkit for Tencent Weiyun. Before installing or running: 1) Inspect the code if possible (it uses only requests and QQ/Weiyun endpoints). 2) Be aware cookies.json contains session cookies — treat it like a password, store it securely or delete when done. 3) There is no automated installer; run pip install -r requirements.txt in a controlled environment (virtualenv/container). 4) The tool saves QR images and cookies to the current working directory...
详细分析 ▾
用途与能力
The name/description (Weiyun cloud management) matches the delivered code: login.py, client.py, main.py, utils, README and SKILL.md implement QR/cookie login, uploads/downloads, sharing, and space operations. No unrelated binaries, services, or credentials are requested.
指令范围
SKILL.md instructs the agent/user to use the included Python scripts and to provide/obtain Weiyun cookies or scan a QR code; runtime actions are limited to contacting Weiyun and QQ/ptlogin endpoints and reading/writing a local cookies.json. This is within scope, but note the skill persists authentication cookies locally (cookies.json) and saves QR PNG files in the working directory — these are sensitive session tokens that grant account access.
安装机制
Metadata states 'No install spec' (instruction-only), and indeed there is no automated installer. However the bundle includes Python source files and a requirements.txt (requests, qrcode, tabulate). This is coherent but means users must manually install dependencies (pip). There are no downloads from unknown URLs or extract operations in an installer.
凭证需求
The skill requests no environment variables or external credentials in metadata. It legitimately relies on user-provided session cookies or QR-based login — appropriate for a web client. There are no requests for unrelated credentials or system secrets. Reminder: browser cookies saved by this tool are sensitive and should be protected.
持久化与权限
The skill does not request always:true and does not modify other skills or system-wide settings. Its persistence is local (cookies.json and saved QR image) and scoped to its own files; this is expected for a client that stores session state.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/4/10

super-weiyun-skill 1.0.0 — Initial Release - Introduces a comprehensive toolkit for managing Tencent Weiyun cloud storage via Python (CLI & SDK). - Supports file and folder upload/download, sharing management, space/recycle bin management, and file operations (copy, move, rename, delete, search). - Provides authentication via QR code scanning or browser cookies. - Offers detailed parameter and output specifications for each capability, with consistent API response format. - Includes numerous trigger phrases in English and Chinese for flexible invocation.

● 无害

安装命令 点击复制

官方npx clawhub@latest install super-weiyun-skill
镜像加速npx clawhub@latest install super-weiyun-skill --registry https://cn.clawhub-mirror.com

技能文档

使用方法:本文档定义了所有可用的腾讯微云管理 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 [args] [options]
>
# Python SDK
from weiyun_skills.client import WeiyunClient
client = WeiyunClient()
client.(params)
>
统一返回格式
> { "success": true, "data": { ... }, "message": "ok" }

目录

- 目录 - 1. 认证 Skills - 1.1 qrcode\_login — 扫码登录 - 1.2 cookies\_login — Cookies 登录 - 2. 文件管理 Skills - 2.1 list\_files — 列出文件 - 2.2 upload\_file — 上传文件 - 2.3 upload\_folder — 上传文件夹 - 2.4 download\_file — 下载文件 - 2.5 download\_folder — 下载文件夹 - 2.6 delete\_file — 删除文件 - 2.7 move\_file — 移动文件 - 2.8 copy\_file — 复制文件 - 2.9 rename\_file — 重命名 - 2.10 create\_folder — 创建文件夹 - 2.11 search\_files — 搜索文件 - 3. 分享管理 Skills - 3.1 create\_share — 创建分享 - 3.2 cancel\_share — 取消分享 - 3.3 list\_shares — 列出分享 - 4. 空间管理 Skills - 4.1 get\_space\_info — 空间信息 - 4.2 get\_recycle\_bin — 回收站 - 4.3 restore\_file — 恢复文件 - 4.4 clear\_recycle\_bin — 清空回收站 - 附录 A:统一错误码 - 附录 B:Cookies 关键字段说明


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

  • 打开浏览器访问 https://www.weiyun.com/ 并登录
  • F12 打开开发者工具
  • 切换到 Network(网络)标签页
  • 刷新页面,点击任意一个请求
  • Headers(请求头)中找到 Cookie 字段
  • 复制完整的 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 upload_folder — 上传文件夹

描述:将本地文件夹递归上传到微云,自动创建对应的目录结构。跳过隐藏文件和 __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)

输入参数

参数名类型必填默认值说明
local_pathstring-本地文件夹路径
remote_pathstring/微云目标路径(/ 表示根目录)
overwritebooleanfalse是否覆盖同名文件
输出参数

参数名类型说明
folder_namestring上传的文件夹名称
uploaded_filesarray成功上传的文件列表
uploaded_files[].namestring文件名
uploaded_files[].sizeinteger文件大小(字节)
uploaded_files[].size_strstring可读大小
uploaded_files[].instant_uploadboolean是否秒传
failed_filesarray上传失败的文件列表
failed_files[].namestring文件名
failed_files[].errorstring错误信息
uploaded_countinteger成功上传数量
failed_countinteger失败数量
total_size_strstring总上传大小
elapsedfloat上传耗时(秒)
示例输出

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

2.4 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.5 download_folder — 下载文件夹

描述:从微云下载整个文件夹到本地。支持两种模式:递归下载(保留目录结构)和打包下载(下载为 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/ --overwrite

# Download 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)

输入参数

参数名类型必填默认值说明
folder_namestring-微云上的文件夹名称
local_pathstring-本地保存目录(或 zip 文件路径)
overwritebooleanfalse是否覆盖已存在的本地文件
as_zipbooleanfalse是否打包为 zip 下载
输出参数(递归模式)

参数名类型说明
folder_namestring文件夹名称
local_pathstring本地保存路径
downloaded_filesarray成功下载的文件列表
downloaded_files[].namestring文件名
downloaded_files[].local_pathstring本地路径
downloaded_files[].sizeinteger文件大小(字节)
downloaded_files[].size_strstring可读大小
failed_filesarray下载失败的文件列表
failed_files[].namestring文件名
failed_files[].errorstring错误信息
downloaded_countinteger成功下载数量
failed_countinteger失败数量
total_size_strstring总下载大小
elapsedfloat下载耗时(秒)
输出参数(zip 模式)

参数名类型说明
local_pathstringzip 文件本地路径
sizeinteger文件大小(字节)
size_strstring可读大小
md5stringMD5 校验值
elapsedfloat下载耗时(秒)
示例输出(递归模式)

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

2.6 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.7 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.8 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.9 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.10 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.11 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

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务