llm-patterns

Build LLM workflows with typed clients, schema validation, and versioned prompts.

Updated Jun 19, 2026
One-click install
npx skills add https://github.com/lciacci/tessera --skill llm-patterns-lciacci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-patterns
Source: https://github.com/lciacci/tessera/tree/main/skills/llm-patterns
Command: npx skills add https://github.com/lciacci/tessera --skill llm-patterns-lciacci

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers build dependable AI-first applications without putting business logic, validation, testing, and operational safeguards entirely inside prompts or live LLM calls.

Core Features & Use Cases

  • Typed LLM Integration: Structure model clients with schema validation, typed responses, configurable models, and token limits.
  • Prompt Management: Organize reusable prompt templates, version prompt changes, and separate LLM reasoning from application plumbing.
  • LLM Testing and Evaluation: Use mocks and fixtures for deterministic tests, plus scheduled evaluation suites for measuring model accuracy.
  • Operational Tracking: Monitor token usage, latency, model selection, and estimated costs while designing fallbacks for failures.
  • Use Case: Build a support-ticket classifier that returns validated categories and confidence scores, tests reliably with mocked responses, and measures production-quality accuracy through scheduled evaluations.

Quick Start

Use the llm-patterns skill to design a typed LLM client, versioned prompt templates, schema validation, deterministic tests, and a nightly evaluation workflow for my application.

Frequently Asked Questions about llm-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate LLM outputs for a TypeScript application?

Validate LLM outputs by structuring model clients with schema validation and typed responses. This separates LLM reasoning from application plumbing, ensuring your LLM outputs conform to expected data structures before processing.

What is the best way to test prompt engineering workflows deterministically?

Test prompt engineering workflows deterministically by using mocks and fixtures for LLM responses. This allows reliable testing of classification and extraction logic without relying on live model calls or unpredictable network latency.

How do I track token usage and latency costs in LLM applications?

Track token usage, model selection, latency, and estimated costs by implementing operational monitoring within your LLM application workflows. This enables continuous visibility into API consumption and operational expenses.

Can I version prompt changes separately from my application code?

Yes, prompt management patterns allow you to organize reusable prompt templates and version prompt changes separately. This isolates LLM reasoning iterations from your core application logic and plumbing.

How do I measure LLM model accuracy in production scenarios?

Measure LLM model accuracy by running scheduled evaluation suites. These nightly workflows test live model responses against expected outcomes to continuously evaluate production-quality accuracy for tasks like summarization and decision-making.

How do I design fallbacks for LLM API failures?

Design fallbacks for LLM API failures by building failure fallback mechanisms into your application workflows. This ensures your AI-first application maintains dependability even when live LLM calls experience errors or timeouts.