TheBenBenJ

Local Agent — Development skill for Claude Code

Development community

Keep large context local.

How to install Local Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open TheBenBenJ/local-agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Local Agent does

Keep large context local. Send Claude only what matters.

Alternatives in Development

README

local-agent

![Keep large context local. Send Claude only what matters.](docs/architecture.jpg)

Give the local runtime the source, not Claude's context window. Local tools and a small local model process large external context before Claude sees it.

Keep large context local. Send Claude only what matters.

Use the cheapest reliable layer that can solve the task. local-agent is a niche but useful context optimization layer for context-heavy AI coding workflows. It does not replace Claude.

Why

Claude Code and Cursor should not do this:

read huge.log
→ send huge.log to a local model

They should do this:

local_task(task="Find the root cause.", sources=["log://var/bench.log"])

The MCP reads the file on disk. Claude receives an evidence packet (locations, hashes, ids), not the raw document. The same rule applies to repositories, screenshots, Jira, and Confluence.

If you already know a symbol name, put it in the mission. If `rg` is enough, use `rg`.

How it works

The figure above is the product: task + source references in, evidence packet out. The router never calls a local LLM to decide which layer to use.

Tier When Local LLM
DIRECT Tiny source, named symbol, OCR/compare, Jira/Confluence fetch 0
REDUCE Large log, test dump, or single bulky file: deterministic high-signal extract Only if the extract is not enough
AGENT Genuinely multi-step or multi-source (screenshot + repo, ticket + repo) Bounded loop, first tool before first LLM
CLAUDE Auth, security, public API, architecture, high-risk change Skip local; keep Claude

DIRECT and REDUCE are the value. AGENT is not the default path. It is reserved for investigations that actually need several steps.

Quick start

git clone https://github.com/TheBenBenJ/local-agent ~/.local-agent
~/.local-agent/install.sh

Requires Python 3.9+ (stdlib only), `ripgrep`, `git`, and an OpenAI-compatible local