← 返回 Skills 市场
Huawei Cloud OBS SDK
作者
IdiosyncraticDragon
· GitHub ↗
· v1.0.0
· MIT-0
288
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install huawei-obs-skill
功能描述
华为云 OBS 对象存储 SDK 使用指南。包含 SDK 安装、初始化客户端、文件上传/下载、管理存储桶、管理对象等核心操作的最佳实践和代码示例。使用当需要操作华为云 OBS 对象存储时。
使用说明 (SKILL.md)
华为云 OBS SDK 使用指南
本技能提供华为云 OBS(对象存储服务)Python SDK 的核心使用方法和最佳实践。
快速开始
1. 安装 SDK
pip install huaweicloud-sdk-python-obs
2. 初始化客户端
from obs import ObsClient
# 初始化 OBS 客户端
obs_client = ObsClient(
access_key_id='YOUR_ACCESS_KEY',
secret_access_key='YOUR_SECRET_KEY',
server='obs.cn-east-3.myhuaweicloud.com' # 根据实际区域填写
)
3. 关闭客户端
obs_client.close()
核心操作
存储桶管理
参考 references/bucket_operations.md
- 创建/删除存储桶
- 存储桶权限配置
- 存储桶生命周期管理
- 存储桶跨域配置
对象操作
参考 references/object_operations.md
- 上传文件/文件夹
- 下载文件/文件夹
- 删除/复制/移动对象
- 列举对象
- 断点续传
- 预签名 URL 生成
高级功能
参考 references/advanced_features.md
- 版本控制
- 服务器端加密
- 跨域资源共享 (CORS)
- 事件通知
- 生命周期规则
安全最佳实践
- 不要硬编码 AK/SK,使用环境变量或配置文件管理
- 为 OBS 账户分配最小必要权限
- 定期轮换访问密钥
- 使用 HTTPS 协议访问 OBS 服务
- 敏感数据上传前建议客户端加密
错误处理
try:
resp = obs_client.putFile('bucket_name', 'object_key', 'local_file_path')
if resp.status \x3C 300:
print('上传成功')
else:
print(f'上传失败: {resp.errorMessage}')
except Exception as e:
print(f'操作异常: {e}')
安全使用建议
This skill appears to be a genuine Huawei OBS SDK guide, but note: the included code reads OBS_AK and OBS_SK (and will load a .env file if present) while the skill metadata declares no required credentials. Before installing or running it, ensure you: (1) don't place production keys in an environment accessible to the agent unless you intend the skill to use them; (2) limit the keys to least privilege and enable rotation; (3) consider running the code in an isolated environment or test account first; (4) ask the publisher/maintainer to update the skill metadata to explicitly list required environment variables (OBS_AK/OBS_SK/OBS_SERVER) so users know what secrets the skill will access; and (5) review the included requirements.txt and code (scripts/obs_utils.py) yourself—there are no other hidden endpoints or suspicious downloads, but the undeclared credential usage is the main coherence issue.
功能分析
Type: OpenClaw Skill
Name: huawei-obs-skill
Version: 1.0.0
The skill bundle is a legitimate integration for the Huawei Cloud Object Storage Service (OBS) SDK. It provides standard utility functions and documentation for managing buckets and objects, correctly emphasizes security best practices such as using environment variables for credentials (via python-dotenv), and contains no evidence of malicious intent, data exfiltration, or prompt injection.
能力评估
Purpose & Capability
The skill's name/description (Huawei Cloud OBS SDK usage) matches the included code and documentation: examples and helper functions operate on OBS. However, the skill metadata declares no required environment variables or primary credential, while the bundled code and SKILL.md expect OBS_AK / OBS_SK (and optionally OBS_SERVER). That omission is inconsistent and may mislead users about what secrets the skill will access.
Instruction Scope
SKILL.md and example code limit actions to installing the SDK and performing OBS operations. The runtime code (scripts/obs_utils.py) calls load_dotenv() and reads environment variables OBS_AK and OBS_SK; these runtime actions (reading env vars / .env) are not reflected in the declared metadata. There are no instructions to exfiltrate data or call external endpoints beyond Huawei OBS, and examples warn about security best practices, but the implicit .env loading and env-var usage should be explicitly documented.
Install Mechanism
There is no install spec (instruction-only skill) and included requirements.txt lists huiweicloud-sdk-python-obs and python-dotenv—reasonable, expected dependencies for the stated purpose. No downloads from untrusted URLs or extract steps are present.
Credentials
The code expects sensitive credentials (OBS_AK, OBS_SK) and may read a .env file via python-dotenv, but the skill's registry metadata lists no required env vars or primary credential. Requiring secret keys for OBS is proportionate to the skill's function, but failing to declare them is a problematic mismatch that can hide the fact the skill will access secrets.
Persistence & Privilege
The skill does not request persistent presence (always: false) and does not modify other skills or system-wide settings. It only contains helper functions and example usage; no privileged or persistent behaviors were found.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install huawei-obs-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/huawei-obs-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
huawei-obs-skill v1.0.0
- 初始发布,提供华为云 OBS(对象存储服务)Python SDK 的核心使用方法和实践指南。
- 覆盖 SDK 安装、客户端初始化、文件上传/下载、存储桶管理、对象管理等操作。
- 包含代码示例和常用操作入口,便于快速集成与上手。
- 给出安全最佳实践和错误处理建议。
元数据
常见问题
Huawei Cloud OBS SDK 是什么?
华为云 OBS 对象存储 SDK 使用指南。包含 SDK 安装、初始化客户端、文件上传/下载、管理存储桶、管理对象等核心操作的最佳实践和代码示例。使用当需要操作华为云 OBS 对象存储时。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 288 次。
如何安装 Huawei Cloud OBS SDK?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install huawei-obs-skill」即可一键安装,无需额外配置。
Huawei Cloud OBS SDK 是免费的吗?
是的,Huawei Cloud OBS SDK 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Huawei Cloud OBS SDK 支持哪些平台?
Huawei Cloud OBS SDK 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Huawei Cloud OBS SDK?
由 IdiosyncraticDragon(@idiosyncraticdragon)开发并维护,当前版本 v1.0.0。
推荐 Skills