The master skill in PlanetScale's official pack: runs a full read-only best-practices assessment of a database or org, then produces one evidence-backed report.
Pydantic ValidationSkill
Summary
Pydantic's official skill for modelling untrusted data in Python — constraints, model hierarchies, validators and serialisation, plus when not to reach for a BaseModel.
Features
- States plainly when Pydantic is the wrong tool and a plain class is better
- Field constraints, model hierarchies, discriminated unions and custom validators
- Validation versus serialisation semantics, including strict and lax coercion
- Ships alongside Logfire, Pydantic AI and Pydantic AI Harness plugins
- Installs into Claude Code, OpenAI Codex and Cursor from one marketplace
Install This Skill
Add this skill to your favorite AI agent in a few steps.
Skill Content
Usage Instructions
Learn how to use this skill with different AI agents.
Example Usage
Ask your agent: "Model this webhook payload with Pydantic — the kind field discriminates three shapes and amounts must be positive decimals."
Description
Pydantic is dataclasses with runtime validation: it reads your type hints and enforces them at the boundary where external data enters your program. Agents reach for it constantly and misuse it in one predictable way — wrapping internal application classes in BaseModel because it is familiar, which costs flexibility, blocks types Pydantic cannot express, and makes post-init mutation awkward for no gain a static type checker was not already providing.
This official Pydantic skill opens by saying exactly that, and it is the most useful line in it: use Pydantic for untrusted external data such as an HTTP API boundary; use plain classes or stdlib dataclasses for objects your own code constructs.
From there it covers the modelling work that is genuinely fiddly — field constraints and Field() configuration, discriminated unions and model hierarchies with subclasses, custom field and model validators, aliasing, strict versus lax coercion, and serialisation behaviour that differs from validation in ways people trip over.
It ships in Pydantic's skills repository alongside plugins for Logfire (instrumentation plus telemetry query and debug commands), Pydantic AI (building LLM agents) and the Pydantic AI Harness (Code Mode extensions). Distributed as a marketplace for Claude Code, OpenAI Codex and Cursor; MIT licensed.
Related Skills
Build crash-safe AI agents on AgentKit and step.ai — durable tool calls, human-in-the-loop approval, realtime progress, and when not to reach for an agent loop at all.
Inngest's durable-execution playbook as an agent skill — steps and memoisation, event and cron triggers, idempotency, cancellation, retries and non-retriable errors.
Temporal's official skill for building durable workflows — SDK patterns across seven languages, plus the determinism rules that decide whether a workflow survives a replay.