pydantic
Skill9 starsChanged 10 months agoMITView on GitHub
Pydantic models and validation. Use when: (1) Defining schemas, (2) Validating input/output, (3) Generating JSON schema.
- Installs packages
6 other projects use a version of this.
Adopted by
Most recently taken up by
- ZRMYDYCG/ClaudeCodetheir own version, first seen Sep 13, 2026
- pydantic/skillstheir own version, first seen Sep 11, 2026
- pydantic/pydantictheir own version, first seen Aug 25, 2026
- dallay/agents-skillstheir own version, first seen Aug 13, 2026
- d3vzer0/agent-skillstheir own version, first seen Jul 28, 2026
- arnabdeypolimi/claude_code_setuptheir own version, first seen May 5, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- pydantic/pydantic★ 29ksame name
- pydantic/skills★ 139same name
- arnabdeypolimi/claude_code_setup★ 4same name
- dallay/agents-skills★ 2same name
- d3vzer0/agent-skills★ 1same name
- ZRMYDYCG/ClaudeCode★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- commit-messageSkill
- error-handlingSkill
- excalidraw-aiSkill
- python-backendSkill
- logfireSkill
- lintingSkill
- ty-skillsSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 76
Coercion surprises: use strict types if needed
- Distinctive: line 77
Slow validators: keep them minimal
- Very specific: line 78
Mutable defaults: use default_factory
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
pydantic
Type-driven validation and serialization using Pydantic models.
Overview
Pydantic validates data using Python type hints and provides rich serialization via model_dump() and JSON schema output.
When to Use
- Validating request/response payloads
- Normalizing untrusted input
- Generating JSON schema for docs
Quick Start
uv pip install pydanticfrom pydantic import BaseModel
class User(BaseModel):
id: int
email: str
user = User(id=1, email="a@example.com")Core Patterns
- Typed fields: strict schema definitions.
- Field validators: custom validation logic.
- Model validators: cross-field checks.
- Serialization:
model_dump()andmodel_dump_json(). - Settings: environment-driven config via
BaseSettings.
Example: field_validator
from pydantic import BaseModel, field_validator
class Model(BaseModel):
name: str
@field_validator("name")
@classmethod
def ensure_not_empty(cls, v: str):
if not v:
raise ValueError("name required")
return vExample: model_validate + model_dump
from pydantic import BaseModel
class Model(BaseModel):
foo: int
model = Model.model_validate({"foo": 1})
print(model.model_dump())Troubleshooting
- Coercion surprises: use strict types if needed
- Slow validators: keep them minimal
- Mutable defaults: use
default_factory
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

