ai-security

ai-security is a skill for Claude Code from hypnguyen1209/offensive-claude. It costs 81 tokens per session (2,888 once invoked), scanned A, original, MIT.

A guide for security testing of AI and machine-learning systems, including chatbots, retrieval systems, agents, model files, and model APIs. It covers prompt attacks, data poisoning, unsafe tool use, model theft, and privacy risks.

In plain words
What is it for?
Testing prompt injection and jailbreak resistance, RAG or vector-store poisoning, MCP and agent security, model-file deserialization, model extraction, membership inference, and adversarial inputs.
Why use it?
It groups practical tests for finding ways an AI system can be manipulated, leak information, run unintended actions, or load unsafe model artifacts.

Skill for Claude Code

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/model_scan.py ./downloaded_model/ --deep --json out/modelscan.jsonl.

Part of the offensive-claude plugin — 30 skills, 18 commands, 8 agents, 1 hook shipped together

Good fit Testing prompt injection and jailbreak resistance, RAG or vector-store poisoning, MCP and agent security, model-file deserialization, model extraction, membership inference, and adversarial inputs.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/hypnguyen1209/offensive-claude
agentmods
npx agentmods add skills/hypnguyen1209/offensive-claude/ai-security

Made for: Claude Code.

Or install offensive-claude, the plugin that ships this one along with the rest of its 30 skills, 18 commands, 8 agents, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/hypnguyen1209/offensive-claude/ai-security/github.svg)](https://agentmods.dev/skills/hypnguyen1209/offensive-claude/ai-security)
Your own site
<a href="https://agentmods.dev/skills/hypnguyen1209/offensive-claude/ai-security"><img src="https://agentmods.dev/badge/skills/hypnguyen1209/offensive-claude/ai-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 ai-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/hypnguyen1209/offensive-claude/ai-security"><img src="https://agentmods.dev/badge/skills/hypnguyen1209/offensive-claude/ai-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,888 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 67
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium MCP Rug Pull · line 80
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00081 $0.02888
Opus 5 $0.00041 $0.01444
Sonnet 5 $0.00016 $0.00578
Haiku 4.5 $0.00008 $0.00289

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

Security

Grade A, and why

ai-security scanned grade A with 2 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 11d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/mcp_tool_audit.py, scripts/model_extractor.py, scripts/model_scan.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| Malicious model load | `REDUCE`/`GLOBAL` opcodes invoking `os`/`posix`/`pip`/`runpy`; child proc from python during `torch.load` | fickling/modelscan/picklescan ≥0.0.22 pre-load scan; EDR: python→cmd/curl spawn; prefer

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

| MCP tool poisoning / RCE | Tool description carrying imperative text; `child_process.exec`/shell metachars; tool-def mutation post-install | Pin & hash tool manifests; alert on dynamic re-registration; `execFile` not `
skills/ai-security/SKILL.md · 111 lines

How it starts

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

AI/ML Security

When to Activate

  • Red-teaming an LLM/chatbot/copilot for direct & indirect prompt injection and multi-turn jailbreaks.
  • Testing a RAG pipeline for document/embedding poisoning, embedding inversion, and cross-tenant retrieval leakage.
  • Auditing an AI agent / MCP server for tool poisoning, excessive agency, and command injection (RCE).
  • Scanning a model artifact (HuggingFace, .pt/.pkl/.bin/.gguf) for deserialization payloads before loading it.
  • Assessing a model API for extraction/distillation, membership inference, and adversarial-suffix robustness.
  • Mapping findings to OWASP LLM Top-10 (2025) + MITRE ATLAS for a report.

Technique Map

Technique ATT&CK CWE Reference Script
Direct prompt injection / system-prompt leak (LLM01/LLM07) T1059.006, T1606 CWE-1427 references/prompt-injection-jailbreak.md scripts/promptinject_harness.py
Multi-turn jailbreak: Crescendo / Skeleton Key T1059.006 CWE-1427 references/prompt-injection-jailbreak.md scripts/promptinject_harness.py
Best-of-N / many-shot / token-smuggling jailbreak T1059.006, T1027 CWE-1427 references/prompt-injection-jailbreak.md scripts/promptinject_harness.py
Indirect injection via ingested content (EchoLeak CVE-2025-32711) T1190, T1059.006 CWE-74 references/prompt-injection-jailbreak.md scripts/promptinject_harness.py
RAG knowledge-base poisoning (PoisonedRAG, 5 docs) T1195, T1565.001 CWE-349 references/rag-vector-poisoning.md scripts/rag_poisoner.py
Embedding-collision / RAG-spraying retrieval hijack T1195.001 CWE-349 references/rag-vector-poisoning.md scripts/rag_poisoner.py
Embedding inversion (reconstruct input from vectors) T1552, T1213 CWE-202 references/rag-vector-poisoning.md scripts/rag_poisoner.py
MCP tool poisoning / rug-pull (CVE-2025-54136/54135) T1195.001, T1059.006 CWE-74 references/agentic-mcp-exploitation.md scripts/mcp_tool_audit.py
MCP command injection RCE (CVE-2025-6514/53107) T1059, T1059.004 CWE-78 references/agentic-mcp-exploitation.md scripts/mcp_tool_audit.py
Excessive agency / confused-deputy tool abuse (LLM06) T1190, T1648 CWE-862 references/agentic-mcp-exploitation.md scripts/mcp_tool_audit.py
Pickle model RCE (CVE-2025-32434, CVE-2024-50050) T1195.002, T1059.006 CWE-502 references/ml-supply-chain.md scripts/model_scan.py
Inference-server pickle RCE (vLLM CVE-2025-32444) T1190, T1203 CWE-502 references/ml-supply-chain.md scripts/model_scan.py
picklescan-bypass smuggling (CVE-2025-1716/1889/1944/1945) T1195.002, T1027 CWE-646 references/ml-supply-chain.md scripts/model_scan.py
Model extraction / distillation (LoRD, logit-layer steal) T1606, T1213 CWE-200 references/model-extraction-adversarial.md scripts/model_extractor.py
Membership inference (training-data exposure) T1213, T1552 CWE-200 references/model-extraction-adversarial.md scripts/model_extractor.py
Adversarial suffix (GCG) / model inversion T1606 CWE-1039 references/model-extraction-adversarial.md scripts/model_extractor.py

Read the full file on GitHub · 111 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. 11d ago First seen · 111 lines · 81 tokens per session scan A a89224ecb71b

Subscribe to this mod's changes

ai-security is a skill published in the GitHub repository hypnguyen1209/offensive-claude (357 stars, last pushed 24d ago), licensed MIT. It adds 81 tokens to every session and 2,888 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). 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

801-regulations-eu-ai-act

Use when reviewing, designing, or modifying Java enterprise systems that use AI, LLMs, AI agents, RAG, tool calling, workflow automation, or model-based decision support and need EU AI Act regulatory awareness. This should trigger for requests such as Review a Java AI system for EU AI Act controls; Design governance…

jabrena/plinth · 108 tokens

context-retrieval

Retrieve relevant information from a knowledge base using semantic, keyword, or hybrid search to ground a query. Use when the task starts with a corpus or index that must be searched; use context-ranking when candidate chunks already exist and only need ordering.

seb1n/awesome-ai-agent-skills · 53 tokens

knowledge-graph-creation

Build structured knowledge graphs from unstructured text by extracting entities, mapping relationships, generating graph triples, and visualizing the result. Use when the user requests knowledge graph creation or provides relevant inputs for this workflow.

seb1n/awesome-ai-agent-skills · 47 tokens

context-ranking

Rank an existing set of context chunks by relevance, diversity, freshness, and utility. Use when retrieval has already produced candidates that must be scored or reranked; use context-retrieval when the source corpus still needs to be searched.

seb1n/awesome-ai-agent-skills · 50 tokens

llm-prompt-injection

Use when testing an authorized LLM application for prompt injection, system-prompt exposure, unsafe tool use, or RAG data-boundary failures.

uphiago/recon-skills · 36 tokens

leann-search

Semantic search across codebase using LEANN vector index.

parcadei/Continuous-Claude-v3 · 14 tokens