ML-MLOps-Portfolio: Skill for Claude Code

.devin/skills/batch-inference/SKILL.md

batch-inference is a skill for Claude Code from DuqueOM/ML-MLOps-Portfolio. It costs 35 tokens per session (1,740 once invoked), scanned A, original, MIT.

A workflow for scheduled batch predictions that scores many rows using the same model and feature code as a live prediction API. It creates a Kubernetes CronJob and writes the results as Parquet files.

In plain words
What is it for?
Use it for recurring bulk scoring, such as running predictions over large datasets on a schedule. It is intended for Kubernetes CronJobs, not one-off scripts or predictions needed immediately during a user action.
Why use it?
It prevents the feature logic used for batch jobs from drifting away from the logic used in training or live predictions. It also avoids sending millions of records through a one-request-at-a-time API.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions AGENTS.md.

This is DuqueOM/ML-MLOps-Portfolio's own configuration. It tells Claude Code how to work on ML-MLOps-Portfolio itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ML-MLOps-Portfolio configures →

Reuse

Borrowing it

Nothing to install: this file belongs to DuqueOM/ML-MLOps-Portfolio. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/DuqueOM/ML-MLOps-Portfolio/main/.devin/skills/batch-inference/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/DuqueOM/ML-MLOps-Portfolio

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/duqueom/ml-mlops-portfolio/batch-inference/github.svg)](https://agentmods.dev/skills/duqueom/ml-mlops-portfolio/batch-inference)
Your own site
<a href="https://agentmods.dev/skills/duqueom/ml-mlops-portfolio/batch-inference"><img src="https://agentmods.dev/badge/skills/duqueom/ml-mlops-portfolio/batch-inference/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 batch-inference

Your own site · 80×15
<a href="https://agentmods.dev/skills/duqueom/ml-mlops-portfolio/batch-inference"><img src="https://agentmods.dev/badge/skills/duqueom/ml-mlops-portfolio/batch-inference.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,740 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.00035 $0.01740
Opus 5.5 $0.00014 $0.00696
Sonnet 5.5 $0.00007 $0.00348
Haiku 4.5 $0.00003 $0.00174

Measured 2mo ago against content hash eca3c605241f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

.devin/skills/batch-inference/SKILL.md · 201 lines

How it starts

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

Batch Inference — scheduled scoring jobs

Real-time /predict serves one request at a time. Batch scoring reuses the SAME feature engineering + model artifact but runs over millions of rows in one process. Sharing the code path prevents training/serving skew AND training/batch skew — the classic silent-ML-failure mode.

When NOT to use this skill

  • Intermittent one-offs — script + argparse inside the service repo suffices; no need for a K8s CronJob.
  • Scoring must happen inline (form submission, checkout flow) — that is real-time; use /predict.
  • Training-adjacent batch (e.g., feature backfill for re-training) — that belongs in the training pipeline, not a batch scoring job.

Architecture

templates/service/
├── app/                 # real-time API (unchanged)
├── src/{service}/
│   ├── predictor.py     # EXISTING: shared predict() — used by both paths
│   └── batch.py         # NEW: batch runner — main() entry
└── k8s/base/
    └── cronjob-batch.yaml   # NEW: scheduled execution

Key principle: both paths import predictor.predict(). Never duplicate feature engineering. Any change to prediction logic auto- propagates to both.

Execution flow

Step 1 — Confirm intent (AUTO, 30s)

Agent confirms:

  • service name + code path exists
  • business cadence (hourly / daily / weekly / monthly)
  • input source (BigQuery table, S3 parquet, GCS folder)
  • output sink (parquet partitioned by date, BigQuery table, RDS)
  • expected row count per run (sizes the K8s resources)

Step 2 — Scaffold src/{service}/batch.py (AUTO)

The scaffolded module MUST:

  1. Read input via a PANDAS/Polars DataFrame
  2. Validate via the SAME Pandera schema used in training (rule 08)
  3. Call predictor.predict_batch(df) — same code as /predict
  4. Emit predictions as partitioned parquet with prediction_id, entity_id, model_version, prediction_score, timestamp
  5. Also call log_prediction() for each row — the closed-loop flywheel works for batch too (ADR-006, D-20/D-22)
  6. Emit metrics:
    • {service}_batch_rows_processed_total
    • {service}_batch_duration_seconds
    • {service}_batch_errors_total

Read the full file on GitHub · 201 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. 2mo ago First seen · 201 lines · 35 tokens per session scan A eca3c605241f

Subscribe to this mod's changes

batch-inference is a skill published in the GitHub repository DuqueOM/ML-MLOps-Portfolio (7 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 1,740 once invoked, about $0.0001 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.

Related

batch-inference compared with skills from other repositories

batch-inference next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
batch-inferenceDuqueOM/ML-MLOps-PortfolioSkill7yesterdayMITA35Claude Code
ecs-genaiaws-samples/sample-apex-skillsSkill92todayMIT-0A259Claude Code, Codex
eks-genaiaws-samples/sample-apex-skillsSkill92todayMIT-0A275Claude Code, Codex
mlopswilliamzujkowski/standardsSkill192mo agoMITA45Claude Code, Codex
setupmlflow/mlflowSkill29kyesterdayApache-2.0A10Claude Code
dstack-prototypingdstackai/dstackSkill2.3kyesterdayMPL-2.0A80Claude Code, Codex
ecspressokayac/ecspressoSkill1.1kyesterdayMITA17Claude Code