test-afm-assertions

test-afm-assertions is a skill for Claude Code, Codex from scouzi1966/maclocal-api. It costs 0 tokens per session (2,549 once invoked), scanned A, original, MIT.

A test suite for checking language models against fixed pass-or-fail expectations. It covers model behaviours such as tool use, streaming, stopping, error handling, and performance.

In plain words
What is it for?
Use it to test one or more models, compare them on the same assertions, check XML tool-call parsing, and validate features such as log probabilities, prompt caching, and streamed output.
Why use it?
It reveals regressions and differences between models through repeatable checks instead of relying only on manual inspection.

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-afm-assertions
Any agent
npx skills add scouzi1966/maclocal-api --skill test-afm-assertions
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-afm-assertions

README.md
[![agentmods](https://agentmods.dev/badge/skills/scouzi1966/maclocal-api/test-afm-assertions.svg)](https://agentmods.dev/skills/scouzi1966/maclocal-api/test-afm-assertions)
Your own site
<a href="https://agentmods.dev/skills/scouzi1966/maclocal-api/test-afm-assertions"><img src="https://agentmods.dev/badge/skills/scouzi1966/maclocal-api/test-afm-assertions.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,549 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.02549
Opus 5 $0.00000 $0.01274
Sonnet 5 $0.00000 $0.00510
Haiku 4.5 $0.00000 $0.00255

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

Security

Grade A, and why

test-afm-assertions 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 4d 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.

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.

.claude/skills/test-afm-assertions/SKILL.md · 188 lines

How it starts

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

test-afm-assertions

Run AFM assertion tests across one or more models with deterministic pass/fail validation. Tests tool calling (including XML format), stop sequences, logprobs, think extraction, streaming, prompt cache, error handling, and performance.

Triggers

Use this skill when the user asks to:

  • Run assertion tests against specific models
  • Validate tool calling across Qwen3/Qwen3.5 models
  • Compare models on the same assertion suite
  • Regression test after code changes with multiple models
  • Validate XML tool call parsing for Qwen3-Coder or Qwen3.5 models

First Questions to Ask

  1. Which model(s)? — Ask the user which model(s) to test. Show available models:
    MACAFM_MLX_MODEL_CACHE=/Volumes/edata/models/vesta-test-cache ./Scripts/list-models.sh
    
  2. Tier? — unit (offline, ~5s), smoke (~2 min/model), standard (~5 min/model), or full (~15 min/model)? Default: standard. Use unit for offline-only Swift tests (no server needed).
  3. Forced parser? — Should we also test with --tool-call-parser qwen3_xml? Suggest yes if testing Qwen3/Qwen3.5 models.
  4. Grammar constraints? — Should we test with --enable-grammar-constraints? Recommended yes — EBNF grammar-constrained decoding forces valid XML tool call structure at generation time, preventing JSON-inside-XML format switching and missing required parameters. Requires --tool-call-parser afm_adaptive_xml. Matrix testing shows grammar constraints improve tool call success from 60% to 100% on realistic workloads (35B-A3B model).
  5. Server already running? — If yes, use single-model mode (test-assertions.sh). If no (or multiple models), use multi-model mode (test-assertions-multi.sh).

Common Model Configurations

Qwen3 XML Format Models (auto-detect xmlFunction)

Model Type Size Notes
mlx-community/Qwen3.5-35B-A3B-4bit qwen3_5_moe 19 GB Primary test model
mlx-community/Qwen3.5-9B-MLX-4bit qwen3_5 (dense) 5.6 GB Fast, dense Qwen3.5
mlx-community/Qwen3-Coder-Next-4bit qwen3_5_moe 42 GB Coder variant, no thinking
mlx-community/Qwen3-Coder-30B-A3B-Instruct-4bit qwen3_moe 16 GB Coder MoE

Read the full file on GitHub · 188 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. 4d ago First seen · 188 lines · 0 tokens per session scan A b5caaee2765f

Subscribe to this mod's changes

test-afm-assertions is a skill published in the GitHub repository scouzi1966/maclocal-api (337 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,549 tokens. 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-08-30.