Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add VersoXBT/claude-initial-setup --skill pydantic-validationgit clone --depth 1 https://github.com/VersoXBT/claude-initial-setupWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/versoxbt/claude-initial-setup/pydantic-validation)<a href="https://agentmods.dev/skills/versoxbt/claude-initial-setup/pydantic-validation"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/pydantic-validation/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/versoxbt/claude-initial-setup/pydantic-validation"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/pydantic-validation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00077 | $0.01905 |
| Opus 5 | $0.00039 | $0.00953 |
| Sonnet 5 | $0.00015 | $0.00381 |
| Haiku 4.5 | $0.00008 | $0.00191 |
Grade A, and why
pydantic-validation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pydantic Validation
Define strict, self-documenting data schemas with Pydantic v2. Pydantic validates data at the boundary between your application and the outside world, catching bad data before it causes bugs deep in business logic.
When to Use
- User defines FastAPI request/response models
- User validates configuration, API payloads, or form data
- User asks about data validation or serialization
- User builds complex nested data structures
- User needs discriminated unions or custom type validation
Core Patterns
BaseModel and Field Configuration
from pydantic import BaseModel, Field
from datetime import datetime
class CreateUserRequest(BaseModel):
"""Request body for creating a user."""
name: str = Field(min_length=1, max_length=100)
email: str = Field(pattern=r"^[^@]+@[^@]+\.[^@]+$")
age: int = Field(ge=0, le=150)
role: str = Field(default="user", description="User role")
tags: list[str] = Field(default_factory=list, max_length=10)
model_config = {
"str_strip_whitespace": True,
"json_schema_extra": {
"examples": [
{"name": "Alice", "email": "[email protected]", "age": 30}
]
},
}
Field Validators
Use @field_validator for single-field validation and transformation.
from pydantic import BaseModel, field_validator
class Product(BaseModel):
name: str
sku: str
price_cents: int
category: str
@field_validator("sku")
@classmethod
def validate_sku(cls, v: str) -> str:
if not v.startswith(("SKU-", "PRD-")):
raise ValueError("SKU must start with 'SKU-' or 'PRD-'")
return v.upper()
@field_validator("price_cents")
@classmethod
def validate_price(cls, v: int) -> int:
if v < 0:
raise ValueError("Price cannot be negative")
return v
@field_validator("category", mode="before")
@classmethod
def normalize_category(cls, v: str) -> str:
return v.lower().strip().replace(" ", "-")
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 276 lines · 77 tokens per session scan A be19d4913ebf
pydantic-validation is a skill published in the GitHub repository VersoXBT/claude-initial-setup (4 stars, last pushed 4mo ago), licensed MIT. It adds 77 tokens to every session and 1,905 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
fastapi-templates
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
claudehut-workflow
Use at the start of every session and whenever beginning a coding task in a Java/Spring backend - establishes the ClaudeHut 7-phase agentic workflow, the complexity-tier routing that lets small tasks skip deliberation phases, and the laws that govern which skills and rules must fire. Injected at session start; also…
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
fastapi
Use when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0, OAuth2/JWT, ASGITransport tests, production wiring. NOT language-level Python or packaging (that is python), NOT engine-level SQL (that is…
django
Use when building, reviewing, securing, testing or shipping a Django app — models, migrations, QuerySets/managers, FBV/CBV views, forms, the admin, settings split, and Django REST Framework (serializers, ModelViewSet, permissions). NOT async FastAPI/Pydantic services (that is fastapi), NOT Postgres schema/index work…
software-csharp-backend
Applies C# and .NET backend standards. Use when shaping API boundaries, data access, resilience, observability, or security defaults.