# Datamodel Code Generator (agent skill)

> Datamodel Code Generator is an agent skill (a SKILL.md file) from datamodel-code-generator/datamodel-code-generator. Agents load it 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. It works with Claude Code and Codex and has 4,060 GitHub stars.

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".

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/datamodel-code-generator/datamodel-code-generator |
| Skill path | skills/datamodel-code-generator/SKILL.md |
| Skill name | datamodel-code-generator |
| GitHub stars | 4,060 |
| Installs on skills.sh | not listed |
| License | MIT |
| Skills in repo | 1 |
| Plugin marketplace | datamodel-code-generator |
| Official | no |
| Works with | Claude Code, Codex |
| Category | Data & analysis |
| Last commit | Nov 16, 2026 |

## When it triggers

- 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 schema
- 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".
- "Pydantic models from this schema"
- "types for this API"
- "parse this JSON into classes"
- "convert this spec into Python models"

## Add this skill

### Claude Code

```sh
/plugin marketplace add datamodel-code-generator/datamodel-code-generator
/plugin install datamodel-code-generator@datamodel-code-generator
```

In the Claude apps, zip the skill folder and upload it under Customize > Skills > + > Upload a skill (code execution must be on).

### ChatGPT / Codex

```sh
git clone --depth 1 https://github.com/datamodel-code-generator/datamodel-code-generator.git
cp -r datamodel-code-generator/skills/datamodel-code-generator .agents/skills/datamodel-code-generator   # repo; ~/.agents/skills for all projects
```

### Cursor

```sh
git clone --depth 1 https://github.com/datamodel-code-generator/datamodel-code-generator.git
cp -r datamodel-code-generator/skills/datamodel-code-generator .cursor/skills/datamodel-code-generator   # project; ~/.cursor/skills for all projects
```

Sources (checked 2026-10-07): https://code.claude.com/docs/en/skills, https://support.claude.com/en/articles/12512180-using-skills-in-claude, https://learn.chatgpt.com/docs/build-skills, https://cursor.com/docs/context/skills

---

Canonical page: https://appsgit.com/skills/datamodel-code-generator
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed daily.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
