Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants. Use when defining API request/response schemas, database models, or data validation in Python applications using Pydantic v2.
.claude/skills/microsoft-pydantic-models-py/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-18 | ✗→✓ | ▲ Improved | 4% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -16% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -26% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -44% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -10% | 0% |
Create Pydantic models following the multi-model pattern for clean API contracts.
Copy the template from assets/template.py and replace placeholders:
{{ResourceName}} → PascalCase name (e.g., Project){{resource_name}} → snake_case name (e.g., project)| Model | Purpose | |-------|---------| | Base | Common fields shared across models | | Create | Request body for creation (required fields) | | Update | Request body for updates (all optional) | | Response | API response with all fields | | InDB | Database document with doc_type |
pythonfrom datetime import datetime from pydantic import BaseModel, ConfigDict, Field class MyModel(BaseModel): model_config = ConfigDict(populate_by_name=True) workspace_id: str = Field(..., alias="workspaceId") created_at: datetime = Field(..., alias="createdAt")
pythonclass MyUpdate(BaseModel): model_config = ConfigDict(populate_by_name=True) name: Optional[str] = Field(None, min_length=1) description: Optional[str] = None
pythonclass MyInDB(MyResponse): doc_type: str = "my_resource"
src/backend/app/models/src/backend/app/models/__init__.py| File | Contents | |------|----------| | references/capabilities.md | Additional non-hero capabilities, operation-group coverage, and production checklists. |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-18 | fail→pass | 10,303 | 8,442 | -18% | 1 | 1 | 0% | 2,061 | 2,139 | +4% | 0 | 0 | — |
case-01 | fail→pass | 11,971 | 8,215 | -31% | 1 | 1 | 0% | 2,764 | 2,328 | -16% | 0 | 0 | — |
case-02 | fail→pass | 14,541 | 8,020 | -45% | 1 | 1 | 0% | 3,135 | 2,327 | -26% | 0 | 0 | — |
case-03 | fail→pass | 14,192 | 5,675 | -60% | 1 | 1 | 0% | 3,116 | 1,737 | -44% | 0 | 0 | — |
case-04 | pass→pass | 7,335 | 6,512 | -11% | 1 | 1 | 0% | 1,472 | 1,832 | +24% | 0 | 0 | — |
case-05 | pass→pass | 6,989 | 5,537 | -21% | 1 | 1 | 0% | 1,290 | 1,635 | +27% | 0 | 0 | — |
case-06 | pass→pass | 9,348 | 5,621 | -40% | 1 | 1 | 0% | 1,770 | 1,643 | -7% | 0 | 0 | — |
case-07 | fail→pass | 11,143 | 7,469 | -33% | 1 | 1 | 0% | 2,238 | 2,015 | -10% | 0 | 0 | — |
case-08 | fail→pass | 6,119 | 7,813 | +28% | 1 | 1 | 0% | 1,292 | 2,045 | +58% | 0 | 0 | — |
case-19 | fail→fail | 6,824 | 1,915 | -72% | 1 | 1 | 0% | 1,434 | 788 | -45% | 0 | 0 | — |
case-09 | pass→pass | 7,790 | 4,351 | -44% | 1 | 1 | 0% | 1,503 | 1,372 | -9% | 0 | 0 | — |
case-10 | fail→pass | 14,069 | 7,164 | -49% | 1 | 1 | 0% | 2,822 | 1,916 | -32% | 0 | 0 | — |
case-11 | pass→pass | 8,794 | 8,880 | +1% | 1 | 1 | 0% | 2,010 | 2,357 | +17% | 0 | 0 | — |
case-12 | fail→pass | 10,363 | 3,132 | -70% | 1 | 1 | 0% | 2,072 | 1,043 | -50% | 0 | 0 | — |
case-13 | pass→pass | 15,805 | 6,984 | -56% | 1 | 1 | 0% | 3,415 | 2,101 | -38% | 0 | 0 | — |
case-14 | fail→pass | 7,007 | 7,768 | +11% | 1 | 1 | 0% | 1,585 | 2,139 | +35% | 0 | 0 | — |
case-15 | pass→pass | 6,478 | 3,138 | -52% | 1 | 1 | 0% | 1,335 | 1,048 | -21% | 0 | 0 | — |
case-16 | fail→pass | 14,773 | 7,242 | -51% | 1 | 1 | 0% | 3,020 | 2,044 | -32% | 0 | 0 | — |
case-17 | fail→pass | 12,605 | 11,788 | -6% | 1 | 1 | 0% | 2,716 | 3,089 | +14% | 0 | 0 | — |
case-20 | fail→pass | 13,463 | 8,962 | -33% | 1 | 1 | 0% | 3,131 | 2,552 | -18% | 0 | 0 | — |
case-21 | pass→pass | 10,176 | 8,059 | -21% | 1 | 1 | 0% | 2,392 | 2,334 | -2% | 0 | 0 | — |
case-22 | fail→pass | 5,772 | 4,816 | -17% | 1 | 1 | 0% | 1,234 | 1,511 | +22% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +59 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.