AgentSquad for Swift
2FastLabs/agent-squad
Guides building on-device multi-agent apps in Swift with the AgentSquad framework: which agent, orchestrator, classifier, storage or voice type fits each situation.
Maintain and extend AFM (maclocal-api), a Swift OpenAI-compatible local LLM server and CLI for Apple Foundation Models, MLX models, API gateway proxying, and Vision OCR.
$ npx skills add scouzi1966/maclocal-api --skill afm -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install scouzi1966/maclocal-api afm --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/scouzi1966/maclocal-api.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/afm .claude/skills/afm && 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 "afm" agent skill from https://github.com/scouzi1966/maclocal-api/tree/main/skills/afm into .claude/skills/afm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "afm", 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/scouzi1966/maclocal-api/tree/main/skills/afmType 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 scouzi1966/maclocal-api --skill afm -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install scouzi1966/maclocal-api afm --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scouzi1966/maclocal-api.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/afm .agents/skills/afm && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "afm" agent skill from https://github.com/scouzi1966/maclocal-api/tree/main/skills/afm into .agents/skills/afm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "afm", 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 scouzi1966/maclocal-api --skill afm -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install scouzi1966/maclocal-api afm --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scouzi1966/maclocal-api.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/afm .cursor/skills/afm && 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 "afm" agent skill from https://github.com/scouzi1966/maclocal-api/tree/main/skills/afm into .cursor/skills/afm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "afm", 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/scouzi1966/maclocal-api.git --path skills/afm--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 scouzi1966/maclocal-api --skill afm -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install scouzi1966/maclocal-api afm --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scouzi1966/maclocal-api.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/afm .gemini/skills/afm && 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 "afm" agent skill from https://github.com/scouzi1966/maclocal-api/tree/main/skills/afm into .gemini/skills/afm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "afm", 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 scouzi1966/maclocal-api afmInstalls 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 scouzi1966/maclocal-api --skill afm -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/scouzi1966/maclocal-api.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/afm .github/skills/afm && 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 "afm" agent skill from https://github.com/scouzi1966/maclocal-api/tree/main/skills/afm into .github/skills/afm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "afm", 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 scouzi1966/maclocal-api --skill afm -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install scouzi1966/maclocal-api afm --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scouzi1966/maclocal-api.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/afm .opencode/skills/afm && 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 "afm" agent skill from https://github.com/scouzi1966/maclocal-api/tree/main/skills/afm into .opencode/skills/afm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "afm", 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.
afmMaintain and extend AFM (maclocal-api), a Swift OpenAI-compatible local LLM server and CLI for Apple Foundation Models, MLX models, API gateway proxying, and Vision OCR.
Afm is an agent skill from scouzi1966/maclocal-api. Maintain and extend AFM (maclocal-api), a Swift OpenAI-compatible local LLM server and CLI for Apple Foundation Models, MLX models, API gateway proxying, and Vision OCR. Use when working on AFM CLI commands (afm, afm mlx, afm vision), OpenAI /v1/chat/completions and /v1/models behavior, streaming SSE, tool-calling, structured outputs, reasoning extraction, AFMKit integration, WebUI packaging, or AFM build/test/release scripts.
Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including reference files (for example `references/api-contract.md`, `references/architecture.md` and `references/cli-and-modes.md`).
It sits in AI & LLM Engineering, covering Structured output and tool calling, iOS development and LLM API integration. It works with OpenAI and macOS. The repository describes itself as: 'afm' command cli: macOS server and single prompt mode that exposes Apple's Foundation and MLX Models and other APIs running on your Mac through a single aggregated…. The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 138ca5d. 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.
Shell commands in SKILL.md call:
makecurlFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use curl, 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.
Afm loads about 1.2k tokens when it runs, and up to ~5.5k if it reads all its reference files. Until then it costs about 111 tokens; SKILL.md has 364 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 scouzi1966/maclocal-api at commit 138ca5d, republished under its MIT licence (© scouzi1966). 364 words, ~1,246 tokens.
.claude/skills/afm/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.AFM (maclocal-api) is a local OpenAI-compatible API server and CLI for:
afm)afm mlx)afm -g)afm vision)Use this skill when working on:
afm, afm mlx, afm vision)/v1/chat/completions, /v1/models)| Purpose | File Path |
|---|---|
| CLI modes, flags, single-prompt and stdin behavior | Sources/MacLocalAPI/main.swift |
| Vision command | Sources/MacLocalAPI/VisionCommand.swift |
| Vapor server + route registration | Sources/MacLocalAPI/Server.swift |
| Foundation chat completions controller | Sources/MacLocalAPI/Controllers/ChatCompletionsController.swift |
| MLX chat completions controller | Sources/MacLocalAPI/Controllers/MLXChatCompletionsController.swift |
| Foundation model service | Sources/MacLocalAPI/Models/FoundationModelService.swift |
| MLX model service | Sources/MacLocalAPI/Models/MLXModelService.swift |
| OpenAI request schema | Sources/MacLocalAPI/Models/OpenAIRequest.swift |
| OpenAI response schema | Sources/MacLocalAPI/Models/OpenAIResponse.swift |
| Backend discovery | Sources/MacLocalAPI/Services/BackendDiscoveryService.swift |
| Backend proxying | Sources/MacLocalAPI/Services/BackendProxyService.swift |
| Backend definitions/capabilities | Sources/MacLocalAPI/Models/BackendConfiguration.swift |
| Provider boundary check | Scripts/check-afmkit-consumer-boundary.sh |
| Full bootstrap build | Scripts/build-from-scratch.sh |
maclocal-api/ project root.MACLOCAL_AFMKIT_WORKSPACE_PATH for paired development, then bump the exact
AFMKit version after its changes are released.# Build against the exact AFMKit release
make build
# Debug build
make debug
# Full bootstrap build
./Scripts/build-from-scratch.sh
# Provider boundary
./Scripts/check-afmkit-consumer-boundary.sh
# Run Foundation server
./.build/debug/afm -p 9999 -v
# Run MLX server
./.build/debug/afm mlx -m mlx-community/Qwen3-0.6B-4bit -p 9999 -v
# Single prompt
./.build/debug/afm mlx -m mlx-community/Qwen3-0.6B-4bit -s "hello"
# Vision OCR
./.build/debug/afm vision -f media/ocr.png| Reference | When to Use |
|---|---|
references/architecture.md | Route wiring, lifecycle, cross-mode request flow |
references/cli-and-modes.md | Flag behavior, command dispatch, mode defaults |
references/api-contract.md | OpenAI request/response compatibility details |
references/mlx-inference-and-tool-calling.md | MLX streaming, tool calls, reasoning extraction, multimodal |
references/gateway-discovery-and-proxy.md | Gateway scans, backend capabilities, proxy normalization |
references/patch-build-test.md | Vendor patch process, build scripts, regression commands |
./.build/debug/afm --help./.build/debug/afm mlx --help./.build/debug/afm vision --helpcurl http://127.0.0.1:9999/healthcurl http://127.0.0.1:9999/v1/models./test-all-features.sh./Scripts/afm-cli-tests.sh./test-streaming.sh./test-go.sh./test-metrics.sh© scouzi1966, 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 10 other files (references) in skills/afm of scouzi1966/maclocal-api.
Open the folder on GitHubat commit 138ca5d
Afm 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 |
|---|---|---|---|---|---|---|
| Afm this skillscouzi1966/maclocal-api | 346 | — | ~1.2k | Automated safety check: Pass | MIT | |
| AgentSquad for Swift2FastLabs/agent-squad | 7.8k | — | ~3.5k | Automated safety check: Pass | Apache-2.0 | |
| Perfupraullenchai/Rapid-MLX | 4k | — | ~1.6k | Automated safety check: Notes | Custom licence | |
| Azure Openai To Responsesmicrosoft/ai-agents-for-beginners | 77k | — | ~6k | Automated safety check: Notes | MIT | |
| Instructor Structured LLM OutputsOrchestra-Research/AI-Research-SKILLs | 13k | 6 repos | ~4.2k | Automated safety check: Pass | MIT | |
| Foundation Models App Builderrryam/FoundationModelsKit | 162 | — | ~1.1k | Automated safety check: Pass | MIT |
2FastLabs/agent-squad
Guides building on-device multi-agent apps in Swift with the AgentSquad framework: which agent, orchestrator, classifier, storage or voice type fits each situation.
raullenchai/Rapid-MLX
Autonomous performance optimization: research, PoC, benchmark, implement, review, PR
microsoft/ai-agents-for-beginners
Migrate Python apps from Azure OpenAI Chat Completions to the Responses API.
Orchestra-Research/AI-Research-SKILLs
Shows how to pull validated, typed data out of LLM responses with Instructor and Pydantic models, including retries on failure and partial streaming.
rryam/FoundationModelsKit
Build or modify Apple Foundation Models features in Swift, SwiftUI, iOS, and macOS apps.
microsoft/ai-agents-for-beginners
Shift Python apps dem from Azure OpenAI Chat Completions go Responses API.
scouzi1966/maclocal-api
Build AFM from scratch — submodules, patches, webui, and Swift build.
scouzi1966/maclocal-api
Run and review the Promptfoo-based AFM agentic evaluation suite.
scouzi1966/maclocal-api
Test a pre-built afm binary at any path — runs pre-flight safety checks, then any combination of unit tests, assertions, smart analysis, promptfoo evals, batch validation, OpenAI compat, GPU…
scouzi1966/maclocal-api
A skill your agent uses when user wants to build a PyPI wheel from an existing compiled afm binary and publish to PyPI.
scouzi1966/maclocal-api
Run the maclocal-api (AFM/MLX) test suite — automated assertions and smart analysis.
scouzi1966/maclocal-api
A skill your agent uses when testing tool call reliability between OpenCode and afm — captures streaming XML tool call errors, classifies them as afm translation bugs vs model generation errors, and…
Categories
Maintain and extend AFM (maclocal-api), a Swift OpenAI-compatible local LLM server and CLI for Apple Foundation Models, MLX models, API gateway proxying, and Vision OCR. Afm is an agent skill from scouzi1966/maclocal-api. Maintain and extend AFM (maclocal-api), a Swift OpenAI-compatible local LLM server and CLI for Apple Foundation Models, MLX models, API gateway proxying, and Vision OCR.
Afm fits situations like: working on AFM CLI commands (afm; openAI /v1/chat/completions and /v1/models behavior; structured outputs; reasoning extraction.
Run `npx skills add scouzi1966/maclocal-api --skill afm -a claude-code`. Or copy the skill folder (skills/afm in scouzi1966/maclocal-api) into .claude/skills/afm in your project. Claude Code loads it when a task matches its description.
Run `npx skills add scouzi1966/maclocal-api --skill afm -a codex`. Or copy the skill folder (skills/afm in scouzi1966/maclocal-api) into .agents/skills/afm 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 scouzi1966/maclocal-api --skill afm -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/afm, .gemini/skills/afm, .github/skills/afm and .opencode/skills/afm in your project.
Going by SKILL.md and its folder, Afm needs the command-line tools its instructions call (make and curl).
SKILL.md contains no URLs. Its commands use curl, 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.
Afm is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Afm: AgentSquad for Swift (2FastLabs/agent-squad, 7.8k stars), Perfup (raullenchai/Rapid-MLX, 4k stars), Azure Openai To Responses (microsoft/ai-agents-for-beginners, 77k stars) and Instructor Structured LLM Outputs (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
scouzi1966 (a GitHub user) maintains it in scouzi1966/maclocal-api, which has 346 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 10, 2026.
Source: scouzi1966/maclocal-api on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.