pydantic-ai-expert

pydantic-ai-expert is a skill for Claude Code, Codex from roedyrustam/vibes-plug. It costs 54 tokens per session (1,899 once invoked), scanned A, original, MIT.

A guide to building AI agents in Python with Pydantic AI, a toolkit that checks data shapes and types as programs run. It covers agents that call tools, use external services, and return structured results.

In plain words
What is it for?
Use it to build Python agents with validated tool parameters, injected dependencies, structured outputs, and graph-based workflows.
Why use it?
It reduces errors caused by unexpected inputs or loosely structured model responses, while allowing the underlying AI provider to be changed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to build Python agents with validated tool parameters, injected dependencies, structured outputs, and graph-based workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/roedyrustam/vibes-plug/pydantic-ai-expert
Install

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.

Any agent
npx skills add roedyrustam/vibes-plug --skill pydantic-ai-expert
Clone the repo
git clone --depth 1 https://github.com/roedyrustam/vibes-plug

Made for: Claude Code, Codex.

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

agentmods badge for pydantic-ai-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/pydantic-ai-expert/github.svg)](https://agentmods.dev/skills/roedyrustam/vibes-plug/pydantic-ai-expert)
Your own site
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/pydantic-ai-expert"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/pydantic-ai-expert/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.

agentmods 80×15 button for pydantic-ai-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/pydantic-ai-expert"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/pydantic-ai-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,899 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.01899
Opus 5 $0.00027 $0.00949
Sonnet 5 $0.00011 $0.00380
Haiku 4.5 $0.00005 $0.00190

Measured today against content hash b0955ae36308, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

pydantic-ai-expert 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 today.

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.

skills/pydantic-ai-expert/SKILL.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pydantic AI Expert (Type-Safe Python Agent Engineering)

English | Bahasa Indonesia


English

Orchestration & Integration

Connects and orchestrates with domain skills like python-programming-expert, multi-agent-orchestration, ai-llm-integration-expert, ai-evals-benchmark-expert, and database-orm-expert to engineer type-safe, resilient backend AI agents.

Description

Production-grade guide for building enterprise AI agents using Pydantic AI (from the creators of Pydantic). Unlike untyped or fragile agent libraries, Pydantic AI provides strict static typing (Agent[DepsType, ReturnType]), first-class dependency injection (RunContext[Deps]), automatic tool parameter validation via Pydantic v2 schemas, model-agnostic provider switching (Anthropic, OpenAI, Gemini, Groq, Ollama), dynamic system prompts, and deterministic structured outputs.

Swarm Synergy: Within the Backend & APIs Swarm, this skill serves as the Lead Python Agent Engineer. It executes critical business operations, runs data pipelines, and integrates with SQL databases with compile-time type safety in Phase 4.

Trigger Conditions

  • Engineering Python-based autonomous agents requiring strict type safety and schema validation.
  • Implementing dependency injection (passing database connections, API clients, or user sessions) into agent tools.
  • Extracting guaranteed structured outputs from frontier reasoning models without JSON parsing errors.
  • Designing multi-agent delegation or agent handoffs in Python microservices.
  • Running unit tests and deterministic evals on agent logic using mock models (TestModel).

Pydantic AI Architecture

┌─────────────────────────────────────────────────────────────┐
│                    AGENT DEFINITION                         │
│  Agent[DatabaseDeps, AuditReport](                          │
│    model='anthropic:claude-3-7-sonnet-latest',              │
│    result_type=AuditReport,                                 │
│  )                                                          │
└──────────────────────────────┬──────────────────────────────┘
                               │
       ┌───────────────────────┴───────────────────────┐
       ▼                                               ▼
┌──────────────────────────────┐       ┌──────────────────────────────┐
│     DEPENDENCY INJECTION     │       │     TOOL EXECUTION LOOP      │
│  RunContext[DatabaseDeps]    │       │  @agent.tool                 │
│  • Async DB connection pool  │       │  • Auto Pydantic validation  │
│  • Tenant & session auth     │       │  • Structured error return   │
└──────────────────────────────┘       └──────────────────────────────┘
                               │
                               ▼
┌─────────────────────────────────────────────────────────────┐
│             DETERMINISTIC STRUCTURED RESULT                 │
│  result.data -> Pydantic BaseModel instance (Validated)     │
└─────────────────────────────────────────────────────────────┘

Read the full file on GitHub · 162 lines

Changes

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.

  1. today First seen · 162 lines · 54 tokens per session scan A b0955ae36308

Subscribe to this mod's changes

pydantic-ai-expert is a skill published in the GitHub repository roedyrustam/vibes-plug (53 stars, last pushed today), licensed MIT. It adds 54 tokens to every session and 1,899 once invoked, about $0.0003 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-12.

Related

Other skills, from other repositories

data-flow-diagram

Design data movement and transformation pipelines. Show how data flows between systems, transforms, and where it's stored. Use when architecting data integrations or ETL processes.

sethdford/claude-skills · 37 tokens

integration-patterns

Integrate data across systems using ETL, CDC, event streaming, and API patterns. Design robust, maintainable data integrations. Use when connecting disparate data sources or microservices.

sethdford/claude-skills · 40 tokens

ai-model-wechat

A guide to calling AI text models from a WeChat Mini Program, a small app that runs inside WeChat, using CloudBase. It covers generated text and streamed responses, where text arrives piece by piece, through callback functions.

sutchan/Agent-Skills-Hub · 254 tokens

ai-model-nodejs

Use this skill for Node.js backend AI via @cloudbase/node-sdk (>=3.16.0) — cloud functions, CloudRun, Express, Koa, NestJS, serverless APIs, scheduled jobs, LLM proxies. Only SDK supporting image generation (ai.createImageModel + generateImage). Text models via ai.createModel with groups cloudbase, hunyuan-exp, or…

sutchan/Agent-Skills-Hub · 230 tokens

notebooklm

Install, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API.…

teng-lin/notebooklm-py · 79 tokens

gemini-api-dev

Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. Covers SDK usage and best…

google-gemini/gemini-skills · 73 tokens