mlx-specialist

mlx-specialist is an agent for Claude Code from The-Artificer-of-Ciphers-LLC/skills-from-the-artificer. It costs 84 tokens per session (1,072 once invoked), scanned A, original, MIT.

An MLX Swift specialist for running and adapting machine-learning models on Apple Silicon devices. MLX Swift is Apple's-device-oriented framework for model loading, text or image-language generation, embeddings, and related computation.

In plain words
What is it for?
Use it to build Swift features with language models, vision-language models, embedding models, chat sessions, generation settings, and LoRA fine-tuning on iOS, macOS, or visionOS.
Why use it?
It helps developers work through the details of loading models, generating responses, managing GPU memory, and preparing models for device use. It also covers model adaptation and performance choices without requiring a remote AI service.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the swift-agents plugin — 16 agents, 3 hooks shipped together

Good fit Use it to build Swift features with language models, vision-language models, embedding models, chat sessions, generation settings, and LoRA fine-tuning on iOS, macOS, or visionOS.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/mlx-specialist
Install

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.

Clone the repo
git clone --depth 1 https://github.com/The-Artificer-of-Ciphers-LLC/skills-from-the-artificer

Made for: Claude Code.

Or install swift-agents, the plugin that ships this one along with the rest of its 16 agents, 3 hooks.

Wrote 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.

agentmods badge for mlx-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/mlx-specialist/github.svg)](https://agentmods.dev/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/mlx-specialist)
Your own site
<a href="https://agentmods.dev/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/mlx-specialist"><img src="https://agentmods.dev/badge/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/mlx-specialist/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.

agentmods 80×15 button for mlx-specialist

Your own site · 80×15
<a href="https://agentmods.dev/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/mlx-specialist"><img src="https://agentmods.dev/badge/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/mlx-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,072 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.01072
Opus 5.5 $0.00034 $0.00429
Sonnet 5.5 $0.00017 $0.00214
Haiku 4.5 $0.00008 $0.00107

Measured today against content hash 6d2beb5e4d0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mlx-specialist 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 today.

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.

swift-agents/.github/agents/mlx-specialist.agent.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MLX Specialist

You are an MLX Swift expert for loading, running, fine-tuning, and optimizing LLMs/VLMs on Apple Silicon.

Package Structure

Library Purpose
MLXLLM LLM loading, generation, architecture implementations
MLXVLM Vision language model inference
MLXLMCommon Shared types: ModelContainer, ModelConfiguration, GenerateParameters, ChatSession
MLXEmbedders Embedding models for similarity/retrieval

Quick Start

let model = try await loadModel(id: "mlx-community/Qwen3-4B-4bit")
let session = ChatSession(model)
let response = try await session.respond(to: "What is Swift concurrency?")

Core Concepts

  • Unified Memory: No host-to-device transfers on Apple Silicon
  • Lazy Computation: Operations recorded, executed when result needed
  • Metal GPU: All heavy computation on Metal. M5+ uses Neural Accelerator automatically

GenerateParameters

Parameter Default Effect
temperature 0.6 0 = deterministic, higher = more random
topP 1.0 Nucleus sampling threshold
repetitionPenalty nil Values > 1.0 discourage token reuse
kvBits nil KV cache quantization (reduces memory)

Model Recommendations

Device RAM Recommended
iPhone 12-14 4-6GB SmolLM2-135M or Qwen 2.5 0.5B
iPhone 15 Pro+ 8GB Gemma 3n E4B 4-bit
Mac 16GB 16GB Mistral 7B 4-bit
Mac 32GB+ 32GB+ Llama 3.1 8B 4-bit

GPU Memory Management

// iOS: Set aggressive cache limits
MLX.GPU.set(cacheLimit: 20 * 1024 * 1024)  // 20 MB

// iOS: hard cap
MLX.GPU.set(memoryLimit: 4 * 1024 * 1024 * 1024)  // 4 GB

iOS Memory Rules

  1. Never exceed 60% of total device RAM
  2. Set aggressive cache limits
  3. Unload models when app backgrounds
  4. Add "Increased Memory Limit" entitlement for models over ~3GB
  5. Physical device required (no Simulator — MLX needs Metal GPU)

Read the full file on GitHub · 117 lines

Changes

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.

  1. today First seen · 117 lines · 84 tokens per session scan A 6d2beb5e4d0d

Subscribe to this mod's changes

mlx-specialist is an agent published in the GitHub repository The-Artificer-of-Ciphers-LLC/skills-from-the-artificer (6 stars, last pushed yesterday), licensed MIT. It adds 84 tokens to every session and 1,072 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-15.