Skill: patmenciu/modelpilot (version 1.4.1)

# Ollama Model Pilot > Version: **v1.4.1** > Package / slug: **modelpilot** > Former names: **Model Pilot**, **Ollama Lifecycle Manager** > Positioning: A safety-first operational guide for managing local Ollama model workflows. --- ## v1.4.1 Release Highlights / v1.4.1 发布重点 This v1.4.1 release is a small activation-focused update based on **v1.4**. Main changes: - Added **Activation Rules** so agents know when to use this skill. - Made **Real-Task Benchmark** the default workflow when users ask to test, benchmark, compare, evaluate, or select Ollama models, unless they explicitly ask for a quick smoke test only. - Added a required benchmark response format to make model-testing results more consistent. 本 v1.4.1 是基于 **v1.4** 的小幅触发规则增强版。 本次更新： - 新增 **触发规则**，明确哪些场景应调用本 skill。 - 当用户要求测试、Benchmark、比较、评估或选择 Ollama 模型时，默认使用 **真实任务基准测试**，除非用户明确只要求快速连通性测试。 - 新增模型测试标准输出格式，让测试结果更稳定、更可复盘。 --- ## Author Note / 作者说明 This skill comes from a real-world local Ollama power-user workflow. I maintain multiple local models for RAG, document analysis, vision tasks, coding assistance, and role-based AI workflows. As the model pool grows, the hard part is no longer just pulling models. The real challenge is knowing why each model exists, whether it is still referenced by scripts, whether it can be safely removed, whether benchmark results are meaningful, and whether no-think settings actually work. **Ollama Model Pilot** is designed to be a safety-first operational guide rather than an aggressive automation tool. Its goal is to help users manage local models with more structure and less risk: inspect before changing, keep an inventory, scan references before cleanup, and validate models with real tasks before replacing production workflows. 这个 skill 来自一个真实的本地 Ollama 重度使用场景。 我在本地同时维护多个模型，用于 RAG、文档分析、视觉识别、代码辅助和多角色工作流。模型越来越多以后，真正麻烦的不是下载模型，而是：不知道每个模型为什么存在、是否还被脚本引用、能不能安全删除、Benchmark 结果是否可信、no-think 配置到底有没有生效。 **Ollama Model Pilot** 的重点不是鼓励用户自动执行更多命令，而是帮助用户建立一套更安全、更清晰的本地模型管理流程：先检查，再记录；先扫描引用，再判断删除；先用真实任务测试，再替换生产模型。 --- ## Naming Note / 命名说明 This skill was previously published as **Model Pilot** and earlier as **Ollama Lifecycle Manager**. It is now renamed to **Ollama Model Pilot** to make the Ollama use case explicit while keeping the product name **Model Pilot**. The package / slug may remain `modelpilot` for compatibility. The old **Ollama Lifecycle Manager** listing has been merged and redirects to `modelpilot`. 本 skill 早期曾以 **Ollama Lifecycle Manager** 和 **Model Pilot** 名称发布。现在统一命名为 **Ollama Model Pilot**，既保留 Ollama 搜索入口，也保留 Model Pilot 的产品名称。 为保持兼容，安装包名 / slug 可以继续使用 `modelpilot`。旧版 **Ollama Lifecycle Manager** listing 已合并并重定向至 `modelpilot`。 --- ## Purpose / 用途 **Ollama Model Pilot** is an operational playbook and checklist for local Ollama model lifecycle management. It helps users safely manage: - model pulling and import decisions - model inventory and role tracking - reproducible benchmarking - real-task model validation - aliases and naming conventions - no-think / thinking-control usage - script reference scanning - safe cleanup of old models - ModelScope / mirror fallback and related risks - common troubleshooting steps **Ollama Model Pilot** 是 Ollama 本地模型生命周期管理的**操作指南与检查清单**，用于帮助用户安全地完成： - 拉取和导入模型前的判断 - 模型台账和角色记录 - 可复盘 Benchmark - 真实任务基准测试 - 模型别名和命名规范 - no-think / thinking 控制 - 脚本模型引用扫描 - 旧模型安全清理 - ModelScope / 镜像回退及风险判断 - 常见故障排查 Trigger words / 触发词：Ollama, local model, model lifecycle, model inventory, benchmark, model cleanup, model alias, no-think, think false, ModelScope, GGUF, RAG, vision model, coding model, script reference scan, 模型生命周期, 模型台账, 模型清理, 模型测速, 本地模型管理。 --- ## Activation Rules / 触发规则 Use this skill when the user asks about any of these Ollama model-management tasks: - test, benchmark, compare, evaluate, or select a local Ollama model - decide whether a model is good enough for a workflow - check whether a model can be safely deleted - create or review an Ollama model inventory - scan project files for model references - configure or evaluate no-think / thinking behavior - choose a model for RAG, document analysis, coding, vision, or role-based workflows Default rule: > When the user asks to test, benchmark, compare, evaluate, or select an Ollama model, use the **Real-Task Benchmark** workflow unless the user explicitly asks for a quick smoke test only. A quick smoke test only checks whether the model can run. It is not enough to recommend a model for production use. 当用户提出以下需求时，应使用本 skill： - 测试、Benchmark、比较、评估或选择本地 Ollama 模型 - 判断模型是否适合进入正式工作流 - 判断模型是否可以安全删除 - 建立或检查 Ollama 模型台账 - 扫描项目文件中的模型引用 - 配置或评估 no-think / thinking 行为 - 为 RAG、文档分析、代码、视觉或多角色工作流选择模型 默认规则： > 当用户要求测试、Benchmark、比较、评估或选择 Ollama 模型时，除非用户明确只要求快速连通性测试，否则使用 **Real-Task Benchmark / 真实任务基准测试** 流程。 快速连通性测试只能说明模型能运行，不能作为进入正式工作流的依据。 ## 0. Safety Boundary / 安全边界 Default principle: > **Read first. Explain before changing. Confirm before destructive operations.** 默认原则： > **只读优先，修改前说明，破坏性操作必须单独确认。** ### 0.1 Read-only operations allowed by default / 默认允许的只读操作 These commands are generally safe to suggest or run when the user asks for model inspection: ```bash ollama list ollama --version curl http://localhost:11434/api/version curl http://localhost:11434/api/tags pwd ls rg "ollama run|MODEL_NAME|model_name|\"model\"|ollama\.chat|ollama\.generate" . du -sh ~/.ollama/models/ ``` ### 0.2 Operations requiring explicit user confirmation / 必须用户确认后才能执行的操作 The following operations download, create, copy, modify, upgrade, or delete resources. Explain the impact and wait for user confirmation: ```bash ollama pull <model> ollama cp <source_model> <alias> ollama create <new_model> -f <Modelfile> ollama rm <model> brew upgrade ollama ``` ### 0.3 Operations that should not be automated / 不应自动执行的操作 Do not automatically perform these operations unless the user clearly asks and confirms: - Delete a model with `ollama rm` - Overwrite an existing Modelfile - Modify `~/.zshrc`, `~/.bashrc`, `~/.profile`, or other shell configuration files - Modify system-level environment variables - Change `OLLAMA_CONTEXT_LENGTH`, `OLLAMA_NUM_PARALLEL`, `OLLAMA_MAX_LOADED_MODELS` - Bulk-download multiple large models - Replace production workflow model names in scripts ### 0.4 Required confirmation before deleting a model / 删除模型前必须确认 Before deleting any model, output: 1. Current `ollama list` summary 2. Model name to delete 3. Known or inferred usage 4. Whether script references were found 5. Whether it is an alias or source model 6. Possible replacement model 7. Recovery path after deletion 8. Explicit confirmation prompt Recommended confirmation text: ```text Please confirm whether to delete model: <model_name>. After deletion, recovery may require re-downloading or re-creating the model. 请确认是否删除模型：<model_name>。 删除后如需恢复，可能需要重新下载或重新 create。 ``` --- ## 1. When to Use / 适用场景 ### 1.1 Suitable scenarios / 适用场景 Use this skill when the user wants to: - Manage many local Ollama models - Know which model exists for which task - Compare local models on the same machine - Create stable model aliases - Decide whether a model can be safely removed - Avoid breaking scripts that reference specific models - Handle slow or failed model downloads - Use ModelScope or another mirror with caution - Create no-think or low-think usage patterns - Validate models before using them in RAG, document analysis, coding, vision, or production workflows ### 1.2 Unsuitable scenarios / 不适用场景 Do not use this skill to: - Automatically decide which models to delete - Claim a model is the “best” without testing - Auto-modify production scripts - Benchmark private or sensitive content without user approval - Replace domain-specific professional evaluation - Encourage unsafe third-party model sources without checking metadata and trust signals --- ## 2. Environment Check / 环境检查 Before changing anything, inspect the environment: ```bash ollama --version curl http://localhost:11434/api/version ollama list du -sh ~/.ollama/models/ ``` Record: ```markdown ## Ollama Environment Record - Date: - Operating system: - CPU / GPU / chip: - Memory: - Ollama CLI version: - Ollama server version: - Model directory size: - Main use cases: chat / RAG / document analysis / coding / vision / other - Notes: ``` If CLI and server versions appear inconsistent, restart Ollama before testing new models or diagnosing model failures. --- ## 3. Model Inventory / 模型台账 Lifecycle management is not “delete models until only a few remain.” The real goal is to know why each model exists. Recommended file: ```text Ollama模型台账.md ``` Template: ```markdown # Ollama Model Inventory / Ollama 模型台账 | Model | Type | Current use | Script / app reference | Status | Deletable? | Replacement | Last tested | Notes | |---|---|---|---|---|---|---|---|---| | gemma4:26b | text | long-document analysis | batch_xxx.py | core | no | - | YYYY-MM-DD | stable | | qwen3-vl | vision | image understanding | photo_app | task model | no | - | YYYY-MM-DD | keep | | gpt-oss:20b | text | experiment | none | testing | maybe | xxx | YYYY-MM-DD | slow | ``` ### 3.1 Model status categories / 模型状态分层 Classify every model into one of these groups: 1. **Core model / 核心模型** Used by a default workflow. Do not delete. 2. **Task model / 任务模型** Special use: embedding, vision, coding, long-context, RAG, OCR-related tasks, etc. 3. **Backup model / 备用模型** Useful when the core model fails, is too slow, or produces weak output. 4. **Testing model / 测试模型** New model under observation. Revisit after 7–30 days. 5. **Deprecated model / 废弃模型** No clear use, no script references, has a replacement, safe to remove after confirmation. --- ## 4. Script Reference Scan / 脚本引用扫描 Before cleaning models, scan project files for hardcoded model references. From the project root: ```bash rg "ollama run|MODEL_NAME|model_name|\"model\"|ollama\.chat|ollama\.generate" . ``` Fallback if `rg` is unavailable: ```bash grep -R "ollama run\|MODEL_NAME\|model_name\|\"model\"" . 2>/dev/null ``` Record results: ```markdown ## Model Reference Scan Result / 模型引用扫描结果 | Model | File | Location | Use | Deletion impact | |---|---|---|---|---| | gemma-doc-nothink | batch_qwen_cards.py | MODEL_NAME | extraction | high | | mistral-qa | qa_ask.py | model_name | deep QA | high | ``` Before deleting a model, answer: 1. Is it hardcoded in scripts? 2. Is it an alias or source model? 3. Is it used for embedding, RAG, vision, coding, or long-context tasks? 4. Is there a quality- and speed-tested replacement? 5. Can it be restored easily? --- ## 5. Pulling or Importing a New Model / 拉取或导入新模型 ### 5.1 Prefer the official Ollama registry first / 优先使用官方 registry ```bash ollama pull <model_name>:<tag> ``` Before pulling, check: - model source - model size - quantization level - estimated disk usage - hardware memory fit - overlap with existing models - intended use case - test task to run after download ### 5.2 Fallback when download fails / 下载失败后的回退流程 If the official registry is slow or stuck: 1. Confirm it is not a temporary network issue. 2. Stop the stuck pull if needed. 3. Search ModelScope or Hugging Face for the target model. 4. Verify publisher, filename, quantization, update time, and license. 5. Pull with a full ModelScope path or manually import GGUF. 6. Test with the fixed benchmark set before using it in production. ModelScope example: ```bash ollama pull modelscope.cn/<org>/<model_name>:<tag> ``` ### 5.3 Mirror-source risk warning / 镜像源风险提示 When using ModelScope, Hugging Face mirrors, or other third-party sources: - Use the model page as the source of truth for path and tag. - Same model names may be uploaded by unofficial publishers. - Template, chat format, license, and quantization may differ from official versions. - Pull success does not mean workflow compatibility. - Always run fixed benchmark and real-task validation. --- ## 6. Benchmark Standard Process / Benchmark 标准流程 Do not rely only on `ollama run + subprocess` wall-clock timing. Wall time mixes model loading, CLI overhead, output rendering, and generation time. Prefer the Ollama API and record: - `total_duration` - `load_duration` - `prompt_eval_count` - `prompt_eval_duration` - `eval_count` - `eval_duration` Core speed metric: ```text tokens_per_second = eval_count / (eval_duration / 1e9) ``` ### 6.1 Benchmark scenarios / 测试场景 Use at least four scenarios: 1. **Short QA / 短问答**: 100–300 characters output, daily response speed. 2. **Long writing / 长文写作**: 800–1500 characters output, sustained generation. 3. **Long summary / 长文摘要**: 5,000–15,000 characters input, context processing. 4. **Structured output / 结构化输出**: JSON or fixed Markdown, workflow stability. ### 6.2 Cold start and warm start / 冷启动与热启动 - **Cold start** includes model loading time. It reflects first-response experience. - **Warm start** runs a warmup prompt before testing. It reflects continuous-use speed. ### 6.3 API benchmark script / API Benchmark 脚本 Save as: ```text ollama_benchmark.py ``` ```python #!/usr/bin/env python3 import argparse import json import statistics import time import urllib.request from typing import Any, Dict, List OLLAMA_URL = "http://localhost:11434/api/generate" def call_ollama(model: str, prompt: str, think: str | None = None, timeout: int = 600) -> Dict[str, Any]: payload: Dict[str, Any] = { "model": model, "prompt": prompt, "stream": False, } if think is not None: if think.lower() == "false": payload["think"] = False elif think.lower() == "true": payload["think"] = True else: payload["think"] = think req = urllib.request.Request( OLLAMA_URL, data=json.dumps(payload).encode("utf-8"), headers={"Content-Type": "application/json"}, method="POST", ) start = time.time() with urllib.request.urlopen(req, timeout=timeout) as resp: data = json.loads(resp.read().decode("utf-8")) wall_sec = time.time() - start eval_count = data.get("eval_count") or 0 eval_duration = data.get("eval_duration") or 0 prompt_eval_count = data.get("prompt_eval_count") or 0 prompt_eval_duration = data.get("prompt_eval_duration") or 0 load_duration = data.get("load_duration") or 0 total_duration = data.get("total_duration") or 0 response = data.get("response", "") tps = None if eval_count and eval_duration: tps = eval_count / (eval_duration / 1e9) prompt_tps = None if prompt_eval_count and prompt_eval_duration: prompt_tps = prompt_eval_count / (prompt_eval_duration / 1e9) return { "model": model, "wall_sec": round(wall_sec, 3), "total_sec_api": round(total_duration / 1e9, 3) if total_duration else None, "load_sec": round(load_duration / 1e9, 3) if load_duration else None, "prompt_eval_count": prompt_eval_count, "prompt_eval_sec": round(prompt_eval_duration / 1e9, 3) if prompt_eval_duration else None, "prompt_tokens_per_sec": round(prompt_tps, 2) if prompt_tps else None, "eval_count": eval_count, "eval_sec": round(eval_duration / 1e9, 3) if eval_duration else None, "tokens_per_sec": round(tps, 2) if tps else None, "response_chars": len(response), "preview": response[:160].replace("\n", " ") + ("..." if len(response) > 160 else ""), } def run_benchmark(models: List[str], prompt: str, rounds: int, warmup: bool, think: str | None) -> None: if warmup: for model in models: try: call_ollama(model, "请用一句话回答：测试。", think=think) except Exception as e: print(f"[WARMUP FAIL] {model}: {e}") for model in models: results = [] for i in range(rounds): try: result = call_ollama(model, prompt, think=think) result["round"] = i + 1 results.append(result) print(json.dumps(result, ensure_ascii=False)) except Exception as e: print(json.dumps({"model": model, "round": i + 1, "error": str(e)}, ensure_ascii=False)) speeds = [r["tokens_per_sec"] for r in results if r.get("tokens_per_sec") is not None] if speeds: summary = { "model": model, "rounds": len(speeds), "tokens_per_sec_avg": round(statistics.mean(speeds), 2), "tokens_per_sec_min": round(min(speeds), 2), "tokens_per_sec_max": round(max(speeds), 2), } print("[SUMMARY] " + json.dumps(summary, ensure_ascii=False)) if __name__ == "__main__": parser = argparse.ArgumentParser(description="Ollama API benchmark") parser.add_argument("models", nargs="+", help="Models to benchmark") parser.add_argument("--prompt", default="请写一段约500字的中文说明，介绍本地大模型的实际用途。") parser.add_argument("--rounds", type=int, default=1) parser.add_argument("--warmup", action="store_true") parser.add_argument("--think", default=None, help="true / false / low / medium / high, if supported by model and Ollama") args = parser.parse_args() run_benchmark(args.models, args.prompt, args.rounds, args.warmup, args.think) ``` Usage: ```bash python3 ollama_benchmark.py gemma4:26b qq36 --rounds 2 --warmup python3 ollama_benchmark.py qq36-nothink qq36 --think false --rounds 2 --warmup ``` ### 6.4 Quality evaluation is required / 速度测试不能代替质量测试 Before using a model in a production workflow, test with real or sanitized materials: - Does it miss important facts? - Does it hallucinate? - Does it follow fixed output formats? - Can it handle long context? - Does it over-infer? - Does it leak visible reasoning when it should not? - Does it match the intended role? ### 6.5 Real-Task Benchmark / 真实任务基准测试 Do not test models only with one generic prompt. Ollama users usually care less about abstract speed and more about this question: > **Does this model perform well in my real task without breaking format, facts, or workflow stability?** 建议为常用模型建立一组小型、固定、可复用的测试集。每次测试使用同一批任务、同一套评分维度、同一份结果记录模板。 Recommended task set: 1. **Short QA / 短问答** Tests basic understanding and daily response speed. 2. **Long Summary / 长文摘要** Input 5,000–15,000 characters. Tests context handling, fact retention, and compression. 3. **Structured Output / 结构化输出** Requires JSON, Markdown table, or fixed fields. Tests workflow reliability. 4. **Role Task / 真实角色任务** Uses the user’s own real workflow task or a sanitized sample. Tests production fit. Result template: ```markdown ## Real-Task Benchmark Result - Date: - Tester: - Device: - Ollama version: - Model: - Quantization: - Think setting: true / false / low / medium / high / unset - Task type: Short QA / Long Summary / Structured Output / Role Task - prompt_eval_count: - eval_count: - load_duration: - prompt_eval_duration: - eval_duration: - tokens_per_second: - total_duration: - format_pass: yes / no - quality_score: 1–5 - hallucination_risk: low / medium / high - production_ready: yes / no / observe - Notes: ``` Quality score: | Score | Meaning | Standard | |---:|---|---| | 5 | Production-ready | Acceptable speed, stable facts, stable format, not weaker than the current model | | 4 | Small-scope trial | Good quality but needs more observation | | 3 | Backup / testing only | Useful but has clear weaknesses | | 2 | Not recommended | Serious problems in speed, facts, or format | | 1 | Reject | Fails the task or frequently breaks output | Key rule: > A model should not be promoted into a production workflow only because it is fast. It should pass at least one real-task benchmark that matches the user’s actual use case. 中文原则： > 不能因为一个模型跑得快，就把它放进正式工作流。至少要通过一个贴近真实使用场景的任务测试，才能替换生产模型。 Decision guide: ```text Fast but unstable: keep as test only. High quality but slow: use as deep-analysis or backup model. Format unstable: do not use for RAG, automation, or structured output. Wins real-task benchmark: replace gradually and observe for 7–30 days. ``` ### 6.6 Required Benchmark Response Format / 模型测试标准输出格式 When using Real-Task Benchmark, respond with this structure: 1. Benchmark goal 2. Model and environment 3. Test tasks selected 4. Speed metrics 5. Output quality 6. Format stability 7. Workflow fit 8. Risks or limitations 9. Promotion decision 10. Recommended next action Clearly distinguish: - smoke test - speed benchmark - real-task benchmark - production promotion decision 使用真实任务基准测试时，按以下结构输出： 1. 测试目标 2. 模型与环境 3. 选用的测试任务 4. 速度指标 5. 输出质量 6. 格式稳定性 7. 工作流适配度 8. 风险或限制 9. 是否建议进入正式工作流 10. 下一步建议 必须区分：快速连通性测试、速度测试、真实任务基准测试、是否进入正式工作流的决策。 --- ## 7. Aliases and Naming / 别名与命名 ### 7.1 Ollama model aliases / Ollama 模型别名 ```bash ollama cp <source_model> <alias_name> ``` Example: ```bash ollama cp qwen3.6:35b-a3b-q4_k_m qq36 ``` Notes: - `ollama cp` usually creates an alias sharing underlying model storage. - Deleting an alias is not the same as deleting the source model. - Before deleting a source model, confirm whether aliases depend on it. - Alias names should be short, stable, and meaningful. ### 7.2 Shell aliases / Shell 命令别名 Only suggest commands by default. Do not automatically write to shell config. ```bash alias qq36='ollama run qq36' alias g26='ollama run gemma4:26b' ``` If the user wants to persist them: ```bash echo "alias qq36='ollama run qq36'" >> ~/.zshrc source ~/.zshrc ``` Warn the user before modifying shell configuration files. --- ## 8. No-Think / Thinking Control / 思考模式控制规范 ### 8.1 Core principle / 核心原则 A SYSTEM prompt can ask a model not to show reasoning, but it does not necessarily disable internal thinking. SYSTEM 提示词只能要求模型“不输出思考过程”，不等于底层关闭 thinking。 If Ollama and the model support the `think` parameter, prefer explicit API control: ```bash curl http://localhost:11434/api/generate -d '{ "model": "<model>", "prompt": "请总结这段材料。", "think": false, "stream": false }' ``` If thinking levels are supported, test: ```json "think": "low" ``` or: ```json "think": "medium" ``` Always verify through actual output and API behavior. ### 8.2 Modelfile is only a weak constraint / Modelfile 只是弱约束 For models that do not support `think`, a Modelfile can reduce visible reasoning but cannot guarantee true no-think behavior. ```text FROM <model_name>:<tag> SYSTEM "直接输出最终答案。不要输出思考过程、推理草稿或隐藏分析。" PARAMETER temperature 0.4 ``` Create: ```bash ollama create <model_name>-nothink -f Modelfile.<model_name>-nothink ``` Recommended naming: ```text Modelfile.<source_model>.<purpose>.nothink ``` Do not overwrite existing Modelfiles. --- ## 9. Cleanup Workflow / 旧模型清理 ### 9.1 Inspect models and disk usage / 查看模型与占用 ```bash ollama list du -sh ~/.ollama/models/ ``` ### 9.2 Cleanup criteria / 清理判断标准 Do not mechanically keep only 3–5 models. A model is a cleanup candidate only when most of these are true: - No clear use - No script references - Not an embedding / vision / coding / RAG / long-context model - Not used in the last 30 days, or confirmed no longer needed - Benchmark is clearly worse than alternatives - A tested replacement exists - It can be re-downloaded or rebuilt ### 9.3 Pre-delete checklist / 删除前检查模板 ```markdown ## Pre-delete Model Check / 删除模型前检查 - Model to delete: - Current use: - In inventory: yes / no - Script reference found: yes / no - Is alias: yes / no / unknown - Replacement model: - Deletion risk: low / medium / high - Recovery path: re-pull / re-create / unavailable - Recommendation: delete / hold / keep ``` Delete only after confirmation: ```bash ollama rm <model_name> ``` Verify after deletion: ```bash ollama list du -sh ~/.ollama/models/ ``` --- ## 10. Quantization Selection / 量化级别选择指南 | Quantization | Size | Quality | Speed / memory | Use case | |---|---:|---|---|---| | Q3_K_M | small | basic | low pressure | memory-constrained, rough tasks | | Q4_K_M | medium | good | balanced | default daily choice | | Q5_K_M | larger | better | more pressure | quality-sensitive tasks | | Q8_0 | large | close to original | high pressure | quality-first and enough memory | Rules: - Chat, summary, light workflows: start with Q4_K_M. - Higher-quality long-form or complex analysis: test Q5_K_M or Q8_0. - Low-memory devices: try smaller models or Q3_K_M. - Compare quantizations with the same benchmark set. --- ## 11. Troubleshooting / 常见故障 ### 11.1 Ollama version too old / Ollama 版本过旧 Symptoms: ```text unable to load model ``` Possible causes: - Ollama does not support the model format - CLI and server versions differ - Ollama server has not restarted Check: ```bash ollama --version curl http://localhost:11434/api/version ``` Restart or upgrade based on the installation method. ### 11.2 Model download stuck / 模型下载卡住 Order of handling: 1. Check network. 2. Retry `ollama pull`; Ollama may resume. 3. If official source remains stuck, consider ModelScope or Hugging Face. 4. After using another source, validate model quality and format. ### 11.3 Slow loading or memory pressure / 加载慢或内存不足 Check: ```bash ollama list du -sh ~/.ollama/models/ ``` Suggested actions: - Use a smaller model or lower quantization. - Reduce concurrency. - Avoid loading multiple large models at once. - Do not blindly raise `OLLAMA_CONTEXT_LENGTH`. - Use long context only when the task requires it. ### 11.4 Output format unstable / 输出格式不稳定 Possible causes: - Model weak at structured output - Temperature too high - Prompt too loose - Context too long and instructions diluted Actions: - Lower temperature. - Use a stricter template. - Test with short structured samples. - Switch model if needed. --- ## 12. Recommended Workflows / 推荐工作流 ### 12.1 New model adoption / 新模型进入流程 ```text Discover model → Check source → Define use case → Pull/import → Record environment → Benchmark → Real-task test → Add to inventory → Decide whether to bind to scripts ``` ### 12.2 Model replacement / 模型替换流程 ```text Test candidate → Compare with current model → Check quality and format → Replace in small scope → Keep old model during observation → Update inventory → Decide whether to delete old model ``` ### 12.3 Cleanup / 模型清理流程 ```text ollama list → Inventory check → Script reference scan → Replacement check → Deletion recommendation → User confirmation → Delete → Verify disk usage → Update inventory ``` --- ## 13. Minimal Command Set / 最小可复制命令清单 ```bash # Environment ollama --version curl http://localhost:11434/api/version ollama list du -sh ~/.ollama/models/ # Pull model ollama pull <model_name>:<tag> # ModelScope fallback ollama pull modelscope.cn/<org>/<model_name>:<tag> # Create Ollama alias ollama cp <source_model> <alias_name> # Scan script references rg "ollama run|MODEL_NAME|model_name|\"model\"|ollama\.chat|ollama\.generate" . # Delete model, confirmation required ollama rm <model_name> # API no-think test curl http://localhost:11434/api/generate -d '{ "model": "<model>", "prompt": "请用一句话回答：测试。", "think": false, "stream": false }' ``` --- ## 14. Response Requirements / 输出要求 When the user asks to manage Ollama models, respond with: 1. Current judgment 2. Safety risks 3. Read-only checks to run first 4. Whether confirmation is needed 5. Next command or next decision When the user asks to clean up models, respond with: 1. Model grouping 2. Models that must not be deleted 3. Models to observe 4. Deletion candidates 5. Script-reference scan command 6. Explicit deletion confirmation prompt When the user asks to test models, respond with: 1. Test goal 2. Test scenarios 3. Benchmark command 4. Quality dimensions 5. Production-readiness judgment --- ## 15. Version Notes / 版本说明 ### v1.4.1 - Added Activation Rules so agents know when to use this skill. - Made Real-Task Benchmark the default workflow for model testing, comparison, evaluation, and selection unless the user asks for smoke testing only. - Added Required Benchmark Response Format for consistent results. ### v1.4 - Upgraded from the previous **v1.3 Model Pilot** release. - Renamed the maintained skill to **Ollama Model Pilot** while keeping `modelpilot` as the recommended package / slug for compatibility. - Added a clear v1.4 release highlight section near the top of the skill file. - Promoted **Real-Task Benchmark / 真实任务基准测试** into a core model-testing workflow, not just a supplementary note. - Added the production replacement rule: a model should not replace a workflow only because it is fast; it must pass at least one real-task benchmark matching the user’s actual use case. - Clarified legacy names: **Ollama Lifecycle Manager** and **Model Pilot**. - Clarified that old listings should be treated as legacy migration entries pointing to this maintained version. - Preserved the safety-first workflow: inventory first, script-reference scan before cleanup, confirmation before deletion, and cautious no-think handling. ### v1.3 - Released under the **Model Pilot** naming line. - Added / retained author note and safety-first positioning. - Included model inventory, script reference scanning, API benchmark, no-think rules, cleanup confirmation, and mirror-source risk warnings. --- ## 16. License / 许可说明 If this skill is derived from another published skill, confirm the original license and attribution requirements before distributing. 如果本 skill 基于其他已发布 skill 改写或增强，请在发布前确认原始许可、署名和再分发要求。


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)