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 agentmods add skills/jiatastic/open-python-skills/pydanticnpx skills add jiatastic/open-python-skills --skill pydanticgit clone --depth 1 https://github.com/jiatastic/open-python-skillsWhat 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 | $0.00037 | $0.00412 |
| Opus 5 | $0.00018 | $0.00206 |
| Sonnet 5 | $0.00007 | $0.00082 |
| Haiku 4.5 | $0.00004 | $0.00041 |
Grade A, and why
pydantic 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 2d 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.
What it actually says
pydantic
Type-driven validation and serialization using Pydantic models.
Overview
Pydantic validates data using Python type hints and provides rich serialization via model_dump() and JSON schema output.
When to Use
- Validating request/response payloads
- Normalizing untrusted input
- Generating JSON schema for docs
Quick Start
uv pip install pydantic
from pydantic import BaseModel
class User(BaseModel):
id: int
email: str
user = User(id=1, email="[email protected]")
Core Patterns
- Typed fields: strict schema definitions.
- Field validators: custom validation logic.
- Model validators: cross-field checks.
- Serialization:
model_dump()andmodel_dump_json(). - Settings: environment-driven config via
BaseSettings.
Example: field_validator
from pydantic import BaseModel, field_validator
class Model(BaseModel):
name: str
@field_validator("name")
@classmethod
def ensure_not_empty(cls, v: str):
if not v:
raise ValueError("name required")
return v
Example: model_validate + model_dump
from pydantic import BaseModel
class Model(BaseModel):
foo: int
model = Model.model_validate({"foo": 1})
print(model.model_dump())
Troubleshooting
- Coercion surprises: use strict types if needed
- Slow validators: keep them minimal
- Mutable defaults: use
default_factory
References
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2d ago First seen · 83 lines · 37 tokens per session scan A a6250158216e
pydantic is a skill published in the GitHub repository jiatastic/open-python-skills (9 stars, last pushed 7mo ago), licensed MIT. It adds 37 tokens to every session and 412 once invoked, about $0.0002 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-08-31.
Other skills, from other repositories
biopython
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…
esm
Use when working directly with the esm Python SDK, ESM3 or ESMC model IDs, Forge/Biohub inference clients, or ESMFold2 folding workflows.
geopandas
Guidance and local audit tools for Python workflows that directly use GeoPandas GeoSeries, GeoDataFrame, spatial operations, or vector-data I/O.
benchling-integration
Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.
datamodel-code-generator
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.…
api-contrib
Contributing to the Kokoro-FastAPI Python API: module layout, endpoint gating pattern, test expectations. Use when adding or changing endpoints, services, or inference code.