What problem does it solve?
This skill addresses the fragility of untyped data handling by enforcing strict, runtime validation at system boundaries, preventing deployment errors and data corruption.
Core Features & Use Cases
- Schema Enforcement: Defines robust BaseModel and BaseSettings structures to replace loose dictionaries.
- Advanced Validation: Implements field-level constraints, cross-field invariants, and discriminated unions for complex event payloads.
- Use Case: Use this skill when refactoring API request handlers or configuration loaders to ensure that incoming JSON or environment variables strictly adhere to your application's expected schema before reaching business logic.
Quick Start
Use the pydantic skill to refactor the current module by replacing all dict-based data structures with strict Pydantic v2 models and adding appropriate validation logic.