llm-agents-from-scratch: Skill for Claude Code

.claude/skills/benchmark-ollama-models/SKILL.md

benchmark-ollama-models is a skill for Claude Code from nerdai/llm-agents-from-scratch. It costs 83 tokens per session (1,725 once invoked), scanned A, original, Apache-2.0.

A procedure for comparing Ollama Cloud language models by observing how their agents use tools, activate skills, and complete notebook tasks. Ollama Cloud provides hosted AI models, while a notebook is an executable document containing code and explanations.

In plain words
What is it for?
It is for benchmarking candidate models before changing the default, checking a retired model replacement, or detecting changes in model behaviour.
Why use it?
A model can finish a notebook without doing the required work, so simple pass-or-fail results can select the wrong default model.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions subagents.

This is nerdai/llm-agents-from-scratch's own configuration. It tells Claude Code how to work on llm-agents-from-scratch itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything llm-agents-from-scratch configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run python _scripts/benchmark_models.py models.

Reuse

Borrowing it

Nothing to install: this file belongs to nerdai/llm-agents-from-scratch. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nerdai/llm-agents-from-scratch/main/.claude/skills/benchmark-ollama-models/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/nerdai/llm-agents-from-scratch

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 benchmark-ollama-models

README.md
[![agentmods](https://agentmods.dev/badge/skills/nerdai/llm-agents-from-scratch/benchmark-ollama-models/github.svg)](https://agentmods.dev/skills/nerdai/llm-agents-from-scratch/benchmark-ollama-models)
Your own site
<a href="https://agentmods.dev/skills/nerdai/llm-agents-from-scratch/benchmark-ollama-models"><img src="https://agentmods.dev/badge/skills/nerdai/llm-agents-from-scratch/benchmark-ollama-models/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 benchmark-ollama-models

Your own site · 80×15
<a href="https://agentmods.dev/skills/nerdai/llm-agents-from-scratch/benchmark-ollama-models"><img src="https://agentmods.dev/badge/skills/nerdai/llm-agents-from-scratch/benchmark-ollama-models.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,725 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.00083 $0.01725
Opus 5.5 $0.00033 $0.00690
Sonnet 5.5 $0.00017 $0.00345
Haiku 4.5 $0.00008 $0.00172

Measured 26d ago against content hash 96ffbd9cc1c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

benchmark-ollama-models 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 26d 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.

.claude/skills/benchmark-ollama-models/SKILL.md · 132 lines

How it starts

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

Benchmark Ollama Cloud models

Pick the default Ollama Cloud model by what the chapter notebooks' agents do, not whether the notebooks finish. The tool is _scripts/benchmark_models.py; this skill is the procedure around it.

Why behaviour, not pass/fail

A notebook can run to completion while the model gets the lesson wrong. Both of these happened with gemma4:31b:

  • Faked tool calls: ch04 "passed" while the agent made no tool calls and wrote a trace claiming it had.
  • Subagent out of steps: ch09 "passed" because the coordinator handles the failure gracefully.

benchmark_models.py records ran (no errors) and behaved (ran and met every check in its EXPECTATIONS table for that chapter). Rank by behaved.

When to run it

  • Before changing the Ollama Cloud default in src/llm_agents_from_scratch/notebook_utils/llm.py (_MODELS["ollama-cloud"]).
  • When the current default is retired, or Ollama Cloud adds models.
  • Occasionally, to catch drift in the current default.

Procedure

Load the keys first: set -a && source .env && set +a.

  1. List the models:
    uv run python _scripts/benchmark_models.py models
    
  2. Stage 1: screen every model on the quick chapters (ch03–ch07), plus ch04 two more times, since its failure mode is intermittent. Run models in parallel; these notebooks bind no ports: run appends, so start from a fresh file; otherwise an earlier benchmark's records leak into this ranking:
    rm -f stage1.jsonl
    uv run python _scripts/benchmark_models.py models | xargs -P 3 -I{} \
      uv run python _scripts/benchmark_models.py run {} --out stage1.jsonl
    uv run python _scripts/benchmark_models.py models | xargs -P 3 -I{} \
      uv run python _scripts/benchmark_models.py run {} --chapters ch04 \
        --runs 2 --out stage1.jsonl
    uv run python _scripts/benchmark_models.py summary stage1.jsonl
    
    Keep the models with a perfect stage-1 score, usually a handful.
  3. Stage 2: the shortlist, 3 runs of every chapter with a behaviour check, so nothing that decides the default rests on a single run. ch08 is the approval gate; ch09 has concurrent subagents, chaining and human input, and is where models most often fail:
    rm -f stage2.jsonl
    printf '%s\n' <model> <model> ... | xargs -P 3 -I{} \
      uv run python _scripts/benchmark_models.py run {} \
        --chapters ch04,ch05,ch06,ch07,ch08,ch09 --runs 3 --out stage2.jsonl
    uv run python _scripts/benchmark_models.py summary stage2.jsonl
    
    This takes 20–30 minutes; ch09 alone is 2–5 minutes per run.
  4. Pick: the highest behaved score, then the fastest (readers wait on ch09). Name a backup, the next model with a perfect score.
  5. Check the pick on what the benchmark skips, with OLLAMA_MODEL=<pick> and an isolated HOME (see Pitfalls):
    • ch10 (A2A peer apps; the CrewAI peer uses ollama_chat/<pick>)
    • ch02–ch03
    • one _scripts/run_notebook.py pass over more-examples/ and capstones/

Read the full file on GitHub · 132 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. 26d ago First seen · 132 lines · 83 tokens per session scan A 96ffbd9cc1c2

Subscribe to this mod's changes

benchmark-ollama-models is a skill published in the GitHub repository nerdai/llm-agents-from-scratch (194 stars, last pushed yesterday), licensed Apache-2.0. It adds 83 tokens to every session and 1,725 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-10-12.

Related

benchmark-ollama-models compared with skills from other repositories

benchmark-ollama-models next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
benchmark-ollama-modelsnerdai/llm-agents-from-scratchSkill194yesterdayApache-2.0A83Claude Code
llm-app-patternsdavila7/claude-code-templatesSkill33kyesterdayMITA54Claude Code, Codex
prompt-engineerJeffallan/claude-skillsSkill12k7d agoMITA93Claude Code
prompt-optimizationlangwatch/langwatchSkill5.0kyesterdayApache-2.0A105Claude Code, Codex
omh-model-optimizationrlaope/oh-my-hermesSkill5.2ktodayMITA84Claude Code, Codex
ideogram4digitalsamba/claude-code-video-toolkitSkill2.5ktodayMITA99Claude Code
prompt-library-for-startupsaws/agent-toolkit-for-awsSkill3.4kyesterdayApache-2.0A228Claude Code