LaunchKit · 2026
Back to Skills

local-first-llm

Routes LLM requests to a local model (Ollama, LM Studio, llamafile) before falling back to cloud APIs.

1
318 downloads
by @joelnishanth

Setup & Installation

openclaw skills install @joelnishanth/local-first-llm

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install local-first-llm

What This Skill Does

Routes LLM requests to a local model (Ollama, LM Studio, or llamafile) before falling back to cloud APIs. Routing decisions factor in data sensitivity, prompt complexity, and local provider availability. Token usage and cost savings are logged to a persistent dashboard.

Combines automatic routing logic with cost tracking, so users get privacy and savings benefits without manually deciding which model to use each time.

When to use it

  • Keeping sensitive prompts off cloud APIs
  • Reducing OpenAI API costs on repetitive tasks
  • Summarizing meeting transcripts with a local model
  • Checking how much money local routing has saved this month
  • Automatically routing complex queries to cloud while simple ones stay local

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: summarize this meeting transcript and keep it private

AGENT
  1. 1Run check_local.py to detect available local providers
  2. 2Run route_request.py with the prompt and token estimate; sensitivity check routes to local
  3. 3Send the prompt to Ollama via its local API endpoint
  4. 4Run track_savings.py log to record the token count and routing decision
  5. 5Run dashboard.py to display updated cumulative savings
OUTPUT

Meeting transcript summarized locally; dashboard shows 800 tokens saved and cost avoidance logged

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

Ollama, LM Studio, or llamafile installed and running locally