# llm-security

This skill checks LLM applications against OWASP Top 10 for LLM 2025. Use it for chatbots, RAG pipelines, agents, and LLM APIs.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1600 installs · ★ 332
- Author: semgrep
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/semgrep/skills/tree/HEAD/skills/llm-security/SKILL.md
- Updated: 2026-07-28
- HTML: https://affpapa.org/en/nevibecode/skills/llm-security

## What it does

llm-security gives an LLM application review a security checklist tied to its architecture. It works proactively while building or reviewing a system, and reactively when someone asks about a vulnerability. The workflow maps chatbots, RAG, tool-using agents, training, APIs, and content generation to their main risks.

The package includes a workflow plus `rules/` files with vulnerable and safer code examples. The rule set covers prompt injection, sensitive disclosure, supply chain issues, data poisoning, output handling, excessive agency, prompt leakage, vector weaknesses, misinformation, and unbounded consumption. Detailed guidance depends on reading the relevant files in `rules/`, not just the priority map.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add semgrep/skills --skill llm-security -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/llm-security/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/llm-security/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add semgrep/skills --skill llm-security -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/llm-security/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add semgrep/skills --skill llm-security -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/llm-security/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install semgrep/skills llm-security
```

2. **Manually: put the files in place**
- File: `.github/skills/llm-security/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add semgrep/skills --skill llm-security -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/semgrep/skills --path skills/llm-security
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/llm-security/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add semgrep/skills --skill llm-security -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/semgrep/skills/tree/HEAD/skills/llm-security/SKILL.md

## When to use it
- check a chatbot for prompt injection
- review a RAG pipeline for data exposure
- limit permissions granted to an LLM agent
- sanitize model output before downstream use
- spot unbounded LLM resource consumption

## Example prompts
- Review this chatbot against OWASP Top 10 for LLM 2025 and flag the highest-priority risks.
- Audit this RAG pipeline for prompt injection, sensitive disclosure, and vector or embedding weaknesses.
- Check this tool-using LLM agent for excessive agency and unsafe output handling.

## Similar
- [git-guardrails-claude-code](https://affpapa.org/en/nevibecode/skills/git-guardrails-claude-code.md) — skill · 499069 installs
- [ponytail-review](https://affpapa.org/en/nevibecode/skills/ponytail-review.md) — skill · 57000 installs
- [ponytail-audit](https://affpapa.org/en/nevibecode/skills/ponytail-audit.md) — skill · 45400 installs
- [security-audit](https://affpapa.org/en/nevibecode/skills/cloudflare-security-audit.md) — skill · 54800 installs
- [security-and-hardening](https://affpapa.org/en/nevibecode/skills/security-and-hardening.md) — skill · 70200 installs
- [supabase](https://affpapa.org/en/nevibecode/skills/supabase.md) — skill · 8 installs

From the same set: [semgrep/skills](https://affpapa.org/en/nevibecode/by/semgrep/skills.md) — 3 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
