# local-llm-router

local-llm-router routes coding prompts to local language models inside air-gapped setups. Employs Serena MCP for codebase context without cloud access.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 301 repo stars
- Author: hoodini
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/hoodini/ai-agents-skills/tree/HEAD/skills/local-llm-router/SKILL.md
- Updated: 2026-10-23
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/local-llm-router

## What it does

This skill directs programming tasks to local runtimes such as Ollama, LM Studio, or Jan. Before passing prompts to any neural network, it invokes Serena MCP. The server inspects code structure via LSP primitives, extracting symbol definitions and references instead of dumping raw file trees.

The routine classifies incoming tasks into code generation, reasoning, analysis, or documentation. It scans local endpoints (`11434`, `1234`, or `1337`), selects the relevant model, and executes the request offline.

Without an active Serena MCP instance and at least one local server running, the router fails immediately. The entire workflow stays strictly on your machine.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add hoodini/ai-agents-skills --skill local-llm-router -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/local-llm-router/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/local-llm-router/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add hoodini/ai-agents-skills --skill local-llm-router -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/local-llm-router/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add hoodini/ai-agents-skills --skill local-llm-router -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/local-llm-router/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install hoodini/ai-agents-skills skills/local-llm-router
```

2. **Manually: put the files in place**
- File: `.github/skills/local-llm-router/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add hoodini/ai-agents-skills --skill local-llm-router -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/hoodini/ai-agents-skills --path skills/local-llm-router
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/local-llm-router/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/hoodini/ai-agents-skills/tree/HEAD/skills/local-llm-router/SKILL.md

## When to use it
- write code with AI assistance inside an air-gapped network
- dispatch requests between Ollama, LM Studio, and Jan
- gather semantic AST context through Serena MCP without string matching

## Example prompts
- Route this refactoring request to local Ollama using Serena context
- Send the call hierarchy analysis to LM Studio
- Generate unit tests for this parser using the active Jan model

## Similar
- [local-llm-ops](https://affpapa.org/en/nevibecode/skills/local-llm-ops.md) — skill · 472 installs
- [openclaude-multi-llm](https://affpapa.org/en/nevibecode/skills/openclaude-multi-llm.md) — skill · 725 installs
- [llm-cli](https://affpapa.org/en/nevibecode/skills/llm-cli.md) — skill · 235 installs
- [llm-integration](https://affpapa.org/en/nevibecode/skills/orchestkit-llm-integration.md) — skill · 218 installs
- [llm-router](https://affpapa.org/en/nevibecode/skills/llm-router.md) — skill · 160 installs
- [local-delegate](https://affpapa.org/en/nevibecode/mcp/local-delegate.md) — MCP server · ★ 8 repo stars

From the same set: [hoodini/ai-agents-skills](https://affpapa.org/en/nevibecode/by/hoodini/ai-agents-skills.md) — 34 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
