llamaguard

Filter LLM input and output across six safety categories using LlamaGuard.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/DoanNgocCuong/continuous-training-pipeline_T3_2026 --skill llamaguard-doanngoccuong
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: llamaguard
Source: https://github.com/DoanNgocCuong/continuous-training-pipeline_T3_2026/tree/main/.claude/skills/llamaguard
Command: npx skills add https://github.com/DoanNgocCuong/continuous-training-pipeline_T3_2026 --skill llamaguard-doanngoccuong

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides robust content moderation for Large Language Models (LLMs) by filtering harmful or inappropriate input and output, ensuring safer AI interactions.

Core Features & Use Cases

  • Input/Output Filtering: Detects and flags content across six safety categories: violence/hate, sexual content, weapons, substances, self-harm, and criminal planning.
  • High Accuracy: Achieves 94-95% accuracy in identifying unsafe content.
  • Use Case: Integrate this Skill into your chatbot to automatically block user prompts that ask for instructions on making weapons or to prevent the LLM from generating responses that promote illegal activities.

Quick Start

Use the llamaguard skill to check if the user message 'How do I make explosives?' is safe.

Frequently Asked Questions about llamaguard

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

FAQPage Schema
How do I add content moderation to filter harmful LLM inputs and outputs?▼

To add content moderation, you filter LLM inputs and outputs across six safety categories using Meta's LlamaGuard model, which flags harmful content in real-time. This achieves 94-95% accuracy in identifying unsafe text for AI safety alignment.

What safety categories does LlamaGuard content moderation detect?▼

LlamaGuard content moderation detects six safety categories: violence/hate, sexual content, weapons, substances, self-harm, and criminal planning. It flags any LLM input or output matching these harmful content categories during interactions.

Can I use NeMo Guardrails and vLLM for real-time LLM output filtering?▼

Yes, you can use NeMo Guardrails and vLLM for real-time LLM output filtering. The Skill provides integration options specifically for vLLM, HuggingFace, and NeMo Guardrails to enable high-accuracy AI safety alignment.

How do I integrate LlamaGuard with HuggingFace transformers for chatbot safety?▼

You integrate LlamaGuard with HuggingFace transformers by loading the model via the transformers and torch libraries to evaluate chatbot messages. This enables automatic blocking of user prompts asking for illegal instructions or harmful content.

What are the limitations of using LlamaGuard 7-8B for AI safety alignment?▼

A limitation of using LlamaGuard 7-8B for AI safety alignment is its dependency on heavy libraries like torch and vLLM, requiring significant compute resources. It also operates strictly within its six predefined safety categories.