Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add PicoMLX/mlx-swift-lm-skill --skill mlx-swift-lmgit clone --depth 1 https://github.com/PicoMLX/mlx-swift-lm-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/picomlx/mlx-swift-lm-skill/mlx-swift-lm)<a href="https://agentmods.dev/skills/picomlx/mlx-swift-lm-skill/mlx-swift-lm"><img src="https://agentmods.dev/badge/skills/picomlx/mlx-swift-lm-skill/mlx-swift-lm/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/picomlx/mlx-swift-lm-skill/mlx-swift-lm"><img src="https://agentmods.dev/badge/skills/picomlx/mlx-swift-lm-skill/mlx-swift-lm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.03448 |
| Opus 5 | $0.00026 | $0.01724 |
| Sonnet 5 | $0.00010 | $0.00690 |
| Haiku 4.5 | $0.00005 | $0.00345 |
Grade A, and why
swift-mlx-lm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to swift-mlx-lm — 14 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 420 lines — stays where its author put it; the contents beside it link to each section on GitHub.
mlx-swift-lm Skill
1. Overview & Triggers
mlx-swift-lm is a Swift package for running Large Language Models (LLMs) and Vision-Language Models (VLMs) on Apple Silicon using MLX. It supports local inference, streaming generation, wired-memory coordination, tool calling, LoRA/DoRA fine-tuning, and embeddings.
When to Use This Skill
- Running LLM/VLM inference on macOS/iOS with Apple Silicon
- Streaming text generation from local models
- Coordinating concurrent inference with wired-memory policies and tickets
- Tool calling / function calling with models
- LoRA adapter training and fine-tuning
- Text embeddings for RAG/semantic search
- Porting model architectures from Python MLX-LM to Swift
Architecture Overview
MLXLMCommon - Core infra (ModelContainer, ChatSession, Evaluate, KVCache, wired memory helpers)
MLXLLM - Text-only LLM support (Llama, Qwen, Gemma, Phi, DeepSeek, etc.)
MLXVLM - Vision-Language Models (Qwen-VL, PaliGemma, Gemma3, etc.)
MLXEmbedders - Embedding models and pooling utilities
2. Key File Reference
| Purpose | File Path |
|---|---|
| Thread-safe model wrapper | Libraries/MLXLMCommon/ModelContainer.swift |
| Simplified chat API | Libraries/MLXLMCommon/ChatSession.swift |
| Generation & streaming APIs | Libraries/MLXLMCommon/Evaluate.swift |
| KV cache types | Libraries/MLXLMCommon/KVCache.swift |
| Wired-memory policies | Libraries/MLXLMCommon/WiredMemoryPolicies.swift |
| Wired-memory measurement helpers | Libraries/MLXLMCommon/WiredMemoryUtils.swift |
| Model configuration | Libraries/MLXLMCommon/ModelConfiguration.swift |
| Chat message types | Libraries/MLXLMCommon/Chat.swift |
| Tool call processing | Libraries/MLXLMCommon/Tool/ToolCallFormat.swift |
| Concurrency utilities | Libraries/MLXLMCommon/Utilities/SerialAccessContainer.swift |
| LLM factory & registry | Libraries/MLXLLM/LLMModelFactory.swift |
| VLM factory & registry | Libraries/MLXVLM/VLMModelFactory.swift |
| LoRA configuration | Libraries/MLXLMCommon/Adapters/LoRA/LoRAContainer.swift |
| LoRA training | Libraries/MLXLLM/LoraTrain.swift |
What ships with it
12 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/concurrency.md 8.2 KB
- references/embeddings.md 7.7 KB
- references/generation.md 3.9 KB
- references/kv-cache.md 7.1 KB
- references/lora-adapters.md 7.5 KB
- references/model-container.md 8.3 KB
- references/model-porting.md 13 KB
- references/supported-models.md 7.1 KB
- references/tokenizer-chat.md 7.4 KB
- references/tool-calling.md 8.8 KB
- references/training.md 8.8 KB
- references/wired-memory.md 3.7 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 420 lines · 52 tokens per session scan A d50bfd77c1e7
swift-mlx-lm is a skill published in the GitHub repository PicoMLX/mlx-swift-lm-skill (24 stars, last pushed 6mo ago), licensed MIT. It adds 52 tokens to every session and 3,448 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to swift-mlx-lm, differing in 14 lines, and is treated as a copy.
Other skills, from other repositories
developing-genkit-dart
Generates code and provides documentation for the Genkit Dart SDK. Use when the user asks to build AI agents in Dart, use Genkit flows, or integrate LLMs into Dart/Flutter applications.
swift-mlx-lm
MLX Swift LM - Run LLMs and VLMs on Apple Silicon using MLX. Covers local inference, streaming, wired memory coordination, tool calling, LoRA fine-tuning, embeddings, and model porting.
swift-mlx
MLX Swift - High-performance ML framework for Apple Silicon with lazy evaluation, automatic differentiation, and unified memory.
kotlin-specialist
Provides idiomatic Kotlin implementation patterns including coroutine concurrency, Flow stream handling, multiplatform architecture, Compose UI construction, Ktor server setup, and type-safe DSL design. Use when building Kotlin applications requiring coroutines, multiplatform development, or Android with Compose.…
ax-java-gen
Use when writing Java code with dev.axllm:ax for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.
swiftui-dev
Use this skill for SwiftUI development, architecture, structure, performance, and Apple native app profiling. It combines.