All skills
rominirani avatar

/json-to-pydantic

@903242f

Converts JSON data snippets into Python Pydantic data models.

Use this Skill: https://skilld.dev/gh/rominirani/antigravity-skills/json-to-pydantic

This session only. Nothing lands on disk.

SKILL.md

≈20 tokens always: the name and description. ≈222 when used: this file. ≈68 more on demand in 1 file.

JSON to Pydantic Skill

This skill helps convert raw JSON data or API responses into structured, strongly-typed Python classes using Pydantic.

Instructions

  1. Analyze the Input: Look at the JSON object provided by the user.

  2. Infer Types:

    • string -> str
    • number -> int or float
    • boolean -> bool
    • array -> List[Type]
    • null -> Optional[Type]
    • Nested Objects -> Create a separate sub-class.
  3. Follow the Example: Review examples/ to see how to structure the output code. notice how nested dictionaries like preferences are extracted into their own class.

    • Input: examples/input_data.json
    • Output: examples/output_model.py

Style Guidelines

  • Use PascalCase for class names.
  • Use type hints (List, Optional) from typing module.
  • If a field can be missing or null, default it to None.

Source: SKILL.md on GitHub

No alerts14d4 checks · Risk SAFE
  • Gen Agent Trust Hub14d

    The skill is a safe utility for converting JSON data into Python Pydantic models. It provides instructional examples and follows standard development practices for data modeling. No malicious patterns, network exfiltration, or unauthorized command executions were detected.

  • Socket14d

    No alerts

  • Snyk14d

    Risk: LOW · No issues

  • Runlayer7mo

    3 files scanned · No issues

Signed by skilld at 903242f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 9 months ago

README badge

README badge for rominirani/antigravity-skills/json-to-pydantic