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 skills add darellchua2/opencode-config-template --skill zai-vision-analysis-skillgit clone --depth 1 https://github.com/darellchua2/opencode-config-templateWrote 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/darellchua2/opencode-config-template/zai-vision-analysis-skill)<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/zai-vision-analysis-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/zai-vision-analysis-skill.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 4 findings, 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 Data Exfiltration · line 38 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
- medium Data Exfiltration · line 39 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
- medium Data Exfiltration · line 68 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
- medium Data Exfiltration · line 70 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00055 | $0.01564 |
| Opus 5 | $0.00028 | $0.00782 |
| Sonnet 5 | $0.00011 | $0.00313 |
| Haiku 4.5 | $0.00006 | $0.00156 |
Grade A, and why
zai-vision-analysis-skill scanned grade A 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 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
## Recipe (one command — pure stdlib, no curl/ARG_MAX issues) Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
mime = subprocess.check_output(["file","-b","--mime-type",src]).decode().strip() or "image/png" How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
What I do
I give an agent a single ready-to-run command that calls the Z.AI vision API directly with
glm-5v-turbo (a different model from the native glm-5.3-flash multimodal path), returning
the model's text description of an image. This is the API fallback for when native multimodal
perception is unavailable — e.g. the image-analyzer-subagent runtime reports "model does not
support image input", the vision MCP server isn't connected, or a text-model agent needs image
content.
The calling agent (typically a text model) runs the command with bash, then reasons over the
returned description.
Why a direct API call
OpenCode's native multimodal agents run on provider-catalog vision models (now
zai-coding-plan/glm-5.3-flash), but that path can fail at runtime (provider mis-route, MCP
server not connected, text-only session). A direct Z.AI API call works regardless of the OpenCode
model layer, so it is a reliable fallback.
It also serves any text-model agent that has bash but no image perception.
Prerequisite — key + endpoint
The recipe auto-resolves both, preferring the coding-plan tier:
| Source | Endpoint |
|---|---|
auth.json → zai-coding-plan.key (preferred) |
https://api.z.ai/api/coding/paas/v4/chat/completions |
auth.json → zai.key, else $ZAI_API_KEY |
https://api.z.ai/api/paas/v4/chat/completions |
If neither key is found, the command exits with an error telling the caller to authenticate
(opencode auth login for Z.AI, or export ZAI_API_KEY).
Recipe (one command — pure stdlib, no curl/ARG_MAX issues)
$IMG = local file path or a remote https:// URL. $PROMPT = analysis instruction.
Large local images are auto-downscaled to 1280px max edge (JPEG q85) when Pillow is installed;
without Pillow the raw file is sent (may hit size limits on very large images).
IMG="/abs/path/to/image.png"
PROMPT="Describe this image in detail — text, UI elements, errors, layout, colors, anything actionable."
python3 - "$IMG" "$PROMPT" <<'PY'
import sys, os, json, base64, subprocess, urllib.request, urllib.error
src, prompt = sys.argv[1], (sys.argv[2] or "Describe this image in detail.")
def load_auth():
try:
return json.load(open(os.path.expanduser("~/.local/share/opencode/auth.json")))
except Exception:
return {}
auth = load_auth()
cp = (auth.get("zai-coding-plan") or {}).get("key")
zai = (auth.get("zai") or {}).get("key") or os.environ.get("ZAI_API_KEY", "")
MODEL = "glm-5v-turbo"
if cp:
ENDPOINT, APIKEY = "https://api.z.ai/api/coding/paas/v4/chat/completions", cp
elif zai:
ENDPOINT, APIKEY = "https://api.z.ai/api/paas/v4/chat/completions", zai
else:
sys.exit("ERROR: no Z.AI key — run `opencode auth login` (Z.AI) or export ZAI_API_KEY")
def img_url(src):
if src.startswith("http"):
return src
try:
from PIL import Image; import io
im = Image.open(src).convert("RGB"); w, h = im.size
if max(w, h) > 1280:
im = im.resize((int(w*1280/max(w,h)), int(h*1280/max(w,h))), Image.LANCZOS)
buf = io.BytesIO(); im.save(buf, "JPEG", quality=85)
return "data:image/jpeg;base64,%s" % base64.b64encode(buf.getvalue()).decode()
except ImportError:
mime = subprocess.check_output(["file","-b","--mime-type",src]).decode().strip() or "image/png"
with open(src,"rb") as f: return "data:%s;base64,%s" % (mime, base64.b64encode(f.read()).decode())
payload = json.dumps({"model": MODEL, "messages": [{"role": "user", "content": [
{"type": "text", "text": prompt},
{"type": "image_url", "image_url": {"url": img_url(src)}}]}]}).encode()
req = urllib.request.Request(ENDPOINT, data=payload, headers={
"Authorization": "Bearer " + APIKEY, "Content-Type": "application/json"})
try:
with urllib.request.urlopen(req, timeout=120) as r:
print(json.loads(r.read())["choices"][0]["message"]["content"])
except urllib.error.HTTPError as e:
sys.exit("HTTP %d: %s" % (e.code, e.read().decode()[:500]))
PY
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.
- 4d ago First seen · 124 lines · 55 tokens per session scan A 9f08ab0f05c5
zai-vision-analysis-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 55 tokens to every session and 1,564 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
webgl-holographic-foil
A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.
general-video
Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…
html-ppt-hermes-cyber-terminal
OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.
html-ppt-taste-brutalist
16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).
diagnostic-stem-delivery
Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow.
chengfeng-check-updates
An environment manager for a video-editing system. It checks whether its skills and runtime—the software needed to run them—are installed and compatible.