.cursor/skills/nemo-guardrails-skill/SKILL.md
NeMo Guardrails is an open-source Python package for adding programmable guardrails around LLM calls. Use it to block unsafe, malicious, off-topic, or policy-violating user inputs, retrieved RAG content, tool usage, and model responses.
npx skillsauth add chicagopeabodydev-sudo/library_bot_poc nemo-guardrails-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when an LLM-based application needs safety or policy checks before or after model calls.
This is especially relevant for this project because the chatbot flow is:
Use NeMo Guardrails when implementing or improving any of the following:
RailsConfig.from_path(...) or RailsConfig.from_content(...).LLMRails instance from the loaded config.rails.generate(...) or rails.generate_async(...).For this repository, prefer a flow like this:
Keep the rails logic separate from the UI logic so the same checks can also be reused from CLI scripts or tests.
guardrails/ or config/guardrails/.When using NeMo Guardrails with RAG:
kb/.actions.pyCustom actions are useful when project-specific validation is needed. Define them in actions.py with the @action decorator.
Example:
from typing import Optional
from nemoguardrails.actions import action
@action(is_system_action=True)
async def check_blocked_terms(context: Optional[dict] = None) -> bool:
"""Return True when a blocked term is present in the bot response."""
context = context or {}
bot_response = context.get("bot_message", "")
blocked_terms = ["confidential", "proprietary", "secret"]
return any(term in bot_response.lower() for term in blocked_terms)
development
Connects to Supabase-hosted PostgreSQL and pgvector vector databases. Use when storing or querying vector embeddings, building RAG pipelines with Supabase, using vecs for similarity search, or when the user mentions Supabase, pgvector, or vector databases.
development
Builds simple user interfaces in Python. Use when creating chatbots, dashboards, or data apps with Streamlit—especially chat UIs with st.chat_message and st.chat_input, or when the user mentions Streamlit.
data-ai
Defines structured data models with Pydantic BaseModel. Use when defining LLM outputs or inputs for RAG, LlamaIndex structured outputs, or when the user mentions Pydantic, structured output, or response schemas.
data-ai
Used to supplement the data LLMs can use when answering questions by supplying them with custom data generated and managed by llama-index.