Summary
- 独立的 S3 兼容对象存储与 CDN 管理工具。用于把本地文件上传到 AWS S3、腾讯云 COS、
- 阿里云 OSS、火山 TOS、MinIO 等 S3 API 兼容目标;支持多 target、对象 key 前缀、覆盖保护、
- SHA-256 内容去重、上传后尺寸校验、公开 URL,以及腾讯云 CDN…
zrong/skills
独立的 S3 ? 阿里云 OSS、火山 TOS、MinIO 等 S3 API ? SHA-256 ? 当用户要求上传本地文件到 bucket、比较远端对象是否变化、返回对象 URL、刷新 CDN 或预热资源时使用。
npx skills add zrong/skills --skill object-storage
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Azure Storage Services including Blob Storage, File Shares, Queue Storage, Table Storage, and D…
567.1K installs>- S3-compatible object storage that branches with your Neon project, so files and the database…
4.3K installsUse to call the VIOS REST API (sensor list, timelines, clip extraction, snapshots, add/delete s…
1.8K installsSelects, investigates, and compares AWS object, file, and block storage services, and answers c…
42 installsGeneral file/object storage, such as for images, videos, files, documents and other bulk data. …
18.5K installsWork with the data inside a Cargo workspace — models (Companies, Contacts, Deals…), datasets, c…
6.5K installsOther skills from zrong/skills · top by installs.
npx skills add zrong/skills
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
main
Files included with this skill beyond the listing page.
SKILL.md
3,816 B
SUMMARY.md
494 B
uv run --project {SKILL_DIR}/scripts object-storage --non-interactive <command>
配置查找顺序:当前工作目录、Skill 目录、当前 Git 项目根目录、 ~/.agents/agentconfig.toml。也可在子命令前传 --config PATH。完整配置见 [references/configuration.md](references/configuration.md),模板见 [agentconfig.example.toml](agent_config.example.toml)。
``bash object-storage doctor --json object-storage list --json ``
``bash object-storage upload /local/video.mp4 \ --target archive --key project/video.mp4 --dry-run --json ``
``bash object-storage upload /local/video.mp4 \ --target archive --key project/video.mp4 --json ``
--overwrite。只在内容变化时覆盖,必须同时传--overwrite --if-changed:
``bash object-storage upload /local/video.mp4 --target archive \ --key project/video.mp4 --overwrite --if-changed --json ``
内容相同时 skippedunchanged=true,并在 unchangedfiles 明确列出本地路径、 object key、大小和 SHA-256。向用户说明该列表,不要声称文件已重新上传。
| 命令 | 作用 |
|---|---|
doctor / list |
校验并列出配置,不连接远端 |
resolve-key KEY |
显示 target prefix 处理后的最终 key |
upload LOCAL_PATH |
上传一个本地文件 |
cdn purge-url |
按完整 URL 或 object key 刷新文件缓存 |
cdn purge-path |
按完整目录 URL 或 object key 刷新目录缓存 |
cdn prefetch |
按完整 URL 或 object key预热资源 |
CDN 示例:
object-storage cdn purge-url --target archive --keys project/video.mp4 --json
object-storage cdn purge-path --target archive --keys project/ --flush-type flush --json
object-storage cdn prefetch --target archive --keys project/video.mp4 --area mainland --json
--key 是 target prefix 之后的相对 key;禁止绝对路径和 ..。--key 时使用本地文件名,不自动保留本地完整目录。content-sha256,并在上传后用 head_object校验字节数。
--if-changed 只比较远端 ContentLength 和 content-sha256;不把 ETag 当作通用摘要。purgeonupload CDN 刷新。publicbaseurl 用于返回公开对象 URL;cdn.base_url 用于 CDN 操作,两者不可混用。Content-Length。
上传成功必须报告 target、bucket、object key、字节数、SHA-256 和可用的公开 URL。 CDN 命令报告 operation、status、TaskId 与目标 URL;提交不代表缓存已经生效,不做虚假验证。