test-macafm

test-macafm is a skill for Claude Code, Codex from scouzi1966/maclocal-api. It costs 54 tokens per session (7,497 once invoked), scanned A, original, MIT.

A test tool for maclocal-api, a server for running models with Apple machine-learning hardware. It runs automated checks and can optionally use an AI judge for deeper analysis.

In plain words
What is it for?
Use it to test or validate the server, check regressions, onboard a new model, or benchmark and profile model performance.
Why use it?
It provides repeatable checks for whether the server and a model work correctly after changes or before release. It also supports different test levels for quick checks, regular validation, or more complete testing.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/scouzi1966/maclocal-api/test-macafm
Any agent
npx skills add scouzi1966/maclocal-api --skill test-macafm
Clone the repo
git clone --depth 1 https://github.com/scouzi1966/maclocal-api

Made for: Claude Code, Codex.

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 test-macafm

README.md
[![agentmods](https://agentmods.dev/badge/skills/scouzi1966/maclocal-api/test-macafm.svg)](https://agentmods.dev/skills/scouzi1966/maclocal-api/test-macafm)
Your own site
<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>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,497 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00054 $0.07497
Opus 5 $0.00027 $0.03749
Sonnet 5 $0.00011 $0.01499
Haiku 4.5 $0.00005 $0.00750

Measured 5d ago against content hash d6c62d9ea3c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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
.claude/skills/test-macafm/SKILL.md · 503 lines

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

  1. Model — Which model to test? (Ask if not specified. Default: whatever's loaded.)
  2. Tier — smoke / standard / full? (Suggest based on context.)
  3. Binary path — Default .build/release/afm. Ask if user has a custom build location.
  4. Port — Default 9998. Ask if user's server is on a different port.
  5. 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

Read the full file on GitHub · 503 lines

Files

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.

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. 5d ago First seen · 503 lines · 54 tokens per session scan A d6c62d9ea3c7

Subscribe to this mod's changes

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.