#315 by GitHub stars

datamodel-code-generator/datamodel-code-generator

Generate Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON/YAML/CSV.

History

Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.

View weekly changes

skills/datamodel-code-generator/SKILL.md

Week of Nov 2, 2026 · Line counts unavailable

Before Not checked yet → After Instructions only

First observation → 18037efa3d1f

No earlier version was observed for comparison.

Compare on GitHub

tests/data/expected/agent_skill/preserved_skill/SKILL.md

Week of Nov 2, 2026 · Line counts unavailable

Before Not checked yet → After Instructions only

First observation → 18037efa3d1f

No earlier version was observed for comparison.

Compare on GitHub

View on GitHubAdd to my skills

Verified commit 18037efa3d1f692dfeb90e2cd8152039c0a71f4d

git clone --filter=blob:none --no-checkout https://github.com/datamodel-code-generator/datamodel-code-generator.git .hotskills/datamodel-code-generator-datamodel-code-generator && git -C .hotskills/datamodel-code-generator-datamodel-code-generator checkout --detach 18037efa3d1f692dfeb90e2cd8152039c0a71f4d # Copy each selected skill directory from .hotskills/datamodel-code-generator-datamodel-code-generator into .claude/skills/<skill-name>/
git clone --filter=blob:none --no-checkout https://github.com/datamodel-code-generator/datamodel-code-generator.git .hotskills/datamodel-code-generator-datamodel-code-generator && git -C .hotskills/datamodel-code-generator-datamodel-code-generator checkout --detach 18037efa3d1f692dfeb90e2cd8152039c0a71f4d # Copy each selected skill directory from .hotskills/datamodel-code-generator-datamodel-code-generator into .agents/skills/<skill-name>/
4.1kGitHub stars
5stars in 7 days
2skills in this repository
1.1kcommits in 30 days

Heat

5.6
  • Star growth, last 7 daysAhead of 50% of tracked repositories
  • Star growth, last 24 hoursAhead of 74% of tracked repositories
  • Rank movement, last 7 daysNot available
  • Commits, last 30 daysAhead of 99% of tracked repositories
  • Accounts asking about it through MCP, last 7 daysNot available
  • Hot votes this weekAhead of 0% of tracked repositories

Heat never changes the order by stars, and sponsorship never touches it. How heat works

Stars over time

Aug 8, 2026Nov 7, 20264,052

Individual skills in this repository

How it works

datamodel-code-generator

When your agent uses it

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 datamodel-codegen CLI over hand-written model code whenever an input schema, API spec, sample data file, or Python model object exists.

What it loads into context

Frontmatter

177 tokens

Always available to the agent

SKILL.md

2,073 tokens

When the skill is activated

Reference documents

16,828 tokens

Loaded on request

Token counts are estimates. Scripts run separately; they are not counted as reference context.

The playbook

  1. Why use this CLI
  2. Availability check
  3. Option discovery for agents
  4. Input type decision table
  5. Output type decision table
  6. Canonical command
  7. Target Python version
  8. Verification step
  9. What not to do
  10. References

Files

  • ../../.claude-plugin/marketplace.jsonasset411 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • SKILL.mdcore9,044 bytes
  • references/cli-options.mddoc51,657 bytes
  • references/troubleshooting.mddoc6,099 bytes
  • references/workflows.mddoc12,932 bytes
Read SKILL.md

# 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:
View the complete source on GitHub

Skills included

  • datamodel-code-generator

Repository facts

License
MIT
Created
May 29, 2019
Last pushed
Nov 6, 2026
Forks
490
Open issues
152
Project activity
Active

Rank over the last 12 weeks

Now #315 · best #231 · down 41 in 30 days

  1. #282 on Oct 19
  2. #290 on Oct 22
  3. #310 on Nov 4
  4. #311 on Nov 5
  5. #312 on Nov 6
  6. #315 since Nov 7
35 earlier periods
  1. #226 on Aug 8
  2. #233 on Aug 10
  3. #229 on Aug 12
  4. #231 on Aug 16
  5. #237 on Aug 18
  6. #239 on Aug 19
  7. #238 on Aug 20
  8. #239 on Aug 21
  9. #241 on Aug 23
  10. #242 on Aug 24
  11. #241 on Aug 25
  12. #240 on Aug 31
  13. #240 on Sep 2
  14. #250 on Sep 3
  15. #246 on Sep 4
  16. #250 on Sep 7
  17. #251 from Sep 10 to Sep 12
  18. #255 on Sep 13
  19. #257 on Sep 14
  20. #264 on Sep 21
  21. #262 on Sep 22
  22. #263 on Sep 23
  23. #264 on Sep 24
  24. #261 on Sep 26
  25. #267 on Sep 29
  26. #270 on Oct 2
  27. #270 on Oct 5
  28. #272 on Oct 6
  29. #274 on Oct 8
  30. #277 on Oct 9
  31. #274 on Oct 10
  32. #279 on Oct 12
  33. #279 on Oct 14
  34. #280 on Oct 15
  35. #278 on Oct 16

Before you install

Instructions only

Automated signals, not a guarantee

Checked Nov 4, 2026

Not fully analyzed: some files were too long, unreadable or missing. This never lowers the level.

Show 17 notes
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/datamodel-code-generator/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
Show all 11 signals by file

skills/datamodel-code-generator/SKILL.md

  • Network accessline 146
    uvx --from 'datamodel-code-generator[http]' datamodel-codegen \   --url https://example.com/openapi.yaml \
  • Network accessline 147
    --url https://example.com/openapi.yaml \

skills/datamodel-code-generator/references/cli-options.md

  • Network accessline 210
    - `--additional-imports`: Custom imports for output (delimited list input). For example "datetime.date,datetime.datetime" - `--class-decorators`: Custom decorators for generated model classes (delimited list input). For example "@dataclass_
  • Network accessline 211
    - `--class-decorators`: Custom decorators for generated model classes (delimited list input). For example "@dataclass_json(letter_case=LetterCase.CAMEL)". The "@" prefix is optional and will be added automatically if missing. - `--formatter
  • Network accessline 212
    - `--formatters`: Formatters (current default: black, isort; future default: builtin). For Ruff projects, use --formatters ruff-check ruff-format (install with pip install 'datamodel-code-generator[ruff]'). Use --formatters builtin when no 

skills/datamodel-code-generator/references/troubleshooting.md

  • Network accessline 217
    uvx --from 'datamodel-code-generator[http]' datamodel-codegen \   --url https://example.com/openapi.yaml \
  • Network accessline 218
    --url https://example.com/openapi.yaml \
  • Network accessline 226
    uvx --from 'datamodel-code-generator[http]' datamodel-codegen \   --url https://example.com/openapi.yaml \
  • Network accessline 227
    --url https://example.com/openapi.yaml \

skills/datamodel-code-generator/references/workflows.md

  • Network accessline 287
    uvx --from 'datamodel-code-generator[http]' datamodel-codegen \   --url https://example.com/openapi.yaml \
  • Network accessline 288
    --url https://example.com/openapi.yaml \

How the signals fit together

Facts from a static read of the files at the pinned commit. They describe what the code does, not why.

Signal confidence: 11 facts

Works with

Agent compatibility, from the files in this repository
AgentStatusEvidenceInstall to
Claude CodeNativeManifest .claude-plugin/marketplace.json.claude/skills/<skill-name>/
CodexNativeManifest AGENTS.md.agents/skills/<skill-name>/
CursorCompatibleStandard SKILL.md skills/datamodel-code-generator/SKILL.md.cursor/skills/<skill-name>/
Gemini CLICompatibleStandard SKILL.md skills/datamodel-code-generator/SKILL.md.gemini/skills/<skill-name>/
GitHub CopilotCompatibleStandard SKILL.md skills/datamodel-code-generator/SKILL.md.github/skills/<skill-name>/
OpenCodeCompatibleStandard SKILL.md skills/datamodel-code-generator/SKILL.md.opencode/skills/<skill-name>/
  • Native The repository ships a manifest, folder or frontmatter field for this agent.
  • Compatible A standard SKILL.md that this agent can read.
  • Unknown No evidence either way.

Derived automatically from paths, manifests and frontmatter. Not tested on each agent.

Add this badge to your README

It updates every night and links to this page.

datamodel-code-generator/datamodel-code-generator: #315 on hotskills, 4.1k stars

[![datamodel-code-generator/datamodel-code-generator on hotskills](https://hotskills.dev/badge/datamodel-code-generator-datamodel-code-generator.svg)](https://hotskills.dev/skill/datamodel-code-generator-datamodel-code-generator/)