Agent skill · Databases

openai

OpenAI compatibility layer for Ollama. Use the official OpenAI Python library to interact with Ollama, enabling easy migration from OpenAI and compatibility with LangChain, LlamaIndex, and other OpenAI-based tools.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill openai --agent claude-code

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

Facts
Files in the skill folder: 2
SKILL.md size: 6 KB
Bundled scripts: none
Path: skills/ai-llm/openai/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

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

From the SKILL.md

# Ollama OpenAI Compatibility ## Overview Ollama provides an OpenAI-compatible API at `/v1/*` endpoints. This allows using the official `openai` Python library with Ollama, enabling: - **Migration** - Drop-in replacement for OpenAI API - **Tool ecosystem** - Works with LangChain, LlamaIndex, etc. - **Familiar interface** - Standard OpenAI patterns ## Quick Reference | Endpoint | Method | Purpose | |----------|--------|---------| | `/v1/models` | GET | List models | | `/v1/completions` | POST | Text generation | | `/v1/chat/completions` | POST | Chat completion | | `/v1/embeddings` | POST | Generate embeddings | ### Limitations The OpenAI compatibility layer does **not** support: - Show model details (`/api/show`) - List running models (`/api/ps`) - Copy model (`/api/copy`) - Delete model (`/api/delete`) Use `bazzite-ai-jupyter:chat` or `bazzite-ai-jupyter:ollama` for these operations. ## Setup ```python import os from openai import OpenAI OLLAMA_HOST = os.getenv("OLLAMA_HOST", "http://localhost:11434") client = OpenAI( base_url=f"{OLLAMA_HOST}/v1", api_key="ollama" # Required by library but ignored by Ollama ) ``` ## List Models ```python models = client.models.list() for model in

What's inside
Steps it walks through
  1. Overview
  2. Quick Reference
  3. Limitations
  4. Setup
  5. List Models
  6. Text Completions
  7. Chat Completion
  8. Single Turn
  9. Multi-Turn Conversation
  10. Streaming
  11. Generate Embeddings
  12. Error Handling
  13. Migration from OpenAI
  14. Before (OpenAI)
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the openai skill do?

OpenAI compatibility layer for Ollama. Use the official OpenAI Python library to interact with Ollama, enabling easy migration from OpenAI and compatibility with LangChain, LlamaIndex, and other OpenAI-based tools.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill openai --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 majiayu000/claude-skill-registry, a repository with 534 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