.cursor/skills/pydantic-skill/SKILL.md
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.
npx skillsauth add chicagopeabodydev-sudo/library_bot_poc pydantic-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.
Pydantic models group related fields into a single component. In RAG applications, they define structured output—the expected format the LLM returns (e.g., answer plus citations, confidence scores). They can also define structured input for tool calls or extraction pipelines.
Each field needs at minimum:
int, str, List[str])Pydantic models can contain other models as fields:
from typing import List
from pydantic import BaseModel, Field
class Song(BaseModel):
"""Data model for a song."""
title: str
length_seconds: int
class Album(BaseModel):
"""Data model for an album."""
name: str
artist: str
songs: List[Song]
field_name: typeField(..., description="...") to guide the LLM on what to populatesummary: str = Field(
..., description="A concise summary of this text chunk."
)
llm.as_structured_llm(output_cls=YourModel) and pass the structured LLM to index.as_query_engine(llm=sllm) so RAG queries return Pydantic objects.PydanticProgramExtractor or OpenAIPydanticProgram for extracting structured data from documents.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.
tools
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.
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.