delegate-to-ollama

delegate-to-ollama is a skill for Claude Code from hang-in/tunaLlama. It costs 87 tokens per session (918 once invoked), scanned A, original, MIT.

A skill for sending suitable coding tasks to Ollama, Ollama Cloud, or LM Studio, which are tools for running language models locally or remotely.

In plain words
What is it for?
Use it to generate code, review files, refactor code, write tests, or analyze several files when the task has clear boundaries.
Why use it?
It reduces the amount of project code the main agent must load while keeping the main agent responsible for architecture and decisions.

Skill for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Part of the tunaLlama plugin — 1 skill, 1 agent, 2 hooks, 1 MCP server shipped together

Good fit Use it to generate code, review files, refactor code, write tests, or analyze several files when the task has clear boundaries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hang-in/tunallama/delegate-to-ollama
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 hang-in/tunaLlama --skill delegate-to-ollama
Clone the repo
git clone --depth 1 https://github.com/hang-in/tunaLlama

Made for: Claude Code.

Or install tunaLlama, the plugin that ships this one along with the rest of its 1 skill, 1 agent, 2 hooks, 1 MCP server.

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 delegate-to-ollama

README.md
[![agentmods](https://agentmods.dev/badge/skills/hang-in/tunallama/delegate-to-ollama/github.svg)](https://agentmods.dev/skills/hang-in/tunallama/delegate-to-ollama)
Your own site
<a href="https://agentmods.dev/skills/hang-in/tunallama/delegate-to-ollama"><img src="https://agentmods.dev/badge/skills/hang-in/tunallama/delegate-to-ollama/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 delegate-to-ollama

Your own site · 80×15
<a href="https://agentmods.dev/skills/hang-in/tunallama/delegate-to-ollama"><img src="https://agentmods.dev/badge/skills/hang-in/tunallama/delegate-to-ollama.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 918 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.00087 $0.00918
Opus 5.5 $0.00035 $0.00367
Sonnet 5.5 $0.00017 $0.00184
Haiku 4.5 $0.00009 $0.00092

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

Security

Grade A, and why

delegate-to-ollama 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.

plugin/skills/delegate-to-ollama/SKILL.md · 80 lines

How it starts

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

When to use tunaLlama tools

tuna_* MCP tools delegate coding work to a local/cloud LLM. This is the Opus-with-Sonnet-subagent pattern: a smaller model handles the actual code generation, while you stay the architect.

The local LLM's window is smaller than yours, so the architect's job before delegation is fetching the context the subagent lacks. Use them when:

  1. The user asks for code generation and you have clear requirements. Use tuna_generate_code instead of generating the code yourself.

  2. The user asks to review or analyze a file. Use tuna_review_file (passing the path) instead of reading the file first. The file content stays out of your context — major token savings.

  3. The user asks for refactoring or test writing with a defined scope. Use tuna_refactor_code or tuna_write_tests.

  4. The user asks a question about multiple files. Use tuna_analyze_files so file contents bypass your context.

When NOT to delegate

  • Tasks requiring deep judgment about architecture or design — keep these yourself.
  • Short snippets (< ~10 lines) — overhead exceeds savings.
  • Tasks that require knowledge of recent conversation context the local LLM does not have.
  • Anything safety-critical or involving the user's intent interpretation.

Standard pattern: context-fetch then delegate then verify

  1. Context-fetch (architect's responsibility for the smaller subagent):
    • If the task is non-trivial, call tuna_recall to surface relevant past work in this project. The local LLM doesn't share your conversation context - relevant snippets help it avoid reinventing or contradicting.
    • Load project rules: the MCP resource tunallama://memory/state should auto-attach. If not visible, call tuna_load_memory once per session.
  2. Decompose the user's request into clear instructions, including the fetched context that the local LLM lacks.
  3. Call the appropriate tuna_* tool.
  4. Verify the returned output - catch obvious problems (wrong API, missing edge cases, divergence from project conventions in state.md).
  5. If wrong, call tuna_fix_code with a specific error description.
  6. Present the verified result to the user.

Read the full file on GitHub · 80 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. 2mo ago First seen · 80 lines · 87 tokens per session scan A 7168c77804d2

Subscribe to this mod's changes

delegate-to-ollama is a skill published in the GitHub repository hang-in/tunaLlama (45 stars, last pushed 4mo ago), licensed MIT. It adds 87 tokens to every session and 918 once invoked, about $0.0003 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-30.

Related

delegate-to-ollama compared with skills from other repositories

delegate-to-ollama next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
delegate-to-ollamahang-in/tunaLlamaSkill454mo agoMITA87Claude Code
imagegenopenai/codexSkill134ktodayApache-2.0A113Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79kyesterdayMITA200Claude Code, Codex
playwright-climicrosoft/playwrightSkill100kyesterdayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill394ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill314k4d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code