lm-studio

lm-studio is a skill for Claude Code, Codex from aivrar/portable-hermes-agent. It costs 13 tokens per session (2,243 once invoked), scanned A, original, MIT.

A controller for local language models running in LM Studio, a desktop application that downloads and runs AI models on your own computer. It can discover, download, load, configure, inspect, and use those models through the chat environment.

In plain words
What is it for?
Use it to connect to LM Studio, find downloaded models, download or load a model, change the active model, and run a local model.
Why use it?
It provides one place to manage local models instead of switching between the chat and LM Studio. LM Studio must be running for these operations to work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to connect to LM Studio, find downloaded models, download or load a model, change the active model, and run a local model.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aivrar/portable-hermes-agent/lm-studio
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 aivrar/portable-hermes-agent --skill lm-studio
Clone the repo
git clone --depth 1 https://github.com/aivrar/portable-hermes-agent

Made for: Claude Code, Codex.

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 lm-studio

README.md
[![agentmods](https://agentmods.dev/badge/skills/aivrar/portable-hermes-agent/lm-studio/github.svg)](https://agentmods.dev/skills/aivrar/portable-hermes-agent/lm-studio)
Your own site
<a href="https://agentmods.dev/skills/aivrar/portable-hermes-agent/lm-studio"><img src="https://agentmods.dev/badge/skills/aivrar/portable-hermes-agent/lm-studio/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 lm-studio

Your own site · 80×15
<a href="https://agentmods.dev/skills/aivrar/portable-hermes-agent/lm-studio"><img src="https://agentmods.dev/badge/skills/aivrar/portable-hermes-agent/lm-studio.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,243 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 285
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 286
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Server-Side Request Forgery · line 35
    Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.
    Fix: Avoid requests to loopback/link-local/private hosts from skill code. If internal access is intended, document it and validate the target against an allowlist.
How audits are shown
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.00013 $0.02243
Opus 5 $0.00006 $0.01122
Sonnet 5 $0.00003 $0.00449
Haiku 4.5 $0.00001 $0.00224

Measured 5d ago against content hash c68052746892, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

lm-studio scanned grade A with 1 finding 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(
skills/lm-studio/SKILL.md · 295 lines

How it starts

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

LM Studio - Complete Local AI Model Control

You have FULL control over LM Studio from this chat. You can search, download, load, configure, and use local AI models — all through the SDK.

When to Use

Use this skill when the user wants to connect Portable Hermes to LM Studio or discover, download, load, unload, inspect, or run a local model.

LM Studio must be running for any of this to work. If it's not running, tell the user: "Please start LM Studio first."

Self-Switching

You can change your own model — see SOUL.md "Self-Model Switching" section for the full workflow.


COMPLETE SDK REFERENCE (use via terminal tool with python -c "...")

Check if LM Studio is Running

import httpx
try:
    r = httpx.get("http://localhost:1234/v1/models", timeout=3)
    print("Running" if r.status_code == 200 else "Not responding")
except:
    print("NOT RUNNING - tell user to start LM Studio")

Connect SDK Client

import lmstudio
client = lmstudio.Client()  # Auto-discovers LM Studio

MODEL DISCOVERY

List Downloaded Models (already on disk)

import lmstudio
client = lmstudio.Client()
for m in client.llm.list_downloaded():
    print(f"  {m.model_key} ({m.path})")

List Currently Loaded Models (in GPU memory)

import lmstudio
client = lmstudio.Client()
for m in client.llm.list_loaded():
    info = m.get_info()
    ctx = m.get_context_length()
    config = m.get_load_config()
    print(f"  {info} - context: {ctx}")

Search HuggingFace for New Models to Download

import lmstudio
client = lmstudio.Client()
results = client.repository.search_models("llama 3.1 8b", limit=5)
for model in results:
    print(f"  {model.search_result}")
    # Get available quantizations (Q4_K_M, Q8_0, etc.)
    options = model.get_download_options()
    for opt in options:
        print(f"    -> {opt.info}")

Download a Model from HuggingFace

import lmstudio
client = lmstudio.Client()
results = client.repository.search_models("phi-4", limit=1)
if results:
    options = results[0].get_download_options()
    if options:
        # Download the first quantization option
        print(f"Downloading: {options[0].info}")
        options[0].download()  # Downloads to LM Studio's model directory
        print("Download complete!")

Read the full file on GitHub · 295 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. 5d ago First seen · 295 lines · 13 tokens per session scan A c68052746892

Subscribe to this mod's changes

lm-studio is a skill published in the GitHub repository aivrar/portable-hermes-agent (217 stars, last pushed yesterday), licensed MIT. It adds 13 tokens to every session and 2,243 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

rag-index-decisions

After making a non-obvious architectural decision, solving a novel bug, agreeing on a coding standard, or reaching a conclusion worth remembering, index it back into the knowledge base so the next occurrence is one search away. Uses adddocument or addfromurl. Closes the feedback loop that makes a RAG-backed team…

lyonzin/knowledge-rag · 72 tokens

rag-cite-sources

Every technical claim drawn from the local corpus must ship with a source citation formatted as path:line or path:section. Trigger whenever the response quotes, paraphrases, or acts on knowledge that came from a searchknowledge or getdocument call. Makes answers auditable and lets the user jump to source in one click.

lyonzin/knowledge-rag · 70 tokens

rag-web-fallback

Only reach for external web search when the local corpus comes back empty or clearly insufficient. Forces the agent to try knowledge-rag first, then explicitly document why it needed to escalate. Prevents wasted API cost, latency, and (in air-gapped deployments) accidental network calls.

lyonzin/knowledge-rag · 61 tokens

library-rag

Semantic search over a personal library using Nemotron-3-Embed-1B embeddings + sqlite-vec. Index books, documents, any text corpus; query by meaning. Includes EPUB→Markdown conversion and MCP server for auto-available search tools.

moonlight-lupin/agent-skills · 54 tokens

proxy-local-ai-subscriptions

A guide for exposing your local Codex, ChatGPT Codex, or Claude Code subscription through a protected local OpenAI-compatible endpoint, then connecting it to NextClaw as a custom provider.

Peiiii/nextclaw · 126 tokens

portable-rag-per-skill

Pattern for standalone RAG indexes that live inside a skill directory — portable, no external DB or MCP dependency.

moonlight-lupin/agent-skills · 29 tokens