Guide · Agent skill
How to use the AI Security Hardening agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The AI Security Hardening skill gives your agent a reference guide for securing AI and LLM applications against prompt injection, data leakage, model theft and poisoned or malicious model files. It is documentation with example code, not a security product. After working through this guide you will know how to install the skill, ask for it with plain requests, and understand which controls it suggests and where they fall short.
Quick start
- 1Download the ZIP. Get the skill's ZIP from the directory page. It contains SKILL.md.
- 2Unzip into the skills folder. Extract it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one codebase.
- 3Or upload in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the skill.
- 4Describe your AI system. Tell the agent what the app does, what data it handles and which endpoints or agents are exposed.
- 5Ask for a specific control. Request input checks, PII scrubbing, guardrails config or rate limiting, naming the library you use.
- 6Adapt the examples. Replace undefined functions and secrets with your own implementations, then test the controls against real attack inputs.
What the skill makes the agent do
Once installed, the agent has access to a reference guide for hardening LLM deployments. The guide lays out a threat model that maps each AI-specific threat to a risk and a control: prompt injection leads to system prompt override and is addressed with input sanitization and separate context; data exfiltration leads to PII in model outputs and is addressed with output filtering and DLP scanning; model theft leads to weight extraction via API and is addressed with rate limiting and access controls.
The skill also includes example code for input checks, output PII scrubbing with Presidio, NeMo Guardrails configuration, and token and rate-limit patterns for LLM API endpoints. The guide is explicit that regex-based detection is not a real security boundary, so the agent should present the examples as illustrations, not as proof that an input or output is safe.
- Threat model table covering prompt injection, data exfiltration, jailbreaking, model theft, training data poisoning, supply chain attacks and insecure output
- Input checks using regex indicators and length and control-character cleanup
- Output PII scrubbing using Presidio analyzer and anonymizer
- NeMo Guardrails config with input and output flows
- FastAPI example with bearer token verification and per-key rate limiting
Install the skill from the ZIP download
Download the ZIP for this skill from the directory page. Unzip it into your personal skills folder, ~/.claude/skills/, so it is available across your projects. If you only want it for one codebase, unzip it into that project's .claude/skills/ folder instead.
If you use the Claude apps rather than a local setup, you can upload the skill under Settings → Capabilities → Skills. The skill folder includes a SKILL.md file, which is the only file in this package.
- Personal install: ~/.claude/skills/
- Project install: the .claude/skills/ folder inside your project
- Claude apps: Settings → Capabilities → Skills, then upload the skill
Trigger the skill with natural requests
You do not need a special command. Describe the task in plain language and mention the security concern. The skill's own description covers hardening AI and LLM deployments against prompt injection, data exfiltration, model theft and supply chain attacks, and its use cases include deploying an LLM app that handles sensitive user data, protecting AI agents from prompt injection, adding output filtering, and preparing SOC2 or ISO 27001 evidence for AI features.
Good requests name the system and the goal. Vague requests such as 'make my AI secure' give the agent little to work with.
- Review my chatbot's FastAPI endpoint for prompt injection and rate-limit gaps.
- Add PII scrubbing to the output of my LLM summarizer using Presidio.
- Draft a NeMo Guardrails config that checks input for jailbreaks and output for PII.
- List the controls I should document for SOC2 evidence on our AI feature.
Example: scrubbing PII from model output
The skill's output filtering section uses Presidio to find and anonymize personal data before a response reaches the user. The entity list below comes from the skill's example and covers names, email addresses, phone numbers, card numbers, US social security numbers, IBAN codes, IP addresses and locations.
Check the entity list against the data your application actually handles. The example only covers the entities listed, and it is written for English text.
PII_ENTITIES = ["PERSON", "EMAIL_ADDRESS", "PHONE_NUMBER", "CREDIT_CARD", "US_SSN", "IBAN_CODE", "IP_ADDRESS", "LOCATION"]What you need before using the examples
The examples need a Python environment. Some are optional: NeMo Guardrails, Microsoft Presidio, FastAPI and PyJWT are the libraries the snippets import. If you use the NeMo example, you also need an LLM provider API key; the skill's config references OpenAI with the gpt-4o-mini model.
The skill's compatibility note says it requires the relevant security tooling, such as scanners or vault CLIs, and an authorized scope for any active assessment. Helper scripts and templates are not bundled, and the skill runs no scripts and makes no network calls itself.
- Python environment for the example code
- Optional libraries: NeMo Guardrails, Microsoft Presidio, FastAPI, PyJWT
- An LLM provider API key if you use the NeMo example
- Security scanners or vault CLIs, if your assessment needs them
Safety notes on scripts, network and enforcement
The skill itself does not run scripts and does not use the network. That does not make the code it suggests safe to deploy. The API example's secret, issuer and audience values, the call_llm function and other project functions are undefined in the guide; you have to supply them, and the rate limiter is an in-process map that the guide says is not a distributed limiter.
Real enforcement has to be server-side. The guide says to enforce tool and data authorization independently of model text, give the model access only to the secrets it needs, and require approval for scoped side effects. Treat any output from the agent as a draft that a qualified engineer reviews before production.
- Bind secret keys and token issuer or audience to a verified trusted configuration
- Require explicit scopes and tenant authorization before any model or tool call
- Use a shared rate limiter for multi-worker production
- Validate the full request schema and size before reading messages
What people use it for
- Reviewing a customer-facing LLM chatbot before launch for prompt injection and PII leakage
- Adding Presidio-based scrubbing to the output of an LLM feature that handles personal data
- Drafting a NeMo Guardrails config with jailbreak and output checks for a team prototype
- Planning rate limits and token checks for an LLM API endpoint
- Listing the AI-specific controls to document for SOC2 or ISO 27001 evidence
Frequently asked questions
Is the AI Security Hardening skill free to use?
The skill is listed under the MIT licence, which is stated in its metadata. Check the licence file linked from the source for the full terms before reusing the code in a product.
What do I need to install the ai-security-hardening skill?
You need the ZIP from the directory page, unzipped into ~/.claude/skills/ or a project's .claude/skills/ folder, or uploaded under Settings → Capabilities → Skills in the Claude apps. The examples also need a Python environment and any optional libraries you choose to use.
Does this skill make my LLM app secure?
No. The guide says regex-based detection can be bypassed and is not a security boundary. It recommends server-side authorization, least-privilege access and approval for side effects as the real controls.
Does the skill run scripts or access the network?
According to its metadata, the skill runs no scripts and uses no network. The example code you adapt may call LLM providers or other services, so review it before running it.
How is this different from NeMo Guardrails or Presidio?
The skill is a reference guide that shows how these tools could fit into an LLM app. NeMo Guardrails and Presidio are libraries you install and configure yourself; the skill does not replace them.
Can I use this for SOC2 or ISO 27001 compliance?
The skill lists SOC2 and ISO 27001 compliance as a use case, and it can help you document AI-specific controls. It does not certify compliance, and an auditor will still need evidence from your own systems.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you are a developer or security engineer who wants a structured checklist and working example code for AI-specific threats before an LLM feature goes to production. Pick something else if you want a finished, drop-in security product or a guaranteed defence, since the examples reference undefined project functions and the guide itself warns that regex filters can be bypassed.
Download the skill