aliyun-oss

阿里云 OSS 对象存储技能。支持文件上传、下载、列出、删除、获取 URL 等操作。 两层架构:Node.js SDK(优先)→ ossutil CLI。

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 "aliyun-oss" with this command: npx skills add aohoyo/aliyun-oss-skill

☁️ 阿里云 OSS 技能

通过 Node.js SDK / ossutil CLI 管理阿里云对象存储。


🎯 执行策略(两层降级)

优先级工具使用场景
1Node.js SDK (ali-oss)优先使用
2ossutil CLI备选

🚀 快速开始

1. 安装依赖

# 进入技能目录
cd ~/.openclaw/workspace/skills/aliyun-oss-skill

# 运行自动安装
bash scripts/setup.sh

2. 配置凭证

bash scripts/setup.sh \
  --access-key-id "YOUR_ACCESS_KEY_ID" \
  --access-key-secret "YOUR_ACCESS_KEY_SECRET" \
  --region "oss-cn-hangzhou" \
  --bucket "mybucket"

3. 测试连接

node scripts/oss_node.mjs test-connection

📋 使用示例

上传文件

node scripts/oss_node.mjs upload \
  --local "/path/to/file.txt" \
  --key "uploads/file.txt"

列出文件

node scripts/oss_node.mjs list --prefix "uploads/" --limit 100

下载文件

node scripts/oss_node.mjs download \
  --key "uploads/file.txt" \
  --local "/path/to/save.txt"

删除文件

node scripts/oss_node.mjs delete --key "uploads/file.txt" --force

获取文件 URL

# 公开空间
node scripts/oss_node.mjs url --key "uploads/file.txt"

# 私有空间(1小时有效)
node scripts/oss_node.mjs url --key "uploads/file.txt" --private --expires 3600

🔧 Node.js SDK API

命令说明
upload --local <path> --key <key>上传文件
download --key <key> --local <path>下载文件
list [--prefix <p>] [--limit <n>]列出文件
delete --key <key> [--force]删除文件
url --key <key> [--private] [--expires <s>]获取 URL
stat --key <key>文件信息
move --src-key <a> --dest-key <b>移动文件
copy --src-key <a> --dest-key <b>复制文件
test-connection测试连接

⚙️ 配置文件

config/oss-config.json

{
  "accessKeyId": "YOUR_ACCESS_KEY_ID",
  "accessKeySecret": "YOUR_ACCESS_KEY_SECRET",
  "bucket": "mybucket",
  "region": "oss-cn-hangzhou",
  "domain": "https://cdn.example.com"
}

常用区域

  • oss-cn-hangzhou - 华东1(杭州)
  • oss-cn-shanghai - 华东2(上海)
  • oss-cn-beijing - 华北2(北京)
  • oss-cn-shenzhen - 华南1(深圳)

🐛 故障排查

问题解决
Cannot find module 'ali-oss'npm install ali-oss
403 Forbidden检查 AccessKey 权限
连接超时检查区域代码和网络

📚 相关链接


📄 许可证

MIT License

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.

Coding

qiniu-kodo

七牛云 KODO 对象存储技能。支持文件上传、下载、列出、删除、获取 URL 等操作。 三层架构:MCP 工具(优先)→ Node.js SDK → qshell CLI。

Registry SourceRecently Updated
4190Profile unavailable
General

baidunetdisk

支持百度网盘文件查看、搜索、分享链接提取、一键转存及目录创建的综合管理功能。

Registry SourceRecently Updated
8353Profile unavailable
General

Dingtalk Csa

钉盘助手 (DingTalk Cloud Storage Assistant) - 管理钉钉云盘空间、文件和文档。用当用户要求读写钉盘文件、管理团队空间、上传下载文档、操作adoc文档时触发。也适用于钉钉文件分析、报告生成、团队协作等场景。触发词:钉盘、钉钉云盘、DingTalk storage、钉钉文件、钉钉文档。

Registry SourceRecently Updated
1100Profile unavailable
General

腾讯云对象存储管理

管理腾讯云 COS 存储桶和文件,实现创建删除存储桶、上传下载、生命周期配置及访问权限控制。

Registry SourceRecently Updated
990Profile unavailable