local-llm

local-llm is a skill for Claude Code, Codex from coco-research/coco. It costs 58 tokens per session (7,291 once invoked), scanned A, original, Apache-2.0.

Guidance for working with language models running on your own machine through LM Studio and mlx-dspark. It covers the local model service, its context limit, and its response behaviour.

In plain words
What is it for?
Use it to check the local model setup, change the context window, investigate hangs, or connect a script to the local inference endpoint.
Why use it?
It helps diagnose stalled requests and make informed trade-offs between available memory, context size, and speed.

Skill for Claude CodeCodex

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

Good fit Use it to check the local model setup, change the context window, investigate hangs, or connect a script to the local inference endpoint.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/coco-research/coco/local-llm
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 coco-research/coco --skill local-llm
Clone the repo
git clone --depth 1 https://github.com/coco-research/coco

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 local-llm

README.md
[![agentmods](https://agentmods.dev/badge/skills/coco-research/coco/local-llm/github.svg)](https://agentmods.dev/skills/coco-research/coco/local-llm)
Your own site
<a href="https://agentmods.dev/skills/coco-research/coco/local-llm"><img src="https://agentmods.dev/badge/skills/coco-research/coco/local-llm/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 local-llm

Your own site · 80×15
<a href="https://agentmods.dev/skills/coco-research/coco/local-llm"><img src="https://agentmods.dev/badge/skills/coco-research/coco/local-llm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,291 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.
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.00058 $0.07291
Opus 5.5 $0.00023 $0.02916
Sonnet 5.5 $0.00012 $0.01458
Haiku 4.5 $0.00006 $0.00729

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

Security

Grade A, and why

local-llm 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 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

(a one-off script, a curl command, etc.), you don't get this retry for free --
skills/local-llm/SKILL.md · 417 lines

How it starts

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

Local LLM Setup (LM Studio + mlx-dspark)

Announce at start

"I'm using the local-llm skill to work with the local inference setup."

Architecture

Two local LLM backends exist on this machine, serving the same underlying model family (Qwen3.8-27B, 4-bit, hybrid attention -- see RAM cheatsheet below):

Backend Port Role Managed by
LM Studio 1234 Interactive chat UI use only LM Studio app itself (own TTL-based auto-unload)
mlx-dspark 8090 Production -- everything build_local.py and any script under systems/superintelligence/* talks to launchd (~/Library/LaunchAgents/com.local.mlx-dspark.plist)

build_local.py (all 6 copies under systems/superintelligence/{data-analytics, finance,gtm,risk-compliance,strategy,trading}/scripts/) talks only to mlx-dspark. LM Studio is not in that pipeline's path at all -- it exists purely for manual/interactive use. Do not assume both are always loaded; see "Idle-unload" below.

Config lives outside the repo (never committed, never touched by git):

  • ~/.config/mlx-dspark/start.sh -- the server launch command (model, mode, context window, batch size, host/port, API key).
  • ~/.config/mlx-dspark/api_key -- 0600-perms API key file. build_local.py reads MLX_DSPARK_API_KEY env var first, falls back to this file.
  • ~/.config/mlx-dspark/idle_watcher.py -- the idle-unload poller (see below).
  • ~/Library/LaunchAgents/com.local.mlx-dspark.plist -- the server's LaunchAgent (RunAtLoad + KeepAlive(Crashed) -- verified to auto-restart on a crash).
  • ~/Library/LaunchAgents/com.local.mlx-dspark-idle-watcher.plist -- the watcher's own LaunchAgent (same pattern, negligible RAM, just a polling loop).

The prefill trick (why this matters)

Both LM Studio and mlx-dspark, when hit via /v1/chat/completions, silently ignore every attempt to suppress reasoning for this model (reasoning.effort, top-level reasoning, camelCase variants, chat_template_kwargs, and even a persisted per-model load config -- all tried, none worked). The model just burns its entire max_tokens budget "thinking" and the caller sees total silence until a timeout fires. This was the original "thinks then dies after 5 minutes" bug report.

Read the full file on GitHub · 417 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 Changed · +8 lines d8283abefa65
  2. 2mo ago First seen · 409 lines · 58 tokens per session scan A 074950671e19

Subscribe to this mod's changes

local-llm is a skill published in the GitHub repository coco-research/coco (323 stars, last pushed yesterday), licensed Apache-2.0. It adds 58 tokens to every session and 7,291 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

local-llm compared with skills from other repositories

local-llm next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
local-llmcoco-research/cocoSkill323yesterdayApache-2.0A58Claude Code, Codex
pageindexmarcusquinn/aidevopsSkill476todayMITA15Claude Code
infrastructure-llmdocxology/templateSkill25todayApache-2.0A66Claude Code, Codex
infrastructure-search-moniddocxology/templateSkill25todayApache-2.0A124Claude Code, Codex
template-autoresearch-projectdocxology/templateSkill25todayApache-2.0A30Claude Code, Codex
bioinformatics-scientistwonsukchoi/domain-expertsSkill30todayMITA168Claude Code, Codex
ai-researcherK-Dense-AI/scientific-agentsSkill2651mo agoMITA111Claude Code