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 skills add kouroshez/coding-os --skill llm-patternsgit clone --depth 1 https://github.com/kouroshez/coding-osWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kouroshez/coding-os/llm-patterns)<a href="https://agentmods.dev/skills/kouroshez/coding-os/llm-patterns"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/llm-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kouroshez/coding-os/llm-patterns"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/llm-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00135 | $0.04160 |
| Opus 5.5 | $0.00054 | $0.01664 |
| Sonnet 5.5 | $0.00027 | $0.00832 |
| Haiku 4.5 | $0.00014 | $0.00416 |
Grade B, and why
llm-patterns scanned grade B with 1 finding 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 1mo 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.
Instruction-override phrasingmediumPrompt injection
Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.
The model knows to treat `<article>` as the document and `<question>` as the instruction. Crucially this also defends against **prompt injection** (a malicious article saying "ignore previous instructions and …" is conta Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 411 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LLM Patterns — Production-Grade AI Features
A practical playbook for shipping LLM-powered features that work reliably, cost-controllably, and don't hallucinate on critical paths. Provider-neutral; references Anthropic Claude Opus 4.7 / Sonnet 4.6 / Haiku 4.5 (2026 generation) and OpenAI as anchors.
When to Use This Skill
- Designing a new LLM-powered feature (chat, summarization, classification, extraction, code-gen).
- Building a RAG (Retrieval-Augmented Generation) system.
- Writing an evaluation harness for an LLM feature.
- Adding guardrails / safety / hallucination mitigation.
- Choosing between provider / model tier / fine-tuning / prompt-only.
- Designing an agentic loop (tool use, multi-turn planning).
- Cost-optimizing a working LLM feature.
Skip when: implementing pure deterministic logic. Use this only when LLM truly outperforms rules-based code on the task.
The Eight Layer Stack
Application ← UI, UX, error handling
─────────────────────────────
Orchestration ← Tool loop, multi-step, retries
─────────────────────────────
Guardrails ← Input validation, output filtering
─────────────────────────────
Retrieval (RAG) ← Context fetching from KB
─────────────────────────────
Prompt construction ← System + context + question
─────────────────────────────
Provider SDK ← anthropic, openai, etc.
─────────────────────────────
Eval + Telemetry ← Quality + cost + latency monitoring
─────────────────────────────
Model ← Opus / Sonnet / Haiku / GPT-4o / etc.
Skipping any layer creates a failure mode. Skipping eval is the most common skip — and the most expensive.
Provider + Model Selection (2026 baseline)
| Need | Default | Why |
|---|---|---|
| Complex reasoning, code architecture, long horizons | claude-opus-4-8 |
Best reasoning, 1M context, most expensive |
| Production default — chat, summaries, code edits | claude-sonnet-4-6 |
Strong reasoning, ~5× cheaper than Opus, 200K context |
| Cheap, fast classification / extraction / heuristics | claude-haiku-4-5-20251001 |
Fast, cheap; fine for narrow tasks |
| Multi-modal vision (charts, screenshots, OCR) | claude-sonnet-4-6 or gpt-4o |
Both vision-capable in 2026 |
| Embeddings | text-embedding-3-large (OpenAI) / voyage-3-large (Voyage) |
Anthropic doesn't ship embedding models — pair with one |
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago First seen · 411 lines · 135 tokens per session scan B 2882a5494987
llm-patterns is a skill published in the GitHub repository kouroshez/coding-os (7 stars, last pushed yesterday), licensed Apache-2.0. It adds 135 tokens to every session and 4,160 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it B with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
ontology-constraint-and-knowledge-injection
A method for deciding how an ontology’s knowledge should reach an AI model: directly in its instructions, through RAG, or through fine-tuning. RAG retrieves relevant information at answer time; fine-tuning changes the model using training examples.
dspy
DSPy: declarative LM programs, auto-optimize prompts, RAG.
ai-engineering-toolkit
Overview of six AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching.
llm-app-patterns
Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.
graphify
Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community…
llm-ops
LLM Operations -- RAG, embeddings, vector databases, fine-tuning, prompt engineering avancado, custos de LLM, evals de qualidade e arquiteturas de IA para producao.