← Back to Skills Marketplace
jjflydudu

ollama-migrator

by test_heng · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
212
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install ollama-migrator
Description
Ollama 模型迁移技能。用于将 Ollama 模型从 C 盘迁移到其他磁盘,释放 C 盘空间。使用场景:(1) C 盘空间不足需要迁移模型,(2) 更换模型存储位置,(3) 检查 Ollama 模型占用空间,(4) 验证迁移后模型可用性
Usage Guidance
This skill appears to do what it says: move local Ollama model files, set OLLAMA_MODELS, and verify with the local 'ollama' CLI. Before installing/run it: 1) Confirm you're on Windows (the scripts use taskkill and winreg). 2) Ensure you have Python and the 'ollama' CLI available and working. 3) Inspect the scripts (they are included) and run the check mode first: python scripts/migrate_ollama.py --check (or python scripts/check_ollama_status.py) to preview results. 4) Note SKILL.md mentions scripts/verify_ollama.py which is missing — the migrate script uses subprocess('ollama list') for verification, so double-check verification behavior. 5) Backup important models before using --cleanup; the script will delete source files if you pass --cleanup and confirm. 6) Expect the script to stop the ollama.exe process and to write a user-level environment variable (HKEY_CURRENT_USER) — administrative/system-wide changes are not performed. If any of these behaviors are unexpected for your environment, don't run the migration until you've adjusted or validated the scripts.
Capability Analysis
Type: OpenClaw Skill Name: ollama-migrator Version: 1.0.0 The ollama-migrator skill is designed to move Ollama model files to a different disk to free up space. It includes scripts to check disk usage (check_ollama_status.py) and perform the migration (migrate_ollama.py), which involves stopping the Ollama service, copying files, and updating the OLLAMA_MODELS environment variable via the Windows Registry. While the scripts perform sensitive operations like process termination and registry modification, these actions are directly related to the stated purpose and include user confirmation prompts for destructive actions like cleanup.
Capability Assessment
Purpose & Capability
The name/description (migrating Ollama models off C:) match the scripts' behavior: scanning model folder, copying files, stopping Ollama, setting OLLAMA_MODELS, verifying via 'ollama list', and optional cleanup. Incoherences: SKILL.md references a scripts/verify_ollama.py that is not present, and the metadata declares no required binaries/commands even though the scripts call external commands ('ollama', 'taskkill'). These are documentation omissions but not functionality mismatches.
Instruction Scope
Runtime instructions and scripts stay within the migration scope: they read model files under the user's home (~/.ollama/models), check disk usage, copy files, set a user environment variable, stop a specific process (ollama.exe) and optionally remove the source. They do modify the user registry (user-level env var) and kill a process, which is expected for this task but worth noting. There are no network calls or attempts to read unrelated system secrets.
Install Mechanism
No install spec is provided and the skill is effectively instruction + helper scripts. That minimizes installer risk. The scripts will run on the host via Python; nothing is downloaded or extracted by an installer.
Credentials
The skill does not request external credentials and only uses/sets the OLLAMA_MODELS environment variable — appropriate for changing model location. Minor mismatch: registry/system-level environment variables are discussed in SKILL.md, but the code only writes a user-level environment variable (HKEY_CURRENT_USER). Also the skill assumes availability of 'ollama' CLI and Windows utilities but does not declare them as required.
Persistence & Privilege
The skill does not request permanent/always-on privileges and will not modify other skills or system-wide agent settings. It does persist a user-level environment variable (expected for this purpose) and may delete source files only when you explicitly pass --cleanup and confirm.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ollama-migrator
  3. After installation, invoke the skill by name or use /ollama-migrator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
--- name: ollama-migrator description: Ollama 模型迁移技能。用于将 Ollama 模型从 C 盘迁移到其他磁盘,释放 C 盘空间。使用场景:(1) C 盘空间不足需要迁移模型,(2) 更换模型存储位置,(3) 检查 Ollama 模型占用空间,(4) 验证迁移后模型可用性 --- # Ollama 模型迁移助手 本技能帮助将 Ollama 模型安全迁移到其他磁盘,释放 C 盘空间。 ## 核心能力 ### 1. 空间分析 - 检查当前模型存储位置 - 计算模型总占用空间 - 检查目标磁盘可用空间 ### 2. 安全迁移 - 停止 Ollama 服务 - 复制模型文件(保留完整性) - 设置环境变量 - 验证迁移结果 ### 3. 回滚支持 - 保留源文件直到验证完成 - 支持手动回滚 - 迁移日志记录 ## 工作流程 ### 步骤 1: 检查状态 ```powershell # 检查当前模型位置和大小 python scripts/check_ollama_status.py ``` ### 步骤 2: 执行迁移 ```powershell # 迁移到 D 盘(默认) python scripts/migrate_ollama.py --target D:\Ollama\models # 迁移到其他位置 python scripts/migrate_ollama.py --target E:\AI\models ``` ### 步骤 3: 验证 ```powershell # 验证模型列表 ollama list # 测试运行模型 ollama run qwen3.5:9b ``` ### 步骤 4: 清理(可选) 确认迁移成功后,删除旧文件: ```powershell python scripts/migrate_ollama.py --cleanup ``` ## 环境变量 迁移后设置的环境变量: - **用户级**: `OLLAMA_MODELS = <目标路径>` - **系统级**: 需要管理员权限(可选) ## 脚本工具 - `scripts/check_ollama_status.py` - 检查 Ollama 状态和模型占用 - `scripts/migrate_ollama.py` - 执行迁移操作 - `scripts/verify_ollama.py` - 验证迁移结果 ## 触发条件 当用户提到: - "Ollama 迁移" - "Ollama 模型移动到其他盘" - "C 盘 Ollama 占用太大" - "Ollama 模型位置" - "迁移 Ollama 到 D 盘" ## 安全机制 ### 必须遵守的规则 1. **迁移前检查**: - 确认 Ollama 服务已停止 - 检查目标磁盘空间充足 - 记录当前模型列表 2. **数据完整性**: - 使用可靠复制(验证大小) - 保留源文件直到验证完成 - 迁移日志记录 3. **用户确认**: - 显示迁移计划 - 用户明确确认后才执行 - 支持预览模式 4. **验证机制**: - 迁移后自动验证模型列表 - 测试运行一个模型 - 确认无误后才建议清理 ## 注意事项 1. **新终端窗口**:环境变量在新打开的终端中生效 2. **运行中的服务**:需要重启 Ollama 服务 3. **权限问题**:系统级环境变量需要管理员权限 4. **备份建议**:重要模型建议先备份
Metadata
Slug ollama-migrator
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is ollama-migrator?

Ollama 模型迁移技能。用于将 Ollama 模型从 C 盘迁移到其他磁盘,释放 C 盘空间。使用场景:(1) C 盘空间不足需要迁移模型,(2) 更换模型存储位置,(3) 检查 Ollama 模型占用空间,(4) 验证迁移后模型可用性. It is an AI Agent Skill for Claude Code / OpenClaw, with 212 downloads so far.

How do I install ollama-migrator?

Run "/install ollama-migrator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is ollama-migrator free?

Yes, ollama-migrator is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does ollama-migrator support?

ollama-migrator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ollama-migrator?

It is built and maintained by test_heng (@jjflydudu); the current version is v1.0.0.

💬 Comments