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

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

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shieldnet-360/secure-vibe/ml-security
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 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/github.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/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 ml-security

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00085 $0.01915
Opus 5.5 $0.00034 $0.00766
Sonnet 5.5 $0.00017 $0.00383
Haiku 4.5 $0.00009 $0.00192

Measured 1mo ago against content hash d3979787176a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 2mo ago), licensed MIT. It adds 85 tokens to every session and 1,915 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

ai-engineering-toolkit

6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching.

lingxling/awesome-skills-cn · 47 tokens

ai-prompt-regression-testing

Prompt engineering regression test matrix register: baseline outputs, semantic drift thresholds, judge evaluations, and golden dataset.

lingxling/awesome-skills-cn · 28 tokens

prompt-master

Generates optimized prompts for AI tools. Activates only when the user explicitly asks to write, fix, improve, or adapt a prompt for a specific AI tool (LLM, Cursor, Midjourney, image AI, video AI, coding agents, etc.). Does not activate for general conversation, coding tasks, document writing, or other…

nidhinjs/prompt-master · 78 tokens

ai-ethics-review

Conduct a structured ethical review of an AI or ML feature, model, or product. Use when preparing to deploy an AI system, assessing algorithmic risk, auditing a model for bias, or producing a responsible AI impact assessment. Produces a structured ethics review covering fairness, transparency, privacy, safety…

mohitagw15856/pm-claude-skills · 88 tokens

ai-product-canvas

Structure AI and ML product decisions with the rigour of any product decision. Use when building AI-powered features, evaluating LLM integrations, designing AI products, or assessing AI readiness. Produces a complete AI product canvas covering problem definition, model approach, data requirements, evaluation…

mohitagw15856/pm-claude-skills · 73 tokens

model-migration-plan

Plan the migration of an LLM feature from one model to another without breaking production. Use when a model is being deprecated, a newer model looks better or cheaper, or when asked how to upgrade models safely, run shadow traffic, or set rollback criteria for a model change. Produces a phased migration plan with…

mohitagw15856/pm-claude-skills · 99 tokens