Agent skill · Backend & API

llm-provider

Adds a new LLM provider implementing LLMProvider interface with call() and stream() methods. Integrates with provider factory in src/llm/index.ts, config detection in src/llm/config.ts, and error handling via tracking and recovery. Use when adding a new model backend, integrating a third-party LLM API, or extending LLM platform support. Do NOT use for fixing bugs in existing providers, modifying existing provider behavior, or changing the LLMProvider interface.

caliber-ai-orggithub.com/caliber-ai-orgGitHub ↗
claude-codecodexcursorMIT
Install
npx skills add caliber-ai-org/ai-setup --skill llm-provider --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 11 KB
Bundled scripts: none
Path: skills/llm-provider/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,235
Language: TypeScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# LLM Provider ## Critical 1. **All providers MUST implement the LLMProvider interface** from src/llm/types.ts with three methods: - call(options: LLMCallOptions): Promise<string> — single non-streaming call returning text - stream(options: LLMStreamOptions, callbacks: LLMStreamCallbacks): Promise<void> — streaming call invoking callbacks - listModels?(): Promise<string[]> — optional; list available models from the API 2. **Initialize client in constructor and store defaultModel from config**. Example: `this.client = new YourSDK({ apiKey: config.apiKey })`. Never lazy-initialize on first call — providers are instantiated once and cached in src/llm/index.ts. 3. **For EVERY response in call() and stream(), invoke trackUsage(model, usage)** from src/llm/usage.js before returning/ending. This is mandatory — it captures token metrics for CLI telemetry and cost analysis. If the API doesn't return usage data, estimate via estimateTokens(text), which assumes ~4 chars per token. 4. **Both call() and stream() must respect the model parameter** using pattern: `options.model || this.defaultModel`. Never hardcode model names. Callers supply model overrides via LLMCallOptions.model. 5. **Error h

What's inside
Steps it walks through
  1. Critical
  2. Instructions
  3. Step 1: Create provider class file
  4. Step 2: Add to ProviderType union
  5. Step 3: Add config fields
  6. Step 4: Update config.ts
  7. Step 5: Register in factory
  8. Step 6: Write tests
  9. Step 7: Integration test
  10. Examples
  11. Example 1: Local LM Studio server
  12. Example 2: Ollama (seat-based)
  13. Common Issues
More from ai-setup
All skills →
About this skill
What does the llm-provider skill do?

Adds a new LLM provider implementing LLMProvider interface with call() and stream() methods. Integrates with provider factory in src/llm/index.ts, config detection in src/llm/config.ts, and error handling via tracking and recovery. Use when adding a new model backend, integrating a third-party LLM API, or extending LLM platform support. Do NOT use for fixing bugs in existing providers, modifying existing provider behavior, or changing the LLMProvider interface.

How do I install it?

Run `npx skills add caliber-ai-org/ai-setup --skill llm-provider --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From caliber-ai-org/ai-setup, a repository with 1,235 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going