llm4s-scala

Provide a type-safe LLM interface for Scala pipelines with ZIO, Cats Effect, and FS2.

6|1|Updated Nov 29, 2025
One-click install
npx skills add https://github.com/manutej/categorical-meta-prompting --skill llm4s-scala
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm4s-scala
Source: https://github.com/manutej/categorical-meta-prompting/tree/main/.claude/skills/llm4s-scala
Command: npx skills add https://github.com/manutej/categorical-meta-prompting --skill llm4s-scala

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a type-safe LLM interface for building scalable, composable AI pipelines in Scala, enabling reliable integration with functional effect systems.

Core Features & Use Cases

  • Type-safe LLM client and JSON codecs for structured output.
  • Effectful pipelines with ZIO, Cats Effect, and FS2 for streaming data.
  • OpenAI / LLM integration with a modular, testable architecture for prompt orchestration.

Quick Start

Create a small Scala project with ZIO and Cats Effect, implement a minimal OpenAIClient, and run a simple pipeline to validate the type-safe LLM flow.

Frequently Asked Questions about llm4s-scala

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

FAQPage Schema
How do I build type-safe LLM pipelines in Scala?

You build type-safe LLM pipelines in Scala by using typed data models and JSON codecs for structured output, integrated with functional effect systems for deterministic prompt orchestration. This approach enforces compile-time safety and testable AI workflows.

How do I get structured JSON output from LLMs in Scala?

You get structured JSON output from LLMs in Scala by applying JSON codecs to enforce typed data models within your LLM client. This validates and parses LLM responses directly into safe Scala types.

Does this approach work with ZIO and Cats Effect for streaming data?

Yes, this approach works with ZIO and Cats Effect by building effectful pipelines that integrate with FS2 for streaming data. This enables robust, functional error handling within streaming LLM pipelines.

What is the best way to manage LLM prompts in a functional programming environment?

The best way to manage LLM prompts in a functional programming environment is through modular, testable prompt orchestration using functional effect systems. This enforces safety and composability through typed data models and functional error handling.

Do I need ZIO or Cats Effect to use type-safe LLM pipelines?

You need ZIO or Cats Effect to manage the effectful pipelines and streaming data for type-safe LLM pipelines in Scala. A minimal project setup with these functional effect systems is required to run the prompt orchestration flow.

Why should I use functional error handling for LLM integration?

You should use functional error handling for LLM integration to ensure deterministic, testable prompt orchestration within streaming pipelines. It enforces safety and composability by managing failures through typed data models and effect systems.