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 agentmods add skills/scouzi1966/maclocal-api/test-macafmnpx skills add scouzi1966/maclocal-api --skill test-macafmgit clone --depth 1 https://github.com/scouzi1966/maclocal-apiWrote 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/scouzi1966/maclocal-api/test-macafm)<a href="https://agentmods.dev/skills/scouzi1966/maclocal-api/test-macafm"><img src="https://agentmods.dev/badge/skills/scouzi1966/maclocal-api/test-macafm.svg" alt="Measured on agentmods" 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 | $0.00054 | $0.07497 |
| Opus 5 | $0.00027 | $0.03749 |
| Sonnet 5 | $0.00011 | $0.01499 |
| Haiku 4.5 | $0.00005 | $0.00750 |
Grade A, and why
test-macafm scanned grade A with 1 finding 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 5d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
until curl -sf http://127.0.0.1:9998/v1/models >/dev/null 2>&1; do sleep 1; done How it starts
The opening of the file, as written. The whole thing — 503 lines — stays where its author put it; the contents beside it link to each section on GitHub.
test-macafm
Run the maclocal-api test suite: automated pass/fail assertions and smart analysis (the smart suite's AI judge is opt-in — default off; ask the user before enabling it).
Triggers
Use this skill when the user asks to:
- Test or validate the server (e.g., "run the tests", "test AFM", "validate the build")
- Regression check after code changes
- Onboard a new model (verify it works correctly with the server)
- Release check before tagging or pushing
- Benchmark or profile model performance
First Questions to Ask
- Model — Which model to test? (Ask if not specified. Default: whatever's loaded.)
- Tier — smoke / standard / full? (Suggest based on context.)
- Binary path — Default
.build/release/afm. Ask if user has a custom build location. - Port — Default 9998. Ask if user's server is on a different port.
- Server running? — Is the server already running, or should tests start it?
Tier Decision Tree
| Tier | Time | When to use | What runs |
|---|---|---|---|
| smoke | ~2 min | Quick sanity check, any small model, CI | test-assertions.sh --tier smoke |
| standard | ~15 min | After feature changes, mid-size model | test-assertions.sh --tier standard |
| full | ~60 min | Release validation, production model | test-assertions.sh --tier full + mlx-model-test.sh (smart suite; AI judge opt-in — ask the user) with test-llm-comprehensive.txt + promptfoo agentic evals |
Quick guide:
- "Just run a quick test" → smoke
- "Test before merging" → standard
- "Full release validation" or "onboard new model" → full
- User doesn't specify → suggest standard
Execution Workflow
1. Build Check
# Ensure release build is current
swift build -c release
2. Start Server (if not running)
MACAFM_MLX_MODEL_CACHE=/Volumes/edata/models/vesta-test-cache \
.build/release/afm mlx -m MODEL --port 9998 \
--tool-call-parser afm_adaptive_xml \
--enable-prefix-caching \
--enable-grammar-constraints &
# Wait for server to be ready
until curl -sf http://127.0.0.1:9998/v1/models >/dev/null 2>&1; do sleep 1; done
What ships with it
2 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.
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.
- 5d ago First seen · 503 lines · 54 tokens per session scan A d6c62d9ea3c7
test-macafm is a skill published in the GitHub repository scouzi1966/maclocal-api (337 stars, last pushed today), licensed MIT. It adds 54 tokens to every session and 7,497 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
apple-foundation-models-app-patterns
Apply MVVM architecture patterns for building Foundation Models apps.
apple-foundation-models-conversation-context-builder
Extract context and build continuation prompts for multi-turn conversations.
apple-foundation-models-custom-tools
Build custom tools that the model can call to extend functionality.
apple-foundation-models-dynamic-schemas
Build schemas dynamically at runtime for flexible structured output.
apple-foundation-models-error-recovery
Handle context overflow, refusals, rate limits, and generation errors.
apple-foundation-models-feedback-sentiment-api
Collect user feedback and analyze sentiment to improve model responses.