ollama-sync

ollama-sync is a skill for Claude Code from mskadu/opencode-agent-skills. It costs 45 tokens per session (679 once invoked), scanned A, original, MIT.

A synchronizer for the Ollama model list in an opencode.json configuration file. Ollama is software that runs language models on a local computer.

In plain words
What is it for?
Use it to read the current configuration, retrieve locally available Ollama models, extract their names, and update the Ollama provider's model list.
Why use it?
The configuration can become outdated when models are added or removed from the computer. This keeps its listed models aligned with the result of the ollama list command.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions OpenCode.

Good fit Use it to read the current configuration, retrieve locally available Ollama models, extract their names, and update the Ollama provider's model list.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mskadu/opencode-agent-skills/ollama-sync
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.

Any agent
npx skills add mskadu/opencode-agent-skills --skill ollama-sync
Clone the repo
git clone --depth 1 https://github.com/mskadu/opencode-agent-skills

Made for: Claude Code.

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 ollama-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/mskadu/opencode-agent-skills/ollama-sync/github.svg)](https://agentmods.dev/skills/mskadu/opencode-agent-skills/ollama-sync)
Your own site
<a href="https://agentmods.dev/skills/mskadu/opencode-agent-skills/ollama-sync"><img src="https://agentmods.dev/badge/skills/mskadu/opencode-agent-skills/ollama-sync/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ollama-sync

Your own site · 80×15
<a href="https://agentmods.dev/skills/mskadu/opencode-agent-skills/ollama-sync"><img src="https://agentmods.dev/badge/skills/mskadu/opencode-agent-skills/ollama-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 679 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00045 $0.00679
Opus 5.5 $0.00018 $0.00272
Sonnet 5.5 $0.00009 $0.00136
Haiku 4.5 $0.00005 $0.00068

Measured 2mo ago against content hash ef464b584f18, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ollama-sync 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 2mo 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/ollama-sync/SKILL.md · 63 lines

How it starts

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

Ollama Model Synchronizer

Your Task

When asked to synchronize the local Ollama configuration, your primary goal is to ensure that the model list in the opencode.json file is an accurate reflection of the models available on the host system.

The process must involve three main steps:

  1. Fetch Live List: Execute ollama list via the bash tool to retrieve all currently available model names and tags on the machine.
  2. Parse and Extract: Parse the output of ollama list to extract only the clean list of model names (e.g., llama2, mistral).
  3. Update Config: Use the edit tool to replace the existing model list in opencode.json (specifically the ollama provider section) with the newly fetched, accurate list.

Workflow Details

  1. Primary Command Execution:
    • Run ollama list using the bash tool.
  2. Parsing Logic (Internal):
    • The output of ollama list needs to be parsed to isolate model names. Assume the output format is reliable enough to grep for model names.
  3. File Manipulation:
    • Use the read tool on opencode.json to understand the current structure.
    • Use the edit tool to modify the specific section containing the model list.

Step-by-step Logic

  1. Check Dependency: Confirm if the ollama command is available in the execution environment.
  2. Get System Models: Execute ollama list to get the current list of models.
  3. Isolate Names: Programmatically parse the output to create a comma-separated string of model names.
  4. Write Back: Use the edit tool to replace the old model list with the new comma-separated list in opencode.json.

Examples & Edge Cases

  • Empty List: If ollama list returns no models, the opencode.json model list should be cleared or set to an empty array, and the user should be warned.
  • Error Handling: If the ollama command fails or is not found, the process must stop, and the user should be informed that the synchronization failed due to environment issues.

Read the full file on GitHub · 63 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 63 lines · 45 tokens per session scan A ef464b584f18

Subscribe to this mod's changes

ollama-sync is a skill published in the GitHub repository mskadu/opencode-agent-skills (1 stars, last pushed 4mo ago), licensed MIT. It adds 45 tokens to every session and 679 once invoked, about $0.0002 per session on Opus 5.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

llm-application-engineering

Engineers LLM applications: fixing bad output (prompting, RAG, finetuning), evals and LLM judges, agents and tools, guardrails, and production monitoring. Use when building or debugging an app on top of an LLM.

fabiandistler/agents · 59 tokens

ml-project-lifecycle

Guides a classical ML project — framing, baselines, model choice, missing data, deployment, retraining. Use when training a model on your own data, not when building an LLM app.

fabiandistler/agents · 46 tokens

ai-ml

Routes work on trained-model systems to the right sub-skill: LLM apps (prompting, RAG/retrieval, agents and tool use, evals and LLM judges, guardrails, fine-tuning) or classical ML projects (framing, baselines, model choice, missing data, deployment, retraining).

fabiandistler/agents · 71 tokens

agent-platform-tuning

Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).

google/skills · 64 tokens

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

agent-platform-prompt-management

Manages and orchestrates prompts in Agent Platform. Use when you need to create, list, retrieve, version, or delete managed prompts in Agent Platform. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform prompts.

google/skills · 55 tokens