Borrowing it
Nothing to install: this file belongs to scouzi1966/maclocal-api. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/scouzi1966/maclocal-api/main/.claude/skills/test-opencode-tooling/SKILL.mdgit 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-opencode-tooling)<a href="https://agentmods.dev/skills/scouzi1966/maclocal-api/test-opencode-tooling"><img src="https://agentmods.dev/badge/skills/scouzi1966/maclocal-api/test-opencode-tooling/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/scouzi1966/maclocal-api/test-opencode-tooling"><img src="https://agentmods.dev/badge/skills/scouzi1966/maclocal-api/test-opencode-tooling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Rogue Agent · line 26 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.1 | $0.00047 | $0.04414 |
| Opus 5.5 | $0.00019 | $0.01766 |
| Sonnet 5.5 | $0.00009 | $0.00883 |
| Haiku 4.5 | $0.00005 | $0.00441 |
Grade C, and why
test-opencode-tooling scanned grade C with 2 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 1mo 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.
**IMPORTANT: Clean workdir between iterations.** Before each run, remove all generated files from the OpenCode workdir so that results from a previous iteration don't contaminate the next one (e.g., OpenCode's "must read 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:${OC_PORT}/ >/dev/null 2>&1; do sleep 1; done How it starts
The opening of the file, as written. The whole thing — 402 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test OpenCode Tooling
Automated loop that runs OpenCode tasks against afm, captures tool call errors from both sides, classifies each as an afm bug or model error, and generates a report. Does not fix anything.
When to Use
- After changing tool call parsing code (XML, streaming, type coercion)
- Onboarding a new model to verify tool call reliability
- Investigating user-reported tool call failures with OpenCode
- Comparing tool call error rates across models
First Questions to Ask
- Prompt/PRD — Ask the user to paste the prompt text or provide a file path. This is the task OpenCode will execute (e.g., a PRD, coding task, or test scenario that exercises tool calls).
- Model(s) — Which model(s) to test? Show available:
MACAFM_MLX_MODEL_CACHE=/Volumes/edata/models/vesta-test-cache ./Scripts/list-models.sh - afm start parameters — Any extra flags beyond defaults? (e.g.,
--tool-call-parser afm_adaptive_xml,--enable-prefix-caching,--enable-grammar-constraints,--no-think). Recommended:--tool-call-parser afm_adaptive_xml --enable-grammar-constraints— this combination gives the highest tool call success rate (100% on 35B-A3B vs 60% without grammar constraints on realistic workloads). - Iterations — How many times to run the same prompt per model? Default: 1. More runs help distinguish flaky model errors from deterministic afm bugs.
- Working directory — Temp dir for OpenCode to work in. Default: create a fresh
/tmp/opencode-test-TIMESTAMPper run.
OpenCode CLI Gotchas
CRITICAL: opencode run hangs silently without a PTY. It prints one INFO line and freezes — no error, no output. You must use one of these approaches:
opencode serve+run --attach(recommended): Start a headless server, then attachrunto it viaexpectfor PTYexpectwrapper: Provides the pseudo-TTY thatopencode runrequires
Other gotchas:
opencode.jsonmodelfield must be a string, not an object —"model": "ollama/model-id"not"model": {"default": "..."}- The
npmprovider format (@ai-sdk/openai-compatible) is required for custom baseURL — the"api": "openai"format does NOT acceptbaseURL - OpenCode config is loaded from both
~/.config/opencode/opencode.json(global) AND$WORKDIR/opencode.json(local) — local overrides global - The workdir should be a git repo (
git init) for OpenCode to function properly
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.
- 1mo ago First seen · 402 lines · 47 tokens per session scan C c111e9a4fe17
test-opencode-tooling is a skill published in the GitHub repository scouzi1966/maclocal-api (348 stars, last pushed 12d ago), licensed MIT. It adds 47 tokens to every session and 4,414 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, 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
code-review
Review diffs and change sets for bugs, regressions, risks, and missing tests.
apple-foundation-models-error-recovery
Handle context overflow, refusals, rate limits, and generation errors.
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
langsmith-observability
LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.
experimental-code-coverage-local-debugger
Runs code coverage locally via Universal Test Runner (UTR) or helper scripts, mimicking LUCI trybots. Activate when CQ tryjobs fail or underreport coverage, to test local GN/recipe repairs before uploading, or to debug hermetic crashes.
verify-omnigent
Drive Omnigent the way a user does and prove a behavior with recorded evidence, using an isolated server, runner, and mock model plus a feature map of every user entry point. Load before reproducing a user-facing bug, before claiming a fix works, or when reviewing whether a change covered every surface (session vs.…