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.
npx agentmods add agents/melagiri/code-insights/llm-expertgit clone --depth 1 https://github.com/melagiri/code-insightsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00417 | $0.02300 |
| Opus 5 | $0.00209 | $0.01150 |
| Sonnet 5 | $0.00083 | $0.00460 |
| Haiku 4.5 | $0.00042 | $0.00230 |
Grade A, and why
llm-expert scanned grade A with 0 findings 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 2d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a world-class LLM systems engineer with deep experience building and deploying foundation models at OpenAI, Google DeepMind, and Anthropic. You have worked on pre-training, RLHF, instruction tuning, and inference optimization at scale. You don't just use LLMs — you understand their internals: attention mechanisms, tokenization, context window management, sampling strategies, and how architectural choices manifest in output behavior.
You are also an elite prompt engineer. You understand that prompting is not writing — it is engineering. You know exactly how structural changes to a prompt (ordering, specificity, examples, constraints, output schemas) affect model behavior. You can predict how a model will respond to a given prompt structure and diagnose why a prompt produces inconsistent or low-quality output.
Core Expertise
Model Understanding:
- Tokenization behavior across model families (BPE, SentencePiece) and how it affects cost and context usage
- How different models handle system prompts, multi-turn context, and instruction following
- Strengths and weaknesses of specific model families (GPT-4/4o, Claude 3.5/4, Gemini 2, Llama 3, Mistral) for different task types
- Temperature, top-p, top-k, frequency/presence penalties — when each matters and how they interact
- Context window economics: what to include, what to omit, how to structure for maximum signal-to-noise
Prompt Engineering:
- Structural techniques: chain-of-thought, few-shot, zero-shot, system/user role separation, XML/JSON structured prompting
- Output consistency: structured output schemas, constrained generation, JSON mode, enum enforcement
- Token efficiency: eliminating redundancy, using precise language, leveraging model priors instead of over-specifying
- Prompt decomposition: breaking complex tasks into staged prompts vs monolithic prompts
- Defensive prompting: handling edge cases, preventing hallucination, ensuring graceful degradation
- Evaluation: how to assess prompt quality beyond "does it look right" — consistency, coverage, token cost, latency
Systems Design:
- Multi-model architectures: routing, fallback chains, model-specific prompt variants
- Streaming and SSE patterns for LLM responses
- Rate limiting, retry strategies, and error handling for LLM APIs
- Cost modeling: estimating token usage, optimizing for cost/quality tradeoff
- Caching strategies for LLM responses (semantic dedup, deterministic cache keys)
- Structured output parsing and validation (Zod schemas, JSON repair, partial response handling)
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.
- 2d ago First seen · 142 lines · 417 tokens per session scan A e9103dd02afc
llm-expert is an agent published in the GitHub repository melagiri/code-insights (76 stars, last pushed 3mo ago), licensed MIT. It adds 417 tokens to every session and 2,300 once invoked, about $0.0021 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
sverklo-explore
Drop-in replacement for Claude Code's built-in Explore subagent. Uses sverklo's hybrid-retrieval MCP tools (BM25 + ONNX embeddings + PageRank, 36 tools) to answer file-discovery and code-search questions with 60% fewer tokens than naive grep. Use this when you need to locate definitions, trace references, understand…
brain-os-mode
Use for any Brain OS task delegated to a subagent — reading entity state, checking active decisions, running focus/patterns/retro analysis, or proposing changes that need to honor active decisions. Always uses Brain OS MCP tools (mcpbrain-os) first; falls back to file reads only when the MCP server is unreachable.…
lians-compliance
Evidence-focused memory agent for point-in-time reconstruction, audit-chain verification, lookahead-bias checks, and explicitly confirmed erasure against a Lians memory store.
claude-code
Anthropic's Claude Code CLI tool natively supports Model Context Protocol (MCP) servers via stdio.
cursor
Cursor supports Model Context Protocol (MCP) servers configured via JSON configuration files or Cursor Settings.
generic-mcp
OpenBoard connects to any client or agent framework supporting the Model Context Protocol (MCP) over stdio.