name: json-to-pydantic description: Converts JSON data snippets into Python Pydantic data models.
JSON to Pydantic Skill
This skill helps convert raw JSON data or API responses into structured, strongly-typed Python classes using Pydantic.
Instructions
-
Analyze the Input: Look at the JSON object provided by the user.
-
Infer Types:
string->strnumber->intorfloatboolean->boolarray->List[Type]null->Optional[Type]- Nested Objects -> Create a separate sub-class.
-
Follow the Example: Review
examples/to see how to structure the output code. notice how nested dictionaries likepreferencesare extracted into their own class.- Input:
examples/input_data.json - Output:
examples/output_model.py
- Input:
Style Guidelines
- Use
PascalCasefor class names. - Use type hints (
List,Optional) fromtypingmodule. - If a field can be missing or null, default it to
None.
Skills similaires
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Claude CodeCursoradvanced
890
234
3,226
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
claudeCursorWindsurfbeginner
259
72
1,129
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.
claudeCursorWindsurfintermediate
156
44
999