# pydantic

Guides your agent in writing Pydantic V2 models, field constraints, and application settings.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 475 installs · ★ 62
- Author: Customer Support Tech Enablement Team
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/manutej/luxor-claude-marketplace/tree/HEAD/plugins/luxor-specialized-tools/skills/pydantic/SKILL.md
- Updated: 2026-06-13
- HTML: https://affpapa.org/en/nevibecode/skills/customer-support-tech-enableme-pydantic

## What it does

This skill guides coding assistants to draft data schemas aligned with Pydantic V2 patterns. It focuses on `BaseModel` construction, serialization via `model_dump`, and custom logic inside `@field_validator`. Examples center on support workflows such as ticket verification and input cleaning.

Code generation relies on `Annotated` typing and `Field` constraints for numbers, lengths, or regex patterns. You need `pydantic>=2.0.0`, `pydantic-settings>=2.0.0`, `email-validator>=2.0.0`, and `python-dotenv>=1.0.0` installed in your Python environment. Integrating endpoints requires `fastapi>=0.100.0`. Without `email-validator`, `EmailStr` checks fail immediately.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill pydantic -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/pydantic/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/pydantic/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill pydantic -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/pydantic/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill pydantic -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/pydantic/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install manutej/luxor-claude-marketplace pydantic
```

2. **Manually: put the files in place**
- File: `.github/skills/pydantic/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill pydantic -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/manutej/luxor-claude-marketplace --path plugins/luxor-specialized-tools/skills/pydantic
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/pydantic/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill pydantic -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/manutej/luxor-claude-marketplace/tree/HEAD/plugins/luxor-specialized-tools/skills/pydantic/SKILL.md

## When to use it
- validate support ticket payloads and filter out spam
- enforce text, URL, and phone constraints using `Field`
- define environment variable schemas with `BaseSettings`
- serialize Python objects using `model_dump` and `model_dump_json`

## Example prompts
- Write a Pydantic V2 support ticket model with length limits on description and allowed priority values
- Add a custom `@field_validator` to reject temporary email domains
- Create a `BaseSettings` class to parse app secrets from a `.env` file

## Similar
- [Python Backend Architecture Review](https://affpapa.org/en/nevibecode/skills/python-backend-architecture-review.md) — skill · 503 installs
- [pydantic-models-py](https://affpapa.org/en/nevibecode/skills/pydantic-models-py.md) — skill · 5 installs
- [python](https://affpapa.org/en/nevibecode/skills/python.md) — skill · 983 installs
- [django-expert](https://affpapa.org/en/nevibecode/skills/django-expert.md) — skill · 5700 installs
- [appwrite-python](https://affpapa.org/en/nevibecode/skills/appwrite-python.md) — skill · 1100 installs
- [py-fast-api](https://affpapa.org/en/nevibecode/rules/py-fast-api.md) — rule · ★ 41024

## Other versions with the same name
- [pydantic · pydantic](https://affpapa.org/en/nevibecode/skills/pydantic.md) — 2200 installs

From the same set: [manutej/luxor-claude-marketplace](https://affpapa.org/en/nevibecode/by/manutej/luxor-claude-marketplace.md) — 65 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
