Json to pydantic
Skill Melmonster13/antigravity-skills-project/.agents/skills/json-to-pydantic
Converts JSON data snippets into Python Pydantic data models.From its SKILL.md
npx -y skills add Melmonster13/antigravity-skills-project --skill json-to-pydanticAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.0 KB, 234 tokens by cl100k_base, as published. Nobody here has run it
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.
What ships with it: 2 files
603 B alongside SKILL.md, 1 of them executable
examples/
- input_data.json269 B
- output_model.pyruns334 B