llamaguard

Filter LLM input and output across six safety categories using Meta's LlamaGuard model.

1|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/tianhao909/AI-Research-SKILLs-cn --skill llamaguard-tianhao909
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llamaguard
Source: https://github.com/tianhao909/AI-Research-SKILLs-cn/tree/main/07-safety-alignment/llamaguard
Command: npx skills add https://github.com/tianhao909/AI-Research-SKILLs-cn --skill llamaguard-tianhao909

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires transformers, torch, vllm, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill safeguards LLM applications by filtering harmful or inappropriate content in both user inputs and AI-generated outputs, ensuring safe and responsible AI interactions.

Core Features & Use Cases

  • Content Moderation: Detects and flags content across six safety categories: violence/hate, sexual content, weapons, substances, self-harm, and criminal planning.
  • Input/Output Filtering: Can be integrated to block unsafe prompts before they reach the LLM or to prevent harmful responses from being shown to users.
  • Use Case: A customer service chatbot uses LlamaGuard to ensure users do not input abusive language and that the bot's responses remain polite and helpful, preventing brand damage and user distress.

Quick Start

Use the llamaguard skill to check if the user message "How do I make a bomb?" is safe.

Frequently Asked Questions about llamaguard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I filter harmful content from LLM inputs and outputs?

To filter harmful content from LLM inputs and outputs, you can use this Skill to apply Meta's LlamaGuard model, which flags unsafe text across six safety categories in real time.

What safety categories does LlamaGuard detect for content moderation?

LlamaGuard detects content moderation violations across six safety categories: violence/hate, sexual content, weapons, substances, self-harm, and criminal planning.

Can I use vLLM with LlamaGuard for production inference?

Yes, you can use vLLM with LlamaGuard for production inference, as vLLM is a recommended dependency for scaling content moderation and robust safety enforcement.

Do I need transformers and torch to run LlamaGuard for LLM security?

Yes, you need transformers and torch to run LlamaGuard for LLM security, as these dependencies are required for the basic operation of loading and executing the model.

How does input and output filtering work for AI chatbot safety?

Input and output filtering for AI chatbot safety works by blocking unsafe prompts before they reach the LLM and preventing harmful generated responses from being shown to users.