agent-model

agent-model is a skill for Claude Code from MadAppGang/magus. It costs 44 tokens per session (1,081 once invoked), scanned C, original, MIT.

A guide for choosing the language model that powers an autonomous browser-use agent, separately from the model handling the current conversation.

In plain words
What is it for?
Use it when selecting or overriding a model for browser automation, retries, or cloud browser sessions, especially when cost, speed, or reasoning ability matters.
Why use it?
It helps match the agent's model to the task and explains how session settings, project configuration, and available providers determine the choice.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths.

Part of the browser-use plugin — 6 skills shipped together

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/madappgang/magus/agent-model
Any agent
npx skills add MadAppGang/magus --skill agent-model
Clone the repo
git clone --depth 1 https://github.com/MadAppGang/magus

Made for: Claude Code.

Or install browser-use, the plugin that ships this one along with the rest of its 6 skills.

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 agent-model

README.md
[![agentmods](https://agentmods.dev/badge/skills/madappgang/magus/agent-model.svg)](https://agentmods.dev/skills/madappgang/magus/agent-model)
Your own site
<a href="https://agentmods.dev/skills/madappgang/magus/agent-model"><img src="https://agentmods.dev/badge/skills/madappgang/magus/agent-model.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,081 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.1 $0.00044 $0.01081
Opus 5 $0.00022 $0.00541
Sonnet 5 $0.00009 $0.00216
Haiku 4.5 $0.00004 $0.00108

Measured 6d ago against content hash 0e9e149b7085, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

agent-model scanned grade C with 2 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 6d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`~/.claude/settings.json` → `<project>/.claude/settings.json` →

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

server: add it to the plugin's `.mcp.json` env block (e.g. `"ZHIPU_API_KEY": "${ZHIPU_API_KEY}"`)
plugins/browser-use/skills/agent-model/SKILL.md · 79 lines

How it starts

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

Choosing the browser-use agent brain

The retry_with_browser_use_agent tool and cloud sessions run an autonomous agent loop that needs its own LLM to think with (it makes its own API calls — it does not borrow this Claude session). This skill decides which LLM, per task. The Python MCP server is deliberately dumb: it reads config and accepts an override. The judgment lives here.

Selection precedence (how the server resolves the brain)

  1. Session override — set at runtime by the browser_set_agent_model tool (this turn only).
  2. Configured — the "browser-use"."agentModel" block merged from settings files: ~/.claude/settings.json<project>/.claude/settings.json<project>/.claude/settings.local.json (local wins).
  3. Legacy — if BROWSER_USE_API_KEY is set and nothing above, Browser Use's bu-latest.
  4. Defaultanthropic / LATEST_SONNET_MODEL (uses ANTHROPIC_API_KEY, already available).

Providers

provider id use for key (env var NAME) base_url
anthropic Claude models — strong vision, best default ANTHROPIC_API_KEY not needed
openai GPT models OPENAI_API_KEY not needed
openai_compatible Kimi, GLM, Moonshot, Zhipu, or any OpenAI-compatible endpoint your choice required
browser_use Browser Use's hosted BU3 models (bu-latest, bu-2-0) BROWSER_USE_API_KEY not needed

Current Anthropic vision models: LATEST_SONNET_MODEL (default; best multi-step + vision), LATEST_OPUS_MODEL (hardest reasoning), LATEST_HAIKU_MODEL (cheapest/fastest). Confirm live ids against the claude-api skill before quoting one — do not rely on memory.

Picking a model for the task

  • Simple scrape / read one page → cheap+fast is fine: LATEST_HAIKU_MODEL, or a cheap openai_compatible model.
  • Multi-step form fill, navigation, recovering from popupsLATEST_SONNET_MODEL (default).
  • Login / auth flows, ambiguous pages, hard reasoningLATEST_SONNET_MODEL or LATEST_OPUS_MODEL.
  • CAPTCHA / stealth / anti-bot → a cloud session (browser_start_cloud_session) with browser_use / bu-latest, which is tuned for it.
  • If the user names a model or provider (Kimi, GLM, "the cheap one", "smartest"), honor it.

Read the full file on GitHub · 79 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. 6d ago First seen · 79 lines · 44 tokens per session scan C 0e9e149b7085

Subscribe to this mod's changes

agent-model is a skill published in the GitHub repository MadAppGang/magus (9 stars, last pushed 2d ago), licensed MIT. It adds 44 tokens to every session and 1,081 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 2 findings (reads agent configuration directories, reads mcp configuration). 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

v8-jit

V8 JIT optimization patterns for writing high-performance JavaScript in Next.js server internals. Use when writing or reviewing hot-path code in app-render, stream-utils, routing, caching, or any per-request code path. Covers hidden classes / shapes, monomorphic call sites, inline caches, megamorphic deopt, closure…

vercel/next.js · 88 tokens

use-agent-browser-for-airi

Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…

moeru-ai/airi · 87 tokens

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

every-app/open-seo · 35 tokens

interactive-login

How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.

yc-software/qm · 46 tokens