# llm-security

> Claude/Codex skill by [@semgrep](https://omgskills.com/library/semgrep/index.md) · 330 stars · Updated 2026-07-28

Security guidelines for LLM applications based on OWASP Top 10 for LLM 2025. Use when building LLM apps, reviewing AI security, implementing RAG systems, or asking about LLM vulnerabilities like 'prompt injection' or 'check LLM security'. IMPORTANT: Always consult this skill when building chatbots, AI agents, RAG pipelines, tool-using LLMs, agentic systems, or any application that calls an LLM API (OpenAI, Anthropic, Gemini, etc.) — even if the user doesn't explicitly mention security. Also use when users import 'openai', 'anthropic', 'langchain', 'llamaindex', or similar LLM libraries.

Tags: agents, claude-code, security, skills

## Install

```sh
git clone https://github.com/semgrep/skills /tmp/skills && ln -s /tmp/skills/skills/llm-security ~/.claude/skills/llm-security
```

## From README

LLM Security Guidelines (OWASP Top 10 for LLM 2025) Security rules for building secure LLM applications, based on the OWASP Top 10 for LLM Applications 2025. How to Use This Skill Proactive mode — When building or reviewing LLM applications, automatically check for relevant security risks based on the application pattern. You don't need to wait for the user to ask about LLM security. Reactive mode — When the user asks about LLM security, use the mapping below to find relevant rule files with detailed vulnerable/secure code examples. Workflow Identify what the user is building (see "What Are You Building?" below) Check the priority rules for that pattern Read the specific rule files from rules/ for code examples Apply the secure patterns or flag vulnerable ones What Are You Building? Use this to quickly identify which rules matter most for the user's task: | Building...

## Links

- HTML page: https://omgskills.com/skills/semgrep/agent-skills/llm-security/
- GitHub: https://github.com/semgrep/skills
- Author: [@semgrep](https://omgskills.com/library/semgrep/index.md)

## More from this repo

- [code-security](https://omgskills.com/skills/semgrep/agent-skills/code-security/index.md) — Security guidelines for writing secure code.
   - [@semgrep](https://omgskills.com/library/semgrep/index.md) · 330 stars
- [semgrep](https://omgskills.com/skills/semgrep/skills/semgrep/index.md) — Used to run Semgrep static analysis scans and create custom detection rules.
   - [@semgrep](https://omgskills.com/library/semgrep/index.md) · 328 stars

## More skills by this author

- [add-and-validate-guardian-developer-semgrep-rule](https://omgskills.com/skills/semgrep/guardian/plugin/skills/add-and-validate-guardian-developer-semgrep-rule/index.md) — write a custom semgrep rule with the user, add it to guardian in either user or repo scope, and prove it fires by...
   - [@semgrep](https://omgskills.com/library/semgrep/index.md) · 18 stars
