datamodel-code-generator SKILL.md skillA

datamodel-code-generator from datamodel-code-generator/datamodel-code-generator is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add datamodel-code-generator/datamodel-code-generator/datamodel-code-generator@git:20261031.e0f1f35

Pins git:20261031.e0f1f35 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
datamodel-code-generator/datamodel-code-generator
Path
skills/datamodel-code-generator/SKILL.md
Versions recorded
3
Latest version
git:20261031.e0f1f35, committed Oct 31, 2026
First version recorded
Jun 11, 2026
Size
9,044 bytes
Repository stars
4,048
License
MIT

Use this skill when the user wants Python data models, Pydantic models, dataclasses, TypedDicts, msgspec structs, or type-safe Python classes generated from OpenAPI, AsyncAPI, JSON Schema, GraphQL, JSON/YAML/CSV sample data, MCP tool schemas, Protocol Buffers, XML Schema, Apache Avro, or existing Python model objects. Use it for requests such as "Pydantic models from this schema", "types for this API", "parse this JSON into classes", or "convert this spec into Python models". Prefer the…

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# datamodel-code-generator

## Why use this CLI

Use `datamodel-codegen` whenever a schema, API spec, sample data file, or existing Python model object exists.

The CLI handles refs, enums, nested models, unions, `allOf`, `oneOf`, `anyOf`, and model reuse better than hand-written code.

Do not hand-write generated models first.

## Availability check

Check one-shot execution first:

```bash
uvx --from datamodel-code-generator datamodel-codegen --help
```

If `uvx` is unavailable:

```bash
pipx run datamodel-code-generator --help
```

If the project already uses `uv` and project-scoped execution is preferred:

```bash
uv run --with datamodel-code-generator datamodel-codegen --help
```

If the project already has a managed Python virtual environment and the user approves project dependency changes:

```bash
python -m pip install datamodel-code-generator
datamodel-codegen --help
```

Prefer one-shot execution. Do not add or upgrade datamodel-code-generator in the user's project without explicit approval.

If offline and no installed command is available, say that the CLI cannot be run. Only then fall back to hand-written models.

## Option discovery for agents
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add datamodel-code-generator/datamodel-code-generator/datamodel-code-generator@sha256:997f065bd070e9ed

The line at the top of this page pins the label git:20261031.e0f1f35, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_jdyzmuwpc2724wll.svg)](https://markdownregistry.com/a/art_jdyzmuwpc2724wll)

3 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 3 versions of this file, between Jun 11, 2026 and Oct 31, 2026, about one every 71 days.

versioncommittedcommitsizeaudit
git:20261031.e0f1f35 latest2026-10-31 e0f1f35 9,044 BA view · diff
git:20261018.677aeaa2026-10-18 677aeaa 8,980 BA view · diff
git:20260611.4e62ef32026-06-11 4e62ef3 8,280 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (9044 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

datamodel-code-generator/datamodel-code-generator · 4,048 stars · license MIT · pushed 2026-11-01 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_jdyzmuwpc2724wll
GET https://markdownregistry.com/api/v1/resolve?ref=datamodel-code-generator/datamodel-code-generator/datamodel-code-generator
GET https://markdownregistry.com/api/v1/blob/997f065bd070e9ed2f259115be474d36066af01eae0f493fbb510102ef1bcd78

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from datamodel-code-generator/datamodel-code-generator

AGENTS.md AGENTS.md file
datamodel-code-generator/datamodel-code-generator · AGENTS.md
git:20261101.5611121 · audit A · 4,048 stars
llms-full.txt@docs llms.txt file
datamodel-code-generator/datamodel-code-generator · docs/llms-full.txt
git:20261101.57e0b4f · audit C · 4,048 stars
llms.txt@docs llms.txt file
datamodel-code-generator/datamodel-code-generator · docs/llms.txt
git:20261028.47665fa · audit A · 4,048 stars
preserved_skill SKILL.md skill
datamodel-code-generator/datamodel-code-generator · tests/data/expected/agent_skill/preserved_skill/SKILL.md
git:20260827.3dfce3c · audit C · 4,048 stars

Every file in datamodel-code-generator/datamodel-code-generator

Browse by kind, by grade A, or by owner.