json-to-pydantic
SKILL.md
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.
Weekly Installs
6
Repository
rominirani/anti…y-skillsGitHub Stars
185
First Seen
Jan 31, 2026
Security Audits
Installed on
amp5
gemini-cli5
antigravity5
github-copilot5
codex5
kimi-cli5