configuring-horizon
Use this skill whenever the user mentions Horizon by name in a Laravel context. Covers the full Horizon lifecycle: installing…
Hook an app, game or script up to the local mlx-serve server for LLM chat, embeddings, image, speech, music, sound effect, video and 3D generation, and Laya/Kev/Clef typed decisions, or make a whole film or music video on this Mac. Use when code should call mlx-serve or the user
Claude Code
$ npx -y skills add ddalcu/mlx-serve --skill mlx-serve --agent claude-code
Codex
$ npx skills add ddalcu/mlx-serve --skill mlx-serve -a codex -y
Cursor
$ npx skills add ddalcu/mlx-serve --skill mlx-serve -a cursor -y
Gemini CLI
$ npx skills add ddalcu/mlx-serve --skill mlx-serve -a gemini-cli -y
GitHub Copilot
$ npx skills add ddalcu/mlx-serve --skill mlx-serve -a github-copilot -y
OpenCode
$ npx skills add ddalcu/mlx-serve --skill mlx-serve -a opencode -y
Windsurf
$ npx skills add ddalcu/mlx-serve --skill mlx-serve -a windsurf -y
name: mlx-serve description: Hook an app, game or script up to the local mlx-serve server for LLM chat, embeddings, image, speech, music, sound effect, video and 3D generation, and Laya/Kev/Clef typed decisions, or make a whole film or music video on this Mac. Use when code should call mlx-serve or the user wants a video, song, pictures or game assets made locally.
mlx-serve runs MLX models on this Mac behind one HTTP port: OpenAI, Anthropic and Ollama compatible chat, plus native endpoints for images, speech, music, sound effects, video, 3D and decisions. Everything below is plain HTTP + JSON, so any language works.
config value or env var in the code you write, never a hardcoded LAN IP.
`Authorization: Bearer <key>` from other machines; a 401 means that.
directly.
curl -s "${MLX_SERVE_URL:-http://127.0.0.1:11234}/v1/models" \
| jq -r '.data[] | "\(.id)\t\(.capabilities | join(","))\t\(.state)"'Each row has `id` (like `org/name`), `capabilities`, `state` (`ready`, `unloaded`, `remote`) and `context_length`. Choose by capability:
| capability | endpoint | details | |---|---|---| | `chat` | `POST /v1/chat/completions` (also `/v1/messages`, `/v1/responses`) | chat.md | | `embeddings` | `POST /v1/embeddings` | chat.md | | `image` | `POST /v1/images/generations`, `POST /v1/images/edits` | media.md | | `audio` without `music` or `sound` | `POST /v1/audio/speech` (TTS) | media.md | | `music` | `POST /v1/audio/music-generations` | media.md | | `sound` | `POST /v1/audio/sound-generations` (sound effects) | media.md | | `transcription` | `POST /v1/audio/transcriptions` (speech to text, word times, subtitles) | media.md | | `video` | `POST /v1/video/generations` | media.md | | `3d` | `POST /v1/3d/generations` | media.md | | `decisions` | `POST /v1/decisions`, `POST /v1/systemone` | decisions.md |
Read the linked file (next to this one) before writing client code for that endpoint. If no model has the capability the user needs, say so and tell them to download one in the MLX Core app (Models). Do not invent an id.
3D has a default: Idol, the `3d` row whose id contains `Idol` (about 3 GB). Use it unless the user names another 3D model. If no listed `3d` model is Idol, stop and tell the user to download it (MLX Core: Models > Media > 3D, or `mlx-serve pull ddalcu/Idol-MLX-Serve-8bit` and then `POST /v1/models/rescan`); do not substitute another 3D model.
the first request, which can take seconds to minutes. `POST /v1/load-model {"model": "<id>"}` pre-warms one; `POST /v1/unload-model {"model": "<id>"}` frees it. While a load runs, `GET /v1/load-progress` lists each loading model's `phase`, `done`/`total` and `eta_s`.
the image, 3D and sound models all share its memory. A 503 `out_of_memory` means unload something first. Not every overfill is refused: three models packed to the edge make Metal fail mid-job instead, so keep ONE media model loaded at a time and unload it before loading another kind (gen.mjs does).
3-minute video render stalls chat replies for 3 minutes, and chatting while media renders squeezes both. Run asset generation as its own step and wait for it, never alongside your own coding turns. Decisions and embeddings are milliseconds.
Making a video (music video, trailer, release or story film)? Read film.md first: a YuE2 song is the spine, `gen.mjs` makes the pictures, clips and sound effects, and `film.mjs` (Node 18+) times every cut to the sung words and renders it.
and `gen.mjs` (next to this file, Node 18+), which generates and post-processes every asset from one `assets.json` (`node gen.mjs help`).
the chat model you run on; never in parallel with your own work), never on the frame or input path. Cache results on disk keyed by model + prompt + seed + size, and ship the cache (or regenerate lazily) instead of calling on every run.
sound effects about a second, music 30 s to minutes, 3D 1-5 min, video minutes. Set client timeouts to match (10+ minutes for video), and keep the game playable while waiting.
progress bar. See media.md.
message names the bad field. Show it; never retry a 400 unchanged.
swap models without touching game code.
BASE="${MLX_SERVE_URL:-http://127.0.0.1:11234}"
IMG=$(curl -s "$BASE/v1/models" | jq -r '[.data[] | select(.capabilities | index("image"))][0].id')
curl -s "$BASE/v1/images/generations" -H 'content-type: application/json' \
-d "{\"model\":\"$IMG\",\"prompt\":\"pixel art treasure chest on a plain white background\",\"size\":\"512x512\",\"seed\":7}" \
| jq -r '.data[0].b64_json' | base64 -d > chest.pngRun open models on your Mac: chat, coding agents, images, video, music, speech and 3D. One native app and one local server that speaks the OpenAI, Anthropic and Ollama APIs. It runs offline, needs no Python and no account, and it's MIT licensed.
Use this skill whenever the user mentions Horizon by name in a Laravel context. Covers the full Horizon lifecycle: installing…
Use when launching cloud VMs, Kubernetes pods, or Slurm jobs for GPU/TPU/CPU workloads, training or fine-tuning models on cloud…
Use this skill when the user mentions "pinme", or needs to upload files, store to IPFS, create/publish/deploy websites or…