Downloads And Storage 标志

Downloads And Storage

组织
VectorSpaceLab
downloads-and-storage

Routes Hugging Face Hub file and snapshot downloads, cache and offline recovery, Xet-backed storage, HfFileSystem and hf:// URIs, buckets, and safe copy or sync planning. Use for model, dataset, Space, or kernel downloads; allow/ignore patterns; cache corruption; fsspec browsing; volume mounts; and bucket file movement.

Add to TypingMind

概览

发布者VectorSpaceLab
代码仓库AREX-Skill
技能名称downloads-and-storage
星标数
341
复刻数
26
附带文件
5
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 5 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 VectorSpaceLab 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Downloads And Storage AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/VectorSpaceLab/AREX-Skill/tree/main/examples/creator/repo-to-skills/artifacts/huggingface_hub/huggingface-hub/sub-skills/downloads-and-storage
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/VectorSpaceLab/AREX-Skill.git /tmp/AREX-Skill
mkdir -p .claude/skills
cp -r /tmp/AREX-Skill/examples/creator/repo-to-skills/artifacts/huggingface_hub/huggingface-hub/sub-skills/downloads-and-storage .claude/skills/downloads-and-storage
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Downloads And Storage,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Downloads And Storage。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Downloads And Storage 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Downloads and Storage

Use this sub-skill to select and operate the Hub's read/download and storage surfaces without confusing repository snapshots, local cache metadata, and bucket object storage.

Trigger Routes

Load this sub-skill when the request mentions any of the following:

  • download one Hub file, model, dataset, Space, or kernel repository;
  • snapshot a revision with allow/ignore patterns or estimate it with dry run;
  • inspect, verify, prune, relocate, or troubleshoot the local Hub cache;
  • run offline, recover from an interrupted or incomplete snapshot, or diagnose a cache miss;
  • enable, disable, or troubleshoot Xet-backed transfers and chunk storage;
  • browse or open Hub files through HfFileSystem, fsspec, or hf:// paths;
  • parse a Hub URI or a mount such as hf://datasets/org/data:/mnt:ro;
  • browse/download bucket objects or plan a local↔bucket sync;
  • reason about trailing-slash semantics for safe remote copy operations.

Read the Focused References

  • Read API reference for verified signatures, return values, parameter matrices, URI forms, filesystem methods, and bucket APIs.
  • Read workflows for copyable download, offline, cache, fsspec, bucket, copy, and plan/apply recipes.
  • Read configuration, cache, and Xet before changing cache paths, offline mode, symlink mode, timeouts, or Xet settings.
  • Read troubleshooting for revision/repo-type, access, disk, cache, symlink, Xet, URI, prefix, and traversal failures.
  • Run the bundled read-only download environment diagnostic when the effective cache roots, import-time settings, free space, token presence, Xet availability, or cache structure is uncertain.

Keep the Boundaries Clear

This sub-skill owns downloads, read-only filesystem access, local cache operations, bucket reads, and safe movement planning. It covers upload/copy only far enough to choose a safe file-movement surface. Although HfFileSystem exposes write/delete methods, do not execute those mutations from this route; send repository or bucket mutations to the appropriate operations workflow.

  • Route repository and bucket creation, commits, branches, uploads, deletes, moves, visibility changes, and other mutations to the hub-operations sibling sub-skill.
  • Route exhaustive CLI flag selection, output formats, authentication setup, and shell automation to the cli-and-automation sibling sub-skill.
  • Do not use HfFileSystem as the default high-throughput download API; prefer hf_hub_download, snapshot_download, or the corresponding HfApi methods.
  • Do not bundle or run credentialed upload helpers or networked installers from this skill.

Choose the Download Surface

  1. Use hf_hub_download(repo_id, filename, ...) for exactly one repository file. It returns a file path, normally a pointer inside the shared cache.
  2. Use snapshot_download(repo_id, ...) for a coherent repository tree, multiple files, pattern filtering, or parallel file downloads. It returns a snapshot directory.
  3. Use local_dir when the caller needs a normal materialized directory they may modify. Otherwise prefer cache_dir/the shared cache and treat returned cache paths as immutable.
  4. Set repo_type explicitly for datasets, Spaces, and kernels; model is the default. Pin revision to a full commit hash for reproducible or prepared offline execution.
  5. Use dry_run=True to inspect DryRunFileInfo; it may perform remote metadata calls but does not transfer file payloads. It is not an offline inventory mechanism.
  6. Use allow_patterns and ignore_patterns only with snapshots. Both apply; ignored files remain excluded after allow filtering. Tune max_workers for concurrent files, not Xet byte-range concurrency.

Before a large or forced transfer, inspect will_download and file_size, run the diagnostic helper, and confirm free space in both the Hub cache and Xet cache locations.

Preserve Cache and Offline Invariants

  • local_files_only=True forbids network access for that call and succeeds only from already materialized content. force_download=True asks for a fresh transfer and is not an offline/cache-repair switch; do not combine them.
  • HF_HUB_OFFLINE=1 is process-wide and is read when the package is imported. Set it before Python starts. It also makes ordinary HfApi calls fail rather than contact the Hub.
  • A cached refs/ entry or trees/*.json record is metadata, not downloaded content. Confirm the selected snapshot files exist.
  • If a cached tree listing proves requested files are missing, offline snapshot_download raises IncompleteSnapshotError instead of silently returning the partial tree. Pattern-excluded files do not count as missing.
  • Use scan_cache_dir or hf cache ls for inspection. Preview hf cache rm and hf cache prune with --dry-run; deletion is irreversible.
  • Never edit a returned shared-cache file. Materialize to local_dir or copy it elsewhere first.

Browse with HfFileSystem and URIs

Use HfFileSystem or the global hffs for fsspec integrations and convenient ls, glob, find, exists, and open. Text mode must be explicit because fsspec open defaults to "rb". Pass refresh=True when stale directory metadata is plausible.

Use canonical hf://[TYPE/]namespace/name[@REVISION][/PATH] URIs. Dataset, Space, kernel, and bucket prefixes are plural and required; a model prefix is optional. Buckets do not support revisions. Encode ordinary branch names that contain /; special refs such as refs/pr/3 are recognized directly. Parse mounts with huggingface_hub.utils.parse_hf_mount, not by splitting on :.

Treat URI parsing as identification, not path-safety authorization. Reject absolute paths, drive/UNC paths, and every .. segment before local materialization or plan application.

Handle Buckets and Movement Safely

Buckets are mutable Xet-backed object storage, not versioned repositories. Use list_bucket_tree/download_bucket_files for Python reads, or hf buckets list, hf cp, and hf sync for CLI workflows.

For one file, use hf cp; for local↔bucket directories, use sync_bucket or hf sync. Generate dry_run=True output or a JSONL plan, review every action and destination, then apply it. Treat delete=True as destructive.

For remote copies, copy_files supports repo→repo, repo→bucket, and bucket→bucket; bucket→repo is unsupported. Server-side copies require compatible storage regions. A trailing slash on the source means “copy contents”; without it, the source directory may be nested at the destination. Verify bucket prefix boundaries so logs does not accidentally match logs-old.

Validate the Outcome

For a no-network regression rehearsal that exercises mocked metadata, a temporary cache, filtered offline recovery, a wrong revision, and the local_files_only/force_download conflict, run the focused case in workflows. Keep the bucket prefix/traversal case there deferred until a reviewed mock plan and authorized bucket integration are available.

  • Assert the returned path exists and is the requested file/snapshot.
  • For dry runs, inspect filename, commit_hash, local_path, is_cached, will_download, and aggregate only entries where will_download is true.
  • For offline snapshots, assert all pattern-selected files exist; catch IncompleteSnapshotError and report its snapshot_path without claiming the snapshot is complete.
  • For cache repair, rescan and inspect warnings before deleting anything.
  • For sync/copy, inspect source/destination URI types, revisions, prefixes, trailing slashes, regions, and the plan's upload/download/delete actions.
  • Mark network-, credential-, private/gated-, and Xet-service integration as deferred unless the caller explicitly authorizes and provides them.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Downloads And Storage AI 技能有什么作用?

Routes Hugging Face Hub file and snapshot downloads, cache and offline recovery, Xet-backed storage, HfFileSystem and hf:// URIs, buckets, and safe copy or sync planning. Use for model, dataset, Space, or kernel downloads; allow/ignore patterns; cache corruption; fsspec browsing; volume mounts; and bucket file movement.

为什么在 TypingMind 中使用 Downloads And Storage?

因为您只需安装一次,就能搭配任何模型使用。Downloads And Storage 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Downloads And Storage?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/VectorSpaceLab/AREX-Skill/tree/main/examples/creator/repo-to-skills/artifacts/huggingface_hub/huggingface-hub/sub-skills/downloads-and-storage。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Downloads And Storage?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Downloads And Storage 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Downloads And Storage 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Downloads And Storage AI 技能免费吗?

是的。VectorSpaceLab 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇