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 param087/agent-ml-skills --skill model-servinggit clone --depth 1 https://github.com/param087/agent-ml-skillsWrote 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/param087/agent-ml-skills/model-serving)<a href="https://agentmods.dev/skills/param087/agent-ml-skills/model-serving"><img src="https://agentmods.dev/badge/skills/param087/agent-ml-skills/model-serving/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/param087/agent-ml-skills/model-serving"><img src="https://agentmods.dev/badge/skills/param087/agent-ml-skills/model-serving.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00042 | $0.00718 |
| Opus 5.5 | $0.00017 | $0.00287 |
| Sonnet 5.5 | $0.00008 | $0.00144 |
| Haiku 4.5 | $0.00004 | $0.00072 |
Grade A, and why
model-serving 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Model Serving
Overview
Serving turns a saved model into a reliable, low-latency API. The concerns shift from accuracy to latency, throughput, robustness, and observability. The model artifact and its preprocessing must travel together (use the pipeline from sklearn-pipelines).
When to use
- A validated model needs to be callable by other systems.
- Moving from notebook to production.
Minimal FastAPI service
from fastapi import FastAPI
from pydantic import BaseModel
import joblib, numpy as np
app = FastAPI()
model = joblib.load("model.joblib") # full pipeline: preprocessing + estimator
class Features(BaseModel):
age: float
income: float
country: str
plan: str
@app.get("/health")
def health():
return {"status": "ok"}
@app.post("/predict")
def predict(f: Features):
import pandas as pd
X = pd.DataFrame([f.model_dump()])
proba = float(model.predict_proba(X)[0, 1])
return {"probability": proba, "label": int(proba >= 0.5)}
Run: uvicorn app:app --host 0.0.0.0 --port 8000 --workers 4.
Production checklist
- Load the model once at startup, not per request.
- Validate inputs with Pydantic; return 422 on bad payloads.
- Health/readiness endpoints for orchestrators (k8s).
- Batch requests where possible to raise throughput.
- Timeouts + graceful degradation for downstream calls.
- Version the model in the response (
model_version) for traceability. - Pin the artifact's training env — preprocessing must match training exactly.
Speed: ONNX + quantization
# Export sklearn/torch model to ONNX, then serve with onnxruntime
import onnxruntime as ort
sess = ort.InferenceSession("model.onnx", providers=["CPUExecutionProvider"])
out = sess.run(None, {"input": X.astype(np.float32)})
ONNX runtime + dynamic quantization often gives 2-4x CPU speedups. For LLMs, use vLLM/TGI rather than rolling your own.
Monitoring (don't deploy blind)
- Operational: latency p50/p95/p99, error rate, throughput.
- ML-specific: input feature drift, prediction distribution shift, and (when labels arrive) live metric decay.
- Alert on drift — a silently degrading model is worse than a down one.
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.
- 2mo ago First seen · 85 lines · 42 tokens per session scan A 389cc7559425
model-serving is a skill published in the GitHub repository param087/agent-ml-skills (13 stars, last pushed 5mo ago), licensed MIT. It adds 42 tokens to every session and 718 once invoked, about $0.0002 per session on Opus 5.5. 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-31.
model-serving compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| model-servingparam087/agent-ml-skills | Skill | 13 | 5mo ago | MIT | A | 42 | Claude Code, Codex |
| claude-apiPrismer-AI/PrismerCloud | Skill | 1.4k | 15d ago | MIT | A | 193 | Claude Code, Codex |
| lov-integrate-lovstudio-llm-skilllovstudio/skills | Skill | 72 | 3d ago | MIT | A | 78 | Claude Code |
| Airbyte Connector Config Generatoragentskillexchange/skills | Skill | 61 | yesterday | MIT | A | 46 | Claude Code, Codex |
| kafka-shadowtrafficlensesio/agentic-engineering-for-apache-kafka | Skill | 67 | 2mo ago | MIT | A | 134 | Claude Code |
| powabasepowabase-ai/agent-skills | Skill | 9 | 1mo ago | Apache-2.0 | A | 210 | Claude Code, Codex |
| data-pipelinekensaurus/cursor-kenji | Skill | 9 | 1mo ago | MIT | A | 68 | Claude Code |