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.
npx agentmods add skills/mskadu/opencode-agent-skills/ollama-syncnpx skills add mskadu/opencode-agent-skills --skill ollama-syncgit clone --depth 1 https://github.com/mskadu/opencode-agent-skillsWrote 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.
[](https://agentmods.dev/skills/mskadu/opencode-agent-skills/ollama-sync)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00045 | $0.00679 |
| Opus 5 | $0.00023 | $0.00340 |
| Sonnet 5 | $0.00009 | $0.00136 |
| Haiku 4.5 | $0.00005 | $0.00068 |
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 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.
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:
- Fetch Live List: Execute
ollama listvia the bash tool to retrieve all currently available model names and tags on the machine. - Parse and Extract: Parse the output of
ollama listto extract only the clean list of model names (e.g.,llama2,mistral). - Update Config: Use the
edittool to replace the existing model list inopencode.json(specifically theollamaprovider section) with the newly fetched, accurate list.
Workflow Details
- Primary Command Execution:
- Run
ollama listusing thebashtool.
- Run
- Parsing Logic (Internal):
- The output of
ollama listneeds to be parsed to isolate model names. Assume the output format is reliable enough to grep for model names.
- The output of
- File Manipulation:
- Use the
readtool onopencode.jsonto understand the current structure. - Use the
edittool to modify the specific section containing the model list.
- Use the
Step-by-step Logic
- Check Dependency: Confirm if the
ollamacommand is available in the execution environment. - Get System Models: Execute
ollama listto get the current list of models. - Isolate Names: Programmatically parse the output to create a comma-separated string of model names.
- Write Back: Use the
edittool to replace the old model list with the new comma-separated list inopencode.json.
Examples & Edge Cases
- Empty List: If
ollama listreturns no models, theopencode.jsonmodel list should be cleared or set to an empty array, and the user should be warned. - Error Handling: If the
ollamacommand fails or is not found, the process must stop, and the user should be informed that the synchronization failed due to environment issues.
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.
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.
- 5d ago First seen · 63 lines · 45 tokens per session scan A ef464b584f18
ollama-sync is a skill published in the GitHub repository mskadu/opencode-agent-skills (1 stars, last pushed 3mo ago), licensed MIT. It adds 45 tokens to every session and 679 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.
Other skills, from other repositories
google-cloud-solution-guided-gke-ai-migration
Guides the migration of existing AI workloads (Cloud Run, Gemini API, Gemini Enterprise Agent Platform) to self-hosted GKE inference using gcloud and kubectl. Use when the user has an existing AI inference workload (on Cloud Run, the Gemini API, Gemini Enterprise Agent Platform, or a custom VM) and wants to move it to…
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).
developing-genkit-js
Develop AI-powered applications using Genkit in Node.js/TypeScript. Use when the user asks about Genkit, AI agents, flows, or tools in JavaScript/TypeScript, or when encountering Genkit errors, validation issues, type errors, or API problems.
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.
agent-platform-rag-engine-management
Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…
gke-inference
Deploys and optimizes AI/ML inference workloads on GKE, using GPUs, TPUs, and model servers. Use when deploying GKE inference servers, configuring GKE GPU resources for inference, or deploying LLMs on GKE. Don't use for generic batch jobs or HPC task queues (use gke-batch-hpc instead).