ml-security

ml-security is a skill for Claude Code, Codex from ShieldNet-360/secure-vibe. It costs 85 tokens per session (1,915 once invoked), scanned A, original, MIT.

Security rules for machine-learning models, training data, and notebooks, including how model files are loaded and verified.

In plain words
What is it for?
Use it when loading models from disk, a model hub, or object storage, checking their origin and hashes, or handling training data and model artifacts.
Why use it?
It helps prevent malicious code from running during model loading and reduces risks from untrusted sources, poisoned data, leaked personal information, and hidden notebook output.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/shieldnet-360/secure-vibe/ml-security
Any agent
npx skills add ShieldNet-360/secure-vibe --skill ml-security
Clone the repo
git clone --depth 1 https://github.com/ShieldNet-360/secure-vibe

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 ml-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/ml-security.svg)](https://agentmods.dev/skills/shieldnet-360/secure-vibe/ml-security)
Your own site
<a href="https://agentmods.dev/skills/shieldnet-360/secure-vibe/ml-security"><img src="https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/ml-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,915 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00085 $0.01915
Opus 5 $0.00043 $0.00958
Sonnet 5 $0.00017 $0.00383
Haiku 4.5 $0.00009 $0.00192

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

Security

Grade A, and why

ml-security 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.

skills/ml-security/SKILL.md · 135 lines

How it starts

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

ML Model Security

Rules (for AI agents)

ALWAYS

  • Prefer a tensor-only format — safetensors — for anything you load. It stores arrays and metadata and has no mechanism for executing code, which is the property that matters. A .pt, .pkl, .bin, .ckpt or joblib artifact is a pickle: loading it runs whatever the author put in it, before you see a single weight.
  • Pass weights_only=True to torch.load explicitly, every time. The default has changed across PyTorch releases, so code that relies on it behaves differently depending on the pin — and the flag narrows the surface without removing it, so it is a mitigation rather than a reason to load an untrusted file. deserialization-security owns the pickle boundary itself and the per-language detail; references/artifacts-and-provenance.md has the format-by-format table.
  • Establish provenance before loading: the artifact's hash matches one you recorded from a source you decided to trust, at a revision you pinned. A hash the artifact came with proves only that the file is the file. supply-chain-security owns what makes a source trustworthy, and its rule holds here — a checksum served next to the download is not authentication, and an author's name is not a signature.
  • Pin the Hub revision to an immutable commit, not a branch or tag. main moves, and from_pretrained(..., revision="<sha>") is the difference between a model you reviewed and whatever is there today. Where the loader offers trust_remote_code, understand that enabling it executes repository Python at load time, which is the same exposure as the pickle it was meant to avoid.
  • Bound what user-contributed data can do to a model. Attribute each training record to its source, keep contributed data in a separate pool from curated data, gate promotion between them on review, and cap how much any single contributor can influence one training run. Poisoning does not need many records — it needs enough of them near one behaviour.
  • Treat feedback signals as untrusted training input. Thumbs-up/down, ratings, corrections and RLHF preferences are user-controlled writes into the next model, and they usually arrive through an endpoint nobody thought of as a training pipeline.
  • Record model and dataset versions together with the code that produced them, so a suspected poisoning can be scoped to a training run and rolled back to a known one. Traceability is not prevention; it is what makes the incident finite.
  • Scrub personal data at ingestion, not only at storage. A model trained on personal data memorizes some of it, and no downstream deletion request reaches the weights — deleting the row leaves the trained artifact intact.
  • Treat notebooks as code that carries its own output. Cell outputs commit credentials, data samples and connection strings that were never in the source; clear them before committing, and keep checkpoints, datasets and .ipynb_checkpoints out of the repo.
  • Consult llm-app-security for an application that puts a model in a prompt loop — injection, tool authorization, what the output may reach — and api-security for an inference endpoint's own authentication and rate limits. This skill stops at the artifact and the data that made it.

Read the full file on GitHub · 135 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 135 lines · 85 tokens per session scan A d3979787176a

Subscribe to this mod's changes

ml-security is a skill published in the GitHub repository ShieldNet-360/secure-vibe (22 stars, last pushed 21d ago), licensed MIT. It adds 85 tokens to every session and 1,915 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-30.

Related

Other skills, from other repositories

deno-sandbox

Use when building features that execute untrusted user code, AI-generated code, or need isolated code execution environments. Covers the @deno/sandbox SDK.

denoland/skills · 36 tokens

deno-frontend

Use when building a web frontend with Deno — running React, Vite, Astro, SvelteKit, Next.js, Nuxt or other npm frameworks under Deno, or working with Fresh, Deno's own island-architecture framework. Covers which path to pick, Fresh 2.x routes, handlers, islands, Preact signals, Tailwind, and Fresh 1.x to 2.x migration.

denoland/skills · 88 tokens

web-performance-reviewer

Review web frontends for performance issues by driving the rendered site through Chrome DevTools MCP — throttled performance traces, Core Web Vitals judged against thresholds, network waterfall analysis, and heap-snapshot leak checks for SPAs. Composes on top of web-static, web-sprinkles, or web-components. Strictly…

AdamBien/airails · 193 tokens

web-static

Build modern static websites using semantic HTML and CSS without external dependencies or build systems. Also owns the verification loop for such sites — drives the rendered pages through Chrome DevTools MCP (console, accessibility snapshot, viewport resize, dark/reduced-motion emulation, Lighthouse), executes the…

AdamBien/airails · 183 tokens

zcfg

Integrate zcfg (Zero Dependency Configuration Utility) into Java applications. Use when adding configuration loading, reading properties files, setting up application configuration, or integrating zcfg into a Java project. Triggers on "zcfg", "add configuration", "load properties", "application configuration with…

AdamBien/airails · 75 tokens

zcl

Add colored terminal output to Java applications using zcl (Zero-dependency Colour Logger). Use when adding colored console output, terminal logging with colors, ANSI color support, or integrating zcl into a Java project. Triggers on "zcl", "colored output", "colored logging", "terminal colors", "ANSI colors"…

AdamBien/airails · 85 tokens