Add Model Provider
openclaw/openclaw
Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.
Guide for adding a new LLM provider to OhMyCode. An agent skill from AlphaLab-USTC/OhMyCode.
$ npx skills add AlphaLab-USTC/OhMyCode --skill add-provider -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install AlphaLab-USTC/OhMyCode add-provider --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/AlphaLab-USTC/OhMyCode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/add-provider .claude/skills/add-provider && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "add-provider" agent skill from https://github.com/AlphaLab-USTC/OhMyCode/tree/main/.agents/skills/add-provider into .claude/skills/add-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-provider", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/AlphaLab-USTC/OhMyCode/tree/main/.agents/skills/add-providerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add AlphaLab-USTC/OhMyCode --skill add-provider -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install AlphaLab-USTC/OhMyCode add-provider --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlphaLab-USTC/OhMyCode.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/add-provider .agents/skills/add-provider && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "add-provider" agent skill from https://github.com/AlphaLab-USTC/OhMyCode/tree/main/.agents/skills/add-provider into .agents/skills/add-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-provider", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add AlphaLab-USTC/OhMyCode --skill add-provider -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install AlphaLab-USTC/OhMyCode add-provider --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlphaLab-USTC/OhMyCode.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/add-provider .cursor/skills/add-provider && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "add-provider" agent skill from https://github.com/AlphaLab-USTC/OhMyCode/tree/main/.agents/skills/add-provider into .cursor/skills/add-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-provider", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/AlphaLab-USTC/OhMyCode.git --path .agents/skills/add-provider--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add AlphaLab-USTC/OhMyCode --skill add-provider -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install AlphaLab-USTC/OhMyCode add-provider --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlphaLab-USTC/OhMyCode.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/add-provider .gemini/skills/add-provider && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "add-provider" agent skill from https://github.com/AlphaLab-USTC/OhMyCode/tree/main/.agents/skills/add-provider into .gemini/skills/add-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-provider", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install AlphaLab-USTC/OhMyCode add-providerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add AlphaLab-USTC/OhMyCode --skill add-provider -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/AlphaLab-USTC/OhMyCode.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/add-provider .github/skills/add-provider && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "add-provider" agent skill from https://github.com/AlphaLab-USTC/OhMyCode/tree/main/.agents/skills/add-provider into .github/skills/add-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-provider", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add AlphaLab-USTC/OhMyCode --skill add-provider -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install AlphaLab-USTC/OhMyCode add-provider --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlphaLab-USTC/OhMyCode.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/add-provider .opencode/skills/add-provider && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "add-provider" agent skill from https://github.com/AlphaLab-USTC/OhMyCode/tree/main/.agents/skills/add-provider into .opencode/skills/add-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-provider", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
add-providerGuide for adding a new LLM provider to OhMyCode. An agent skill from AlphaLab-USTC/OhMyCode.
Add Provider is an agent skill from AlphaLab-USTC/OhMyCode. Guide for adding a new LLM provider to OhMyCode. Use when user wants to connect a new AI model backend.
Its SKILL.md is about 890 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `templates/provider_template.py`).
The repository describes itself as: Minimal and Customizable CC-Style Coding Agent. The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 4d1bb28. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (Python), which the agent can run.
Shell commands in SKILL.md call:
python3gitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Add Provider loads about 888 tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 314 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from AlphaLab-USTC/OhMyCode at commit 4d1bb28, republished under its MIT licence (© AlphaLab-USTC). 314 words, ~888 tokens.
.claude/skills/add-provider/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Connect a new LLM backend (e.g., Gemini, Ollama, DeepSeek, local models).
docs/DEVELOPMENT_GUIDE.mdohmycode/providers/base.py to understand Provider Protocol, register_provider()ohmycode/core/messages.py for TextChunk, ToolCallStart, TurnComplete, TokenUsageohmycode/providers/openai.py as referenceEvery provider must implement one method:
async def stream(
self,
messages: list[Message],
tools: list[ToolDef],
system: str,
model: str,
**kwargs,
) -> AsyncIterator[StreamEvent]:It must yield these events in order:
TextChunk(text="...") — for each streamed text tokenToolCallStart(tool_name="...", tool_use_id="...", params={...}) — for each tool callTurnComplete(finish_reason="stop"|"tool_use", usage=TokenUsage(...)) — always lastCopy templates/provider_template.py to ohmycode/providers/<name>.py.
Fill in:
__init__() — initialize the API clientstream() — handle the streaming response format of the target APIDifferent APIs have different message formats. Key conversions:
UserMessage → the API's user message formatAssistantMessage (with tool_calls) → the API's assistant + tool use formatToolResultMessage → the API's tool result formatsystem parameter → some APIs put it in messages, some as a separate paramCreate tests/providers/test_<name>_provider.py:
import pytest
from ohmycode.providers.base import PROVIDER_REGISTRY
def test_provider_is_registered():
import ohmycode.providers.<name>
assert "<name>" in PROVIDER_REGISTRY
def test_provider_instantiation():
from ohmycode.providers.<name> import <ProviderClass>
provider = <ProviderClass>(api_key="test")
assert provider.name == "<name>"Add any new config fields to ohmycode/config/config.py OhMyCodeConfig class and DEFAULT_CONFIG dict if needed (e.g., gemini_api_key).
python3 -m pytest tests/ -v # No regressions
ohmycode -p "Hello" --provider <name> --model <model> # End-to-end testgit commit -m "feat(providers): add <name> provider"ohmycode/providers/ — auto-imported via auto_import_providers()register_provider("<name>", <Class>) at module levelstream() must be an async generator (use yield)TurnComplete as the last eventtools=[] case (no tool use)stream() during normal API errors — the loop handles retriesregister_provider() → provider not found at runtimeTurnComplete → loop hangs waiting for turn endfinish_reason wrong: use "tool_use" when model wants to call tools, "stop" when done© AlphaLab-USTC, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in .agents/skills/add-provider of AlphaLab-USTC/OhMyCode.
Open the folder on GitHubat commit 4d1bb28
Add Provider next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Add Provider this skillAlphaLab-USTC/OhMyCode | 131 | — | ~888 | Automated safety check: Pass | MIT | |
| Add Model Provideropenclaw/openclaw | 392k | — | ~1.1k | Automated safety check: Pass | MIT | |
| OmniRoute Provider Managementdiegosouzapw/OmniRoute | 74k | — | ~2.4k | Automated safety check: Pass | MIT | |
| OmniRoute Providers CLIdiegosouzapw/OmniRoute | 74k | — | ~2.2k | Automated safety check: Pass | MIT | |
| LobeHub Model Provider Integrationlobehub/lobehub | 83k | — | ~2.8k | Automated safety check: Pass | Custom licence | |
| Cosmos Providerdotnet/efcore | 15k | — | ~242 | Automated safety check: Pass | MIT |
openclaw/openclaw
Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.
diegosouzapw/OmniRoute
Manages AI provider connections, API keys, OAuth flows and connection tests through OmniRoute's REST API across its 327-provider catalog.
diegosouzapw/OmniRoute
Command reference for managing provider connections in the omniroute gateway: browse the catalog, test and validate connections, rotate API keys and read per-provider metrics.
lobehub/lobehub
Adds an AI model provider to LobeHub end to end: runtime integration, model cards, configuration, branding and documentation, or documentation-only updates.
dotnet/efcore
Implementation details for the EF Core Azure Cosmos DB provider.
evanca/flutter-ai-rules
A skill your agent uses when setting up providers, consuming state, optimizing rebuilds, using ProxyProvider, or migrating from deprecated providers (Provider package).
AlphaLab-USTC/OhMyCode
Guide for adding a new feature to OhMyCode. An agent skill from AlphaLab-USTC/OhMyCode.
AlphaLab-USTC/OhMyCode
Guide for adding a new tool to OhMyCode. An agent skill from AlphaLab-USTC/OhMyCode.
AlphaLab-USTC/OhMyCode
Run OhMyCode benchmarks — score any provider/model with token tracking.
AlphaLab-USTC/OhMyCode
Guide for customizing OhMyCode's terminal output style and rendering.
AlphaLab-USTC/OhMyCode
Guide for customizing OhMyCode's AI personality and behavior via system prompt.
AlphaLab-USTC/OhMyCode
Guide for debugging OhMyCode issues. An agent skill from AlphaLab-USTC/OhMyCode.
Guide for adding a new LLM provider to OhMyCode. An agent skill from AlphaLab-USTC/OhMyCode. Add Provider is an agent skill from AlphaLab-USTC/OhMyCode. Guide for adding a new LLM provider to OhMyCode.
Add Provider fits situations like: user wants to connect a new AI model backend.
Run `npx skills add AlphaLab-USTC/OhMyCode --skill add-provider -a claude-code`. Or copy the skill folder (.agents/skills/add-provider in AlphaLab-USTC/OhMyCode) into .claude/skills/add-provider in your project. Claude Code loads it when a task matches its description.
Run `npx skills add AlphaLab-USTC/OhMyCode --skill add-provider -a codex`. Or copy the skill folder (.agents/skills/add-provider in AlphaLab-USTC/OhMyCode) into .agents/skills/add-provider in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AlphaLab-USTC/OhMyCode --skill add-provider -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-provider, .gemini/skills/add-provider, .github/skills/add-provider and .opencode/skills/add-provider in your project.
Going by SKILL.md and its folder, Add Provider needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and git). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Add Provider is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 888 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Add Provider: Add Model Provider (openclaw/openclaw, 392k stars), OmniRoute Provider Management (diegosouzapw/OmniRoute, 74k stars), OmniRoute Providers CLI (diegosouzapw/OmniRoute, 74k stars) and LobeHub Model Provider Integration (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
AlphaLab-USTC (a GitHub user) maintains it in AlphaLab-USTC/OhMyCode, which has 131 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on April 2, 2026.
Source: AlphaLab-USTC/OhMyCode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.