ds-package

ds-package is a skill for Claude Code from StamKavid/last-ds-mile. It costs 77 tokens per session (1,257 once invoked), scanned A, original, MIT.

A packaging step that turns a finished data-science model into a callable service, with a fixed input-and-output agreement and a Docker container. It checks that the service gives the same predictions as the offline model.

In plain words
What is it for?
Use it to define an inference contract, create a prediction wrapper and reproducible Docker image, and verify prediction parity for supported tabular models.
Why use it?
It catches training-and-serving differences before deployment, when a model can appear correct in testing but produce different answers in production.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the last-ds-mile plugin — 29 skills, 17 commands, 3 agents, 4 hooks shipped together

Good fit Use it to define an inference contract, create a prediction wrapper and reproducible Docker image, and verify prediction parity for supported tabular models.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/stamkavid/last-ds-mile/ds-package
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 StamKavid/last-ds-mile --skill ds-package
Clone the repo
git clone --depth 1 https://github.com/StamKavid/last-ds-mile

Made for: Claude Code.

Or install last-ds-mile, the plugin that ships this one along with the rest of its 29 skills, 17 commands, 3 agents, 4 hooks.

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 ds-package

README.md
[![agentmods](https://agentmods.dev/badge/skills/stamkavid/last-ds-mile/ds-package/github.svg)](https://agentmods.dev/skills/stamkavid/last-ds-mile/ds-package)
Your own site
<a href="https://agentmods.dev/skills/stamkavid/last-ds-mile/ds-package"><img src="https://agentmods.dev/badge/skills/stamkavid/last-ds-mile/ds-package/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.

agentmods 80×15 button for ds-package

Your own site · 80×15
<a href="https://agentmods.dev/skills/stamkavid/last-ds-mile/ds-package"><img src="https://agentmods.dev/badge/skills/stamkavid/last-ds-mile/ds-package.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,257 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.
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.00077 $0.01257
Opus 5 $0.00039 $0.00629
Sonnet 5 $0.00015 $0.00251
Haiku 4.5 $0.00008 $0.00126

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

Security

Grade A, and why

ds-package 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 10d 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.

skills/ds-package/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ds-package — Make It Servable, Prove Parity

Overview

/ds-handoff proves the work reruns. This stage makes it serve: it wraps the pinned model behind a stable inference contract, containerizes it reproducibly, and — the point of the stage — proves the packaged model returns the same predictions it produced offline. Training/serving skew is to deployment what target leakage is to modeling: the silent failure that passes every offline check and still ships a wrong answer. This stage exists to catch it before /ds-deploy.

It ships no code itself — it guides you to generate the contract, wrapper, and Dockerfile into your own project under .last-ds-mile/package/.

When to Use

  • After /ds-handoff has produced a pinned environment, a serialized model artifact, and a model card, and the model is ready to become a callable service.
  • NOT for further tuning or re-evaluation — if the model isn't finished, go back to /ds-model or /ds-evaluate.
  • NOT for text, vision, recommenders, or forecasting stacks — outside plugin scope.

Core Process

  1. Gate check. Confirm the /ds-handoff artifacts exist: a pinned environment (lockfile or exact-version requirements.txt/environment.yml), a serialized model with its version and training-data hash/date, and a model card. If any is missing, produce it now (run /ds-handoff's work inline), say plainly that you did, then continue — this pre-check is a discipline gate; only the parity check below (step 5) is the safety gate worth stopping for.
  2. Write the inference contract to .last-ds-mile/package/contract.json: the input schema (column names, dtypes, allowed ranges, known categories — derived from the training data) and the output schema (the prediction, plus probability/uncertainty if the model emits it). This is the frozen interface the service promises.
  3. Write a thin, framework-agnostic predict wrapper to .last-ds-mile/package/predict.py (or the project's language equivalent): a predict(rows) -> preds that loads the pinned artifact and carries no notebook state or globals. It wraps whatever the model is — sklearn, an AutoGluon predictor, a plain function — behind the one contract.
  4. Validate at the boundary. The wrapper rejects or flags rows that violate the contract (out-of-range values, unseen categories) — the serving-time analog of the /ds-data sanitization gate.
  5. Parity gate (the signature check). Run the wrapper over the held/eval rows and assert it reproduces the offline predictions — exact for a deterministic model, or within a documented epsilon for a float path where hardware/library differences apply. If parity fails, stop. A mismatch means a feature is computed differently at serve time than at train time; fix the wrapper (or the feature) before continuing.
  6. Containerize reproducibly. Generate .last-ds-mile/package/Dockerfile that builds the image from the pinned environment + the serialized artifact + the predict wrapper, plus a smoke test that loads the model and scores one row. Build locally and record the resulting image digest — never commit the image binary.
  7. Write .last-ds-mile/stages/11-package.md: the contract summary, the parity result (tolerance used and outcome), the image digest, and the smoke-test result.

Read the full file on GitHub · 87 lines

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. 10d ago First seen · 87 lines · 77 tokens per session scan A f718e63c2bca

Subscribe to this mod's changes

ds-package is a skill published in the GitHub repository StamKavid/last-ds-mile (3 stars, last pushed 1mo ago), licensed MIT. It adds 77 tokens to every session and 1,257 once invoked, about $0.0004 per session on Opus 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.

Related

Other skills, from other repositories

marimo-pair

Work inside the user's live marimo notebook from the code editor: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes through code mode. Use whenever you create, analyze, or improve the user's marimo notebook.

marimo-team/marimo · 57 tokens

fill-model-descriptions

Fill missing and refresh obsolete model descriptions in packages/llm-info/data/models.yml by querying OpenRouter and provider documentation. Use when the user asks to populate model descriptions, enrich the model catalog, or curate descriptions after running pnpm sync-models.

marimo-team/marimo · 58 tokens

ml-expert

Expert-level machine learning, deep learning, model training, and MLOps. Use when the user mentions machine learning, deep learning, neural networks, MLOps, or data science, or when the task involves Machine Learning Fundamentals, Data Preparation, or Model Training.

personamanagmentlayer/pcl · 58 tokens

scomp-link

End-to-end ML toolkit with 26 CLI commands. Use when training models, tuning hyperparameters, detecting data drift, generating HTML reports with charts, profiling datasets, detecting anomalies, forecasting time series, checking fairness, or serving models as REST APIs. Prefer over raw sklearn when you need automated…

GiacomoSaccaggi/scomp_link · 74 tokens

agentic-data-science-competition

AI Agent-driven Kaggle competition workflow. Learn from real competition experience: score stabilization patterns, submission troubleshooting, kernel workflows, GPU task delegation, and the spec-driven development approach that achieved top leaderboard positions. Use when: working on any Kaggle competition, analyzing…

Mirannonarbitrable290/agentic-kaggle-skill · 76 tokens

companion-clis

Companion CLIs for Runpod workflows — HuggingFace, GitHub, Docker, and AWS.

gaelic-ghost/socket · 26 tokens