Use when starting a new project with llmring, building an application using LLMs, making basic chat completions, or sending messages to OpenAI, Anthropic, Google, or Ollama - covers lockfile creation (MANDATORY first step), semantic alias usage, unified interface for all providers with consistent message structure and response handling
Detected risks:
The `chat` skill provides a unified interface for interacting with multiple large language model (LLM) providers, including OpenAI, Anthropic, Google, and Ollama. It simplifies the process of building chat-based applications by handling message formatting, response management, and resource cleanup. By centralizing provider interactions, it ensures consistent request and response structures while abstracting away provider-specific complexities. The skill also emphasizes best practices such as mandatory lockfile creation and semantic alias usage to streamline model management and maintain compatibility across evolving model names.
Key features include the `LLMRing` service class for managing providers, `LLMRequest` for configuring requests, `LLMResponse` for standardizing responses, and `Message` for defining conversation roles. It supports context managers for automatic resource cleanup, customizable timeouts for handling long or expensive tasks, and environment-based defaults for provider timeouts. The skill also provides CLI commands for initializing lockfiles, listing available models, binding semantic aliases, and interactive configuration, ensuring users can quickly integrate LLMs into their applications with minimal friction.
This skill is ideal for developers and researchers building chat applications, automated summarizers, or any system that requires programmatic access to multiple LLM providers. It is especially useful for teams needing a consistent, maintainable interface for LLM interactions, as well as those who want to manage provider updates safely using lockfiles and aliases. By providing an easy-to-use and robust framework, it reduces the overhead of integrating different LLM APIs and allows users to focus on application logic rather than provider-specific details.
Begin by installing llmring via uv or pip, then create a lockfile using `llmring lock init`. After listing available models and binding semantic aliases, you can use the provided API classes (`LLMRing`, `LLMRequest`, `Message`) to send chat requests in your code.
The chat skill supports OpenAI, Anthropic, Google Gemini, and Ollama. You need to install the corresponding provider SDKs to use them.
Yes, the default timeout is 60 seconds, but you can override it in the `LLMRing` context manager per request or by setting the `LLMRING_PROVIDER_TIMEOUT_S` environment variable.
No, the bundled lockfile is only for running `llmring lock chat`. Real applications must create their own lockfile to ensure proper alias binding and compatibility with current model names.
Yes, using the context manager for `LLMRing` ensures automatic resource cleanup after requests complete, simplifying resource management.
Quick Setup:
.claude/skills/Repository
juanre/llmring