← ClaudeAtlas

lh-llm-integrationlisted

Building reliable product features on LLMs: RAG, prompting-as-code, output validation, evals, and cost/latency engineering. Trigger: load when integrating an LLM into a product — chat, extraction, RAG, agents, or any "add AI to this" request.
jrodrigopuca/local-agents · ★ 2 · AI & Automation · score 72
Install: claude install-skill jrodrigopuca/local-agents
## Critical Patterns ### 1. Treat the LLM as an unreliable external dependency It's a network call to a probabilistic service that can be slow, wrong, malformed, or down. Engineer accordingly: constrain the output at generation when the API offers it (structured outputs, a schema the model must satisfy) and validate it anyway before trusting it — an LLM promising JSON is not JSON until parsed; handle timeouts and failures gracefully; and never let its raw output reach a dangerous sink (a database, a shell, the DOM, a tool call) unchecked. Everything the model READS is input from whoever wrote it — a document, a ticket, a web page, a tool result — and instructions hidden in that input are the attack ([security/lh-threat-modeling](../../../security/skills/lh-threat-modeling/SKILL.md) maps it; [lh-code-audit](../../../security/skills/lh-code-audit/SKILL.md) hunts it). Data is never promoted to instructions, whatever it says. "The model usually returns the right format" is a production incident scheduled for later. ### 2. Prompts are code — versioned, reviewed, tested A prompt is program logic expressed in English; treat it like source: in version control (not pasted in a dashboard), reviewed, and changed deliberately because a wording tweak can shift behavior across all users. "Prompt engineering" by editing production text and eyeballing a few outputs is how you ship a regression to everyone. Structure prompts for maintainability: clear instructions, examples where they ear