AnyFoundationModels — Development skill for Claude Code
Unified Swift interface for Foundation Models — Ollama, Claude, OpenAI Responses API, and MLX backends via trait-based configuration.
How to install AnyFoundationModels
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open 1amageek/AnyFoundationModels and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What AnyFoundationModels does
Unified Swift interface for Foundation Models — Ollama, Claude, OpenAI Responses API, and MLX backends via trait-based configuration.
Alternatives in Development
- Claude Code Proxy — Run Claude Code on OpenAI models 3.3k ★
- Harnessrouter — HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnes 618 ★
- Notebook Intelligence — A JupyterLab extension supporting Claude Code, Copilot, Ollama, and OpenAI-compatible LLMs, with MCP, skills 331 ★
README
AnyFoundationModels
A unified Swift framework for interacting with multiple language model providers through a single, protocol-based API.
Write against the `LanguageModel` protocol and use **Ollama**, **Claude**, **OpenAI Responses API**, **on-device MLX**, and **on-device Metal via swift-lm** side by side in the same application.
Features
- Unified
LanguageModelprotocol — one interface for all providers - Structured output via
@Generablemacro — get typed Swift structs from LLM responses - Tool calling with automatic execution loop
- Streaming responses with partial content parsing
- Swift 6 concurrency — fully
Sendable,async/awaitnative - On-device backends for both MLX and direct Metal inference
- Trait-gated compilation — keep package size small by compiling only the backends you need
Requirements
- Swift 6.2+
- macOS 26+ / iOS 26+ / visionOS 26+
Installation
Add to your `Package.swift`:
dependencies: [
.package(url: "https://github.com/1amageek/AnyFoundationModels.git", from: "0.5.6"),
]
Enable the backends you need via traits. Each backend compiles only when its trait is active, keeping your binary small:
targets: [
.executableTarget(
name: "MyApp",
dependencies: [
.product(name: "OpenFoundationModels", package: "AnyFoundationModels"),
.product(name: "ClaudeFoundationModels", package: "AnyFoundationModels",
condition: .when(traits: ["Claude"])),
.product(name: "ResponseFoundationModels", package: "AnyFoundationModels",
condition: .when(traits: ["Response"])),
.product(name: "OllamaFoundationModels", package: "AnyFoundationModels",
condition: .when(traits: ["Ollama"])),
.product(name: "MLXFoundationModels", package: "AnyFoundationModels",
condition: .when(traits: ["MLX"])),
.product(name: "MetalFound
Related Skills
Openapis
Free Claude API + free OpenAI API in one unified proxy. Drop-in compatible with Anthropic SDK, OpenAI SDK, Cla
Polywave Go
Provider-agnostic parallel agent coordination for LLMs — Anthropic, OpenAI, Ollama, or any OpenAI-compatible e
Claudeamp
A classically-styled terminal interface for Claude Code, OpenAI Codex, and Ollama. For Windows, macOS, and Lin
HiveForge
Autonomous Multi-CLI Agent Team Mission Control & Orchestrator. Coordinate Google Antigravity, Claude Code, Op
Workbuddy Kimicode
把 WorkBuddy 桌面端已登录的模型,经本地桥暴露成 OpenAI / Anthropic / Responses 兼容接口 —— 一键接入 Kimi Code、Claude Code、Codex。仅绑 127.0
Tally XML API Skill
Read-only Claude skill for TallyPrime's HTTP/XML interface (port 9000). Builds Export requests, parses respons
Related Agents
Mock Generator
Generates mock API responses and test data using local Ollama models. Saves cloud tokens.
Ren
Writes and edits Swift and iOS features with SwiftUI from a spec: screens, views, data models, following Apple
ZeroClaw Android
Run AI agents 24/7 on your Android phone. Native Rust core, 25+ providers (OpenAI, Claude, Gemini, Groq, DeepS