/sota-skills:sota-llm-engineeringfrom SOTA Engineering Skills
Provides build and audit rules for LLM-powered features: evals, RAG, agents, structured output, prompt engineering, model selection, and observability. Activates on LLM-related work.
Ships in SOTA Engineering Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
One skill, two modes. The rules/ files define the baseline for
engineering LLM-powered software that is measured, grounded, bounded, and
observable. In BUILD mode you write LLM features that conform to the
rules by default. In AUDIT mode you hunt for violations and report them as
severity-rated findings. The rules are the single source of truth for both.
Framing: an LLM call is a non-deterministic, expensive, latency-heavy RPC to a dependency that changes underneath you. Everything here follows from that — you don't ship logic you can't measure (evals), you don't trust output you didn't validate (structured output, grounding), you don't run loops you can't stop (budgets), and you don't deploy what you can't trace (observability).
Scope boundary: this skill owns build quality. Prompt injection, the
lethal trifecta, tool-call authorization, and model-output-as-untrusted-data
live in sota-code-security rules/08; agent sandboxing/isolation lives in
sota-sandboxing rules/05; PII/regulatory handling lives in
sota-privacy-compliance. Reference them; don't re-derive them.
Freshness rule: model names, prices, context limits, and spec revisions in
these files were verified as of the library's last full sweep (the root LAST-VERIFIED
stamp; a section may carry a later date) and rot fast. When a decision hinges on a
specific model/price/limit, re-verify against provider docs (or the project's
claude-api-style reference skill) before encoding it. Write code
version-agnostically: model IDs and parameters in config, never inline.
LLMENG: comment stating the residual risk.Coverage: every rules/ file's Audit checklist applies in AUDIT mode. Mark one not applicable only with its reason in the report — never skip a file because the thing it checks for is absent, since that absence may be the finding.
Process:
messages.create,
responses.create, chat.completions, interactions.create,
generateContent/generate_content, invoke, raw https://api.),
prompt templates, retrieval pipelines, agent loops, eval suites (or their
absence), and the config/env that selects models.max_tokens/iteration cap, no timeout, no
fallback, no trace of prompt/completion/tokens, no schema on extraction,
no retrieval metrics, judge never validated against humans.stop_reason, confirm the "eval" actually gates merges rather
than decorating a dashboard.| Severity | Criteria | Examples |
|---|---|---|
| Critical | User-facing wrongness or unbounded damage with no detection/limit: consequential output (money, health, legal, code-exec) shipped with no eval and no human gate; agent loop with no iteration/cost cap; auto-upgraded model with no regression gate; prompt/completion logs leaking secrets or PII wholesale | while True: tool loop, no budget; prod extraction parsed with regex from free text feeding payments; model="latest" with zero evals |
| High | Silent quality/cost failure likely in normal operation: no eval suite on a shipped LLM feature; parse-and-pray JSON (no schema/validation); RAG with no retrieval eval or no grounding; judge-as-metric never validated; no retry/backoff/fallback on a user-facing path; cache-busting prompt structure tripling spend | json.loads(response.text) with no repair/reject path; timestamp interpolated at top of system prompt; recall@k never measured |
| Medium | Degraded quality/efficiency or weakened safeguards: golden set <20 cases or stale; eval not in CI; no pairwise/error analysis discipline; missing stop_reason handling; unpinned embedding model version; few-shot examples contradicting instructions; no streaming on long user-facing outputs | Eval exists but only run manually; chunking by fixed chars across tables; temperature/params copy-pasted without rationale |
| Low | Hygiene/debt: prompts unversioned outside repo; no token-count telemetry; missing batch API on offline workloads; verbose few-shot inflating cost; TODO repair loops | Prompt edited in a dashboard, not git; offline summarizer paying real-time prices |
Adjust one band up/down for context: consequential domain (↑), internal prototype behind a flag (↓), volume/blast radius (↑ at scale), compensating human review (↓).
[SEVERITY] <title>
File: <path>:<line>
Rule: rules/<NN> §<section>
Failure scenario: <what concretely goes wrong, for whom, at what scale/cost>
Evidence: <code/config/trace anchoring the claim>
Fix: <specific change, referencing the rules/ pattern>
Order Critical→Low; lead with an executive summary (counts, worst finding, systemic themes — "no evals anywhere" is one systemic finding, not twenty).
| File | Topics | Read this when... |
|---|---|---|
| rules/01-evals.md | Eval-first development, golden sets, assertion/rubric/pairwise evals, LLM-as-judge + judge validation, offline vs online, CI regression gates, production sampling into eval sets, error analysis, metric pitfalls (judge bias, contamination, an arm blind to the treatment — its +0.00 is structural, not a result, and a saturated measure — both arms at the ceiling is a fact about the instrument, never about the system, and two runs compared case by case, transitions counted each way, never a difference of totals) | ...building ANY LLM feature (start here), changing a prompt/model, reviewing whether quality claims are real, setting up CI for an LLM repo |
| rules/02-prompt-context-engineering.md | System prompt structure, instruction placement, self-contained prompts (inline schemas vs. out-of-context references that degrade to fabrication), few-shot selection, context budget management, caching-aware prefix design, prompt versioning/testing, injection-safe template interpolation, structured output (schema/tool-based) + validation/repair, whole-document rejection as a recall control (salvage the valid remainder and record the drop) and the constant column that means the reader names a key the model never emits, prompt rot | ...writing or editing prompts/templates, extraction or classification features, diagnosing cost spikes or cache misses, anything that parses model output |
| rules/03-rag-retrieval.md | RAG vs long context vs fine-tuning, chunking strategies, embedding selection & versioning, hybrid retrieval (dense+lexical+rerank), query transformation, retrieval evals (recall@k, golden retrieval sets), grounding & citation, freshness/invalidation, index integrity (write-once security metadata, outlier quarantine, expiry filters), poisoning-resistant result shaping, agentic retrieval | ...building search/Q&A over documents, choosing a vector DB/embedding model, "the answers are wrong/stale", evaluating an existing RAG pipeline |
| rules/04-agents-tools.md | Workflow vs agent decision, tool design (descriptions, scope, idempotency, model-actionable errors), context management across turns (compaction, memory), MCP integration & spec status, multi-agent costs, human-in-the-loop gates, stopping conditions & budgets | ...anything with tool calls or loops, designing tool schemas, MCP servers/clients, multi-agent proposals, runaway-cost or stuck-agent debugging |
| rules/05-production-engineering.md | Model selection & routing, capability tiers, fallbacks, provider abstraction caution, latency (streaming, parallel calls, caching), cost engineering (budgets, batch APIs, right-sizing), 429/529 + jittered backoff, LLM observability (trace every call), graceful degradation and an inference kill switch, versioning & rollout (shadow, A/B, pinning vs auto-upgrade), generated-media provenance (C2PA) and likeness consent | ...shipping to production, picking models, cost/latency complaints, retry/fallback design, rollout of a new model or prompt, building dashboards |
| rules/06-data-lifecycle.md | Fine-tune vs prompt vs RAG decision, dataset curation hygiene, training-side safety (content filtering, reward hacking, feedback poisoning, label logs), feedback loops (thumbs → eval sets), embedding/index migration, PII in prompts/logs, provider data-retention settings | ...someone proposes fine-tuning, designing feedback capture, migrating embedding models, setting up logging/retention for an LLM app |
| rules/07-code-generation-evals.md | Scoring generated code: the harness as a target (candidate code attacks the grader — a nine-line conftest.py), unbiased pass@k from n ≥ k samples, visible vs held-out suites and suite validation, oracles and bounded equivalence checks, reward hacking of the grader as a hard zero, correct-and-unexploitable security scoring, dependency and API resolution before the run, deterministic constraint checks over judges, mergeability and harness effects in agentic runs, contamination controls, paired intervals and no weighted composite | ...building or auditing a harness that scores code from a model or agent, comparing models/prompts/scaffolds on coding tasks, reading a coding-benchmark claim |
Violations are findings regardless of context; in BUILD mode they are never acceptable shortcuts:
retry-after inside a retry budget, idempotency on retried writes, a degradation
path when the provider is down. (rules/05)rules/01-evals.md (opens in a new tab)rules/02-prompt-context-engineering.md (opens in a new tab)rules/03-rag-retrieval.md (opens in a new tab)rules/04-agents-tools.md (opens in a new tab)rules/05-production-engineering.md (opens in a new tab)rules/06-data-lifecycle.md (opens in a new tab)rules/07-code-generation-evals.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
OpenAI, Anthropic, Langchain, LlamaIndex, Hugging Face, Ollama, PyTorch, TensorFlow
llm-engineering, rag, agents, evals, prompt-engineering, structured-output
2 plugins ship this exact skill · first indexed Nov 26, 2026
43 skills in this plugin
/sotaMaster router for the SOTA engineering skills library. Use this skill whenever the user asks to build, design, implement, refactor, harden, optimize, review, or audit an application, service, or codebase and the request spans more than one domain — or when you are unsure which specific sota-* skill applies. Also use when working on a codebase you do not own: reviewing a pull request or diff, responding to code review, evaluating someone else's patch, or preparing an upstream contribution — including mid-session, once you are already reading source, a diff, or CI config. It maps the task (build or audit mode) to the right domain and language skills (Rust, Go, C/C++, JVM, Python, JS/TS, .NET/C#, PHP, Ruby, Swift). Trigger keywords: SOTA, best practices, audit my code, security review, compliance, hardening, prod readiness, code quality, pull request, PR review, review comment, maintainer feedback, patch, diff, upstream, contribute, merge request./sota-api-designState-of-the-art API design and audit guidance (2026) covering REST/HTTP, GraphQL, gRPC, WebSockets/SSE/realtime, webhooks, versioning/evolution, and API security/operations. Use when designing or building any API surface (endpoints, schemas, protos, realtime channels, webhook senders/receivers) AND when auditing/reviewing existing APIs for correctness, evolvability, security, and operational robustness. Not for browser UI, rendering, or client-framework concerns — use sota-web-frameworks or sota-frontend-design. Trigger keywords: API, REST, GraphQL, gRPC, endpoint, websocket, SSE, realtime, WebRTC, webhook, versioning, OpenAPI, pagination, idempotency, rate limit, problem+json, protobuf, deprecation.npx claudepluginhub martinholovsky/sota-skills --plugin sota-skillsOther plugins' skills for the same job