Skip to content
Back to skills

Local Llm Bridge

ASecurity

Local Gemma 4 12B sub-agent. Routes bounded tasks directly to the optimized llama-server at localhost:8089 — no routing proxy, no cloud API, 2–5s typical response. Use for fast, private, cost-free subtask delegation from any cloud primary agent. Part of the run_agent.py multi-LLM task router — cli=llama target.

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentspythonbashapisecurityperformance

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumUses curl or wget to download content

Pro scans all 10 files and shows the line behind each finding

Scanned October 3, 2026

npx -y skills add richfrem/agent-plugins-skills --skill local-llm-bridge --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Local Llm Bridge?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Local Llm Bridge
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-local-llm-bridge/badge)](https://www.skillsdirectory.com/skills/richfrem-local-llm-bridge)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: local-llm-bridge
plugin: cli-agents
description: >
  Local Gemma 4 12B sub-agent. Routes bounded tasks directly to the optimized llama-server
  at localhost:8089 — no routing proxy, no cloud API, 2–5s typical response.
  Use for fast, private, cost-free subtask delegation from any cloud primary agent.
  Part of the run_agent.py multi-LLM task router — cli=llama target.
allowed-tools: Bash, Read, Write
---

# Local LLM Bridge (`local-llm-bridge`)

Dispatches bounded tasks directly to local Gemma 4 12B via llama-server at localhost:8089.

## Contents

- [Constraints](#constraints)
- [Quick start](#quick-start)
- [Workflow](#workflow)
- [Verification](#verification)
- [Persona Registry](#-persona-registry-agents)
- [References](#references)

## Constraints

- **Server active**: Requires `llama-server` on port 8089 (`curl -s http://localhost:8089/health`).
- **Prompt budget**: Keep prompts lean (<2,000 tokens) and instructions specific; default `max_tokens=120`.
- **Sub-agent isolation**: Instruct local agent not to use tools or access filesystem. Fast, private delegation (Mode B).

## Quick start

```bash
python3 scripts/run_agent.py agents/refactor-expert.md target.py review.md "List top 3 issues concisely." --cli llama
```

## Workflow

1. **Health Check**: Confirm local llama-server is healthy (`curl -s http://localhost:8089/health`).
2. **Select Persona**: Choose from `agents/security-auditor.md`, `agents/refactor-expert.md`, or `agents/architect-review.md`.
3. **Dispatch**: Run `scripts/run_agent.py` with `--cli llama` and bounded tokens.
4. **Inspect**: Verify the output file contains the completed response.

## Verification

```bash
curl -s http://localhost:8089/health
python3 scripts/run_agent.py /dev/null /dev/null /tmp/test.md "Say hello in one word." --cli llama
cat /tmp/test.md
```

## 🎭 Persona Registry (`agents/`)

These personas are mirrored across CLI agent dispatchers to ensure consistent analytical behavior across the ecosystem.

| Persona | Use For |
|:---|:---|
| `security-auditor.md` | Red team, vulnerability scanning, threat modeling |
| `refactor-expert.md` | Optimizing code for readability, performance, and DRY |
| `architect-review.md` | Assessing system design, modularity, and complexity |

### 🧩 Force Agent Behavior

Always add these instructions to your dispatch prompt to prevent the sub-agent from attempting to use external tools:
> "You are operating as an isolated sub-agent. Do NOT use tools. Do NOT access filesystem. Only use the provided input."

### 🛠️ Orchestration Pattern: `run_agent.py` (Cross-Platform)

For reusable sub-agent execution, use the provided Python orchestrator which handles temp file assembly and prompt concatenation reliably across Windows, macOS, and Linux:

```bash
python ./scripts/run_agent.py <PERSONA_FILE> <INPUT_FILE> <OUTPUT_FILE> "<INSTRUCTION>"
```

## References

- [acceptance-criteria.md](references/acceptance-criteria.md) — Acceptance criteria for local LLM bridge delegation.
- [cheapest_models.md](references/cheapest_models.md) — Local inference latency and token pricing comparison.

Files in this skill

  • SKILL.md4.3 KB
  • evals/evals.json614 B
  • evals/results.tsv34 B
  • references/acceptance-criteria.md42 B
  • references/cheapest_models.json40 B
  • references/cheapest_models.md38 B
  • scripts/kv_cache_orchestrator.py41 B
  • scripts/run_agent.py29 B
  • scripts/run_server.py30 B
  • scripts/test_run_agent.py34 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.