fleet-model-optimizer

fleet-model-optimizer is a skill for Claude Code, Codex from chf3198/copilot-governance. It costs 41 tokens per session (927 once invoked), scanned A, original, MIT.

A tool for choosing suitable Ollama language models for each computer in a device fleet based on available memory and model size.

In plain words
What is it for?
Use it to review outdated model choices and produce pull, delete, and transition commands for administrators.
Why use it?
It helps avoid models that exceed a device's memory and plans replacements without leaving a service without a model.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/chf3198/copilot-governance/fleet-model-optimizer
Any agent
npx skills add chf3198/copilot-governance --skill fleet-model-optimizer
Clone the repo
git clone --depth 1 https://github.com/chf3198/copilot-governance

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fleet-model-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/chf3198/copilot-governance/fleet-model-optimizer.svg)](https://agentmods.dev/skills/chf3198/copilot-governance/fleet-model-optimizer)
Your own site
<a href="https://agentmods.dev/skills/chf3198/copilot-governance/fleet-model-optimizer"><img src="https://agentmods.dev/badge/skills/chf3198/copilot-governance/fleet-model-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 927 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00041 $0.00927
Opus 5 $0.00020 $0.00464
Sonnet 5 $0.00008 $0.00185
Haiku 4.5 $0.00004 $0.00093

Measured 5d ago against content hash a35dcf62a2e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fleet-model-optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/fleet-model-optimizer/SKILL.md · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fleet Model Optimizer Skill

Use this skill to audit and improve Ollama model selections across a device fleet. Invoke when models feel stale, performance is low, or after a major LLM release cycle.

Scope Boundary

Owns: hardware-to-tier mapping, model scoring, pull/delete command generation. Hands off to: Admin for actual ollama pull/delete execution on remote devices.

Hard Constraints

  • Never reference specific device IPs, hostnames, or user credentials.
  • Never recommend proprietary closed-weight models — Ollama registry only.
  • Always produce a pull-before-delete transition plan (no service gaps).
  • Respect RAM budget: leave ≥20% free after all models loaded.
  • Verify Ollama registry availability before recommending any model.

Tier Classification

Classify each device from merged fleet inventory (node scripts/global/fleet-config.js fleet) by available RAM:

Available RAM Tier Max model size Examples
< 1.5 GB slm ~500 MB gemma3:270m, qwen3.5:0.5b
1.5–4 GB slm+ ~1.5 GB gemma4:e4b, qwen3.5:1.5b
4–10 GB mid 7–8 B qwen3:8b, mistral-nemo:12b*
10–20 GB mid+ 8–14 B qwen3:8b, phi4:14b
20+ GB high 30–70 B deepseek-r1:32b, qwen3:30b

*Only if swap or GPU offload is available.

Step-by-Step Execution

1. Inventory Read

Run node scripts/global/fleet-config.js fleet (or read ~/.megingjord/devices.json overlay). For each device extract: id, ram.available, gpu (if present), ollamaModels, ollamaWarmTokPerSec.

2. Tier Classification

Apply the table above to assign each Ollama-enabled device a tier. Note any GPU presence — it enables larger models and faster inference.

3. Model Scoring (per tier)

Search Ollama registry trends (pull counts, recency) for top candidates:

  • Prioritize: reasoning quality, coding capability, pull count > 1M (community validation).
  • Include 1 primary + 1–2 fallback models per device.
  • Flag models with < 100K pulls as experimental.

Read the full file on GitHub · 85 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 85 lines · 41 tokens per session scan A a35dcf62a2e0

Subscribe to this mod's changes

fleet-model-optimizer is a skill published in the GitHub repository chf3198/copilot-governance (1 stars, last pushed 1mo ago), licensed MIT. It adds 41 tokens to every session and 927 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

integrated-browser

Use this when working on the VS Code integrated browser ("browserView") to understand its architecture and mental model. Covers the embedded Chromium browser, its editor tab, navigation, overlay/layout, sessions, and agent browser tools under src/vs/platform/browserView and src/vs/workbench/contrib/browserView.

microsoft/vscode · 68 tokens

spark-environment-setup

Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13). Use when installing PyTorch/Unsloth/TRL/vLLM on DGX Spark, hitting libcudart or wheel-ABI errors on aarch64, or choosing between NGC containers and bare pip installs.

wshobson/agents · 76 tokens

spark-memory-thermal-ops

Manage unified memory and thermals during long-running ML jobs on NVIDIA DGX Spark. Use when planning memory headroom for a training run on GB10, when a job OOMs on unified memory, or when monitoring temperature and power during multi-hour training.

wshobson/agents · 59 tokens

spark-training-gotchas

Preflight and diagnose the ten known failure modes for ML training on NVIDIA DGX Spark. Use when a training run on DGX Spark fails to start, OOMs below the 128GB limit, slows down mid-run, or before any multi-hour training job on GB10.

wshobson/agents · 63 tokens

llama-cpp

Runs LLM inference on CPU, Apple Silicon, and consumer GPUs without NVIDIA hardware. Use for edge deployment, M1/M2/M3 Macs, AMD/Intel GPUs, or when CUDA is unavailable. Supports GGUF quantization (1.5-8 bit) for reduced memory and 4-10× speedup vs PyTorch on CPU.

davila7/claude-code-templates · 76 tokens

amc-run-rtsp-calibration

Calibrate a new dataset from live RTSP camera streams via the AutoMagicCalib REST API. Use when the user provides RTSP URLs or asks to calibrate live cameras; VIOS records clips, AMC ingests them, then runs calibration.

NVIDIA/skills · 59 tokens