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-afm-binarynpx skills add scouzi1966/maclocal-api --skill test-afm-binarygit clone --depth 1 https://github.com/scouzi1966/maclocal-apiWhat 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.00069 | $0.04085 |
| Opus 5 | $0.00034 | $0.02042 |
| Sonnet 5 | $0.00014 | $0.00817 |
| Haiku 4.5 | $0.00007 | $0.00409 |
Grade C, and why
test-afm-binary scanned grade C 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 2d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf "$TMPDIR" How it starts
The opening of the file, as written. The whole thing — 295 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test AFM Binary
Test any pre-built afm binary with a menu of test suites. Validates the binary won't crash when relocated (pip/Homebrew install), then runs the selected tests.
Usage
/test-afm-binary— interactive: asks for binary path, model, and test selection/test-afm-binary /path/to/afm— test the binary at the given path/test-afm-binary .build/arm64-apple-macosx/release/afm— test the current build
Instructions
Step 1: Resolve Binary Path
Ask for the binary path if not provided as an argument. Default: .build/arm64-apple-macosx/release/afm.
BIN="${1:-.build/arm64-apple-macosx/release/afm}"
[ -x "$BIN" ] || BIN=".build/release/afm"
BIN_ABS="$(cd "$(dirname "$BIN")" && pwd)/$(basename "$BIN")"
echo "Binary: $BIN_ABS"
If the binary doesn't exist or isn't executable, STOP and tell the user.
Step 2: Pre-Flight Safety Checks (MANDATORY — always run)
These checks run before any test suite. They catch fatal distribution bugs that would crash every pip/Homebrew user. If any check fails, STOP — do not proceed to testing.
Check A: Binary version
REPORTED=$($BIN_ABS --version 2>&1)
echo "Version: $REPORTED"
If the version shows only a base version without a SHA suffix (e.g., v0.9.8 instead of v0.9.8-62395ab), warn the user: this likely means the binary was built with an incremental swift build instead of ./Scripts/build-from-scratch.sh. The SHA injection only happens in the build script. This is a warning, not a blocker — the binary may still be valid for testing.
Check B: Metallib present
BIN_DIR="$(dirname "$BIN_ABS")"
# Check for metallib in either location (SPM bundle or loose file)
if [ -f "$BIN_DIR/AFMKit_AFMKitMLX.bundle/default.metallib" ]; then
echo "PASS: Metallib in SPM bundle ($(du -h "$BIN_DIR/AFMKit_AFMKitMLX.bundle/default.metallib" | cut -f1))"
elif [ -f "$BIN_DIR/default.metallib" ]; then
echo "PASS: Loose metallib ($(du -h "$BIN_DIR/default.metallib" | cut -f1))"
else
echo "FAIL: No metallib found next to binary"
echo "The binary will crash on first inference without default.metallib"
fi
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.
- 2d ago First seen · 295 lines · 69 tokens per session scan C 8335e4144277
test-afm-binary is a skill published in the GitHub repository scouzi1966/maclocal-api (334 stars, last pushed 2d ago), licensed MIT. It adds 69 tokens to every session and 4,085 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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.