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.
curl -O https://raw.githubusercontent.com/DuqueOM/ML-MLOps-Portfolio/main/.devin/skills/batch-inference/SKILL.mdgit clone --depth 1 https://github.com/DuqueOM/ML-MLOps-PortfolioWrote 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/duqueom/ml-mlops-portfolio/batch-inference)<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.
<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>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.00035 | $0.01740 |
| Opus 5.5 | $0.00014 | $0.00696 |
| Sonnet 5.5 | $0.00007 | $0.00348 |
| Haiku 4.5 | $0.00003 | $0.00174 |
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.
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:
- Read input via a PANDAS/Polars DataFrame
- Validate via the SAME Pandera schema used in training (rule 08)
- Call
predictor.predict_batch(df)— same code as/predict - Emit predictions as partitioned parquet with
prediction_id,entity_id,model_version,prediction_score,timestamp - Also call
log_prediction()for each row — the closed-loop flywheel works for batch too (ADR-006, D-20/D-22) - Emit metrics:
{service}_batch_rows_processed_total{service}_batch_duration_seconds{service}_batch_errors_total
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 · 201 lines · 35 tokens per session scan A eca3c605241f
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.
batch-inference compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| batch-inferenceDuqueOM/ML-MLOps-Portfolio | Skill | 7 | yesterday | MIT | A | 35 | Claude Code |
| ecs-genaiaws-samples/sample-apex-skills | Skill | 92 | today | MIT-0 | A | 259 | Claude Code, Codex |
| eks-genaiaws-samples/sample-apex-skills | Skill | 92 | today | MIT-0 | A | 275 | Claude Code, Codex |
| mlopswilliamzujkowski/standards | Skill | 19 | 2mo ago | MIT | A | 45 | Claude Code, Codex |
| setupmlflow/mlflow | Skill | 29k | yesterday | Apache-2.0 | A | 10 | Claude Code |
| dstack-prototypingdstackai/dstack | Skill | 2.3k | yesterday | MPL-2.0 | A | 80 | Claude Code, Codex |
| ecspressokayac/ecspresso | Skill | 1.1k | yesterday | MIT | A | 17 | Claude Code |