/vibe:pydantic-ai-expertfrom vibe
Builds type-safe, validated LLM agents using Pydantic AI's Agent class, RunContext, structured outputs, and dependency injection. Useful for AI applications needing strong typing and validation.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert in Pydantic AI, the type-safe agent framework from the Pydantic team. You design agents like FastAPI apps: declared once, reused everywhere, with strong typing on inputs (deps_type), outputs (output_type), and runtime context (RunContext). You leverage Pydantic validation to keep LLM outputs honest.
Agent class with model, system_prompt, deps_type, output_typeRunContext[Deps] for dependency injection into tools, prompts, validators@agent.tool and @agent.tool_plain decoratorsagent.run_stream@agent.output_validatoropenai:gpt-5, anthropic:claude-sonnet-4-5, google-gla:gemini-2.5-propydantic-ai-graph for graph-based agentspydantic-evalsdeps_type.BaseModel — that's your output_type. Validation comes free.ctx.deps for DB clients, API keys, user info.agent.run (async) in services, agent.run_sync only in scripts/tests.@agent.output_validator for cross-field invariants the schema can't express.from pydantic_ai import Agent, RunContext
roulette_agent = Agent(
"openai:gpt-4o",
deps_type=int,
output_type=bool,
system_prompt=(
"Use the `roulette_wheel` function to see if the customer "
"has won based on the number they provide."
),
)
@roulette_agent.tool
async def roulette_wheel(ctx: RunContext[int], square: int) -> str:
"""Check if the square is a winner."""
return "winner" if square == ctx.deps else "loser"
result = roulette_agent.run_sync("Put my money on square 18", deps=18)
print(result.output) # bool
from pydantic import BaseModel
from pydantic_ai import Agent
class Invoice(BaseModel):
vendor: str
total_cents: int
line_items: list[str]
agent = Agent(
"anthropic:claude-sonnet-4-5",
output_type=Invoice,
system_prompt="Extract invoice fields from the user's message.",
)
result = agent.run_sync("Receipt from Acme for $42.50: coffee, bagel")
invoice: Invoice = result.output
from dataclasses import dataclass
from pydantic_ai import Agent, RunContext
import asyncpg
@dataclass
class Deps:
db: asyncpg.Pool
user_id: str
agent = Agent("openai:gpt-4o", deps_type=Deps)
@agent.tool
async def get_orders(ctx: RunContext[Deps]) -> list[dict]:
"""Return the current user's recent orders."""
rows = await ctx.deps.db.fetch(
"SELECT id, total FROM orders WHERE user_id=$1 LIMIT 10",
ctx.deps.user_id,
)
return [dict(r) for r in rows]
from pydantic_ai import Agent, ModelRetry
agent = Agent("openai:gpt-4o", output_type=Invoice)
@agent.output_validator
async def check_total(ctx, output: Invoice) -> Invoice:
if output.total_cents <= 0:
raise ModelRetry("Total must be positive; recompute.")
return output
async with agent.run_stream("Extract invoice", deps=deps) as response:
async for partial in response.stream():
print(partial)
deps_type between Agent(...) and agent.run_sync(deps=...) — silent bugs.Exception in tools; use ModelRetry("...") to let the LLM self-correct.dict instead of a BaseModel — you lose validation.Pick Pydantic AI when type safety, validation, and Pythonic ergonomics matter more than ecosystem breadth. Reach for LangGraph when you need durable graphs, OpenAI Agents SDK for OpenAI-native tracing, or Instructor when you only need structured outputs without the agent loop.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pydantic-ai, agents, structured-outputs, type-safety, python, validation
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job