inference-serving

inference-serving is a skill for Claude Code, Codex from sawrus/agent-guides. It costs 0 tokens per session (246 once invoked), scanned A, original, MIT.

Guidance for putting a machine-learning model behind an API and making its predictions respond quickly and reliably.

In plain words
What is it for?
Use it to build prediction endpoints, load models at startup, preprocess inputs, log predictions, batch requests, and optimise with formats such as ONNX.
Why use it?
It helps avoid loading or preparing the model on every request and provides patterns for handling failed predictions and high request volumes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build prediction endpoints, load models at startup, preprocess inputs, log predictions, batch requests, and optimise with formats such as ONNX.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sawrus/agent-guides/inference-serving
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.

Any agent
npx skills add sawrus/agent-guides --skill inference-serving
Clone the repo
git clone --depth 1 https://github.com/sawrus/agent-guides

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 inference-serving

README.md
[![agentmods](https://agentmods.dev/badge/skills/sawrus/agent-guides/inference-serving.svg)](https://agentmods.dev/skills/sawrus/agent-guides/inference-serving)
Your own site
<a href="https://agentmods.dev/skills/sawrus/agent-guides/inference-serving"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/inference-serving.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 246 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00000 $0.00246
Opus 5 $0.00000 $0.00123
Sonnet 5 $0.00000 $0.00049
Haiku 4.5 $0.00000 $0.00025

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

Security

Grade A, and why

inference-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 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.

areas/software/mlops/skills/inference-serving/SKILL.md · 36 lines

What it actually says

Skill: Inference Serving

When to load

When deploying a model to an API endpoint or optimizing inference latency.

FastAPI Inference Endpoint

@app.on_event("startup")
def load_model():
    app.state.model = mlflow.pyfunc.load_model("models:/churn-predictor/Production")
    app.state.preprocessor = load_preprocessor()

@app.post("/predict", response_model=PredictionResponse)
def predict(request: PredictionRequest):
    try:
        features = app.state.preprocessor.transform([request.features])
        probability = app.state.model.predict(features)[0]
        log_prediction(request.user_id, request.features, float(probability))
        return PredictionResponse(
            user_id=request.user_id,
            churn_probability=float(probability),
        )
    except Exception as e:
        logger.error("Inference failed", error=str(e))
        return PredictionResponse(user_id=request.user_id, churn_probability=FALLBACK_PROBABILITY)

Latency Checklist

  • Model loaded at startup, not per request
  • Input preprocessing vectorized (batch)
  • ONNX conversion for framework-agnostic optimization
  • Batch inference enabled for high-throughput
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 · 36 lines · 0 tokens per session scan A 9157c8930b94

Subscribe to this mod's changes

inference-serving is a skill published in the GitHub repository sawrus/agent-guides (17 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 246 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-09-03.

Related

Other skills, from other repositories

gemini-interactions-api

Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. This skill covers the…

hamzabellouch/agent-skills · 80 tokens

semantic-search

Professional Semantic Search Expert skill. Build performant, secure, and scalable backend logic and RESTful or GraphQL APIs.

AtulPurohit/Antigravity-Awesome-Skills · 26 tokens

gemini-live-api-dev

Use this skill when building real-time, bidirectional streaming applications with the Gemini Live API. Covers WebSocket-based audio/video/text streaming, voice activity detection (VAD), native audio features, function calling, session management, ephemeral tokens for client-side auth, live translation, and all Live…

hamzabellouch/agent-skills · 88 tokens

gemini-api-dev

Use this skill when building applications with Gemini API hosted models, including Gemini and Gemma 4, working with multimodal content (text, images, audio, video), implementing function calling, using structured outputs, or needing current model specifications. Covers SDK usage (google-genai for Python, @google/genai…

hamzabellouch/agent-skills · 101 tokens

agents-v2-py

Build container-based Foundry Agents with Azure AI Projects SDK (ImageBasedHostedAgentDefinition). Use when creating hosted agents with custom container images in Azure AI Foundry.

sickn33/agentic-awesome-skills · 39 tokens

aws-serverless-eda

AWS serverless and event-driven architecture expert based on Well-Architected Framework. Use when building serverless APIs, Lambda functions, REST APIs, microservices, or async workflows.

sickn33/agentic-awesome-skills · 42 tokens