Pydantic AI is a typed Python SDK for building AI agents that can use different language models and interfaces, including voice, image generation, and embeddings. Developers use it for applications ranging from structured data extraction to long-running multi-agent work. The catalogue entries provide workflows and configuration for its coding-agent and harness features.
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/pydantic/pydantic-ai/testing-skillnpx skills add pydantic/pydantic-ai --skill testing-skillgit clone --depth 1 https://github.com/pydantic/pydantic-aiWrote 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/pydantic/pydantic-ai/testing-skill)<a href="https://agentmods.dev/skills/pydantic/pydantic-ai/testing-skill"><img src="https://agentmods.dev/badge/skills/pydantic/pydantic-ai/testing-skill.svg" alt="Measured on agentmods" 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 | $0.00044 | $0.00854 |
| Opus 5 | $0.00022 | $0.00427 |
| Sonnet 5 | $0.00009 | $0.00171 |
| Haiku 4.5 | $0.00004 | $0.00085 |
Grade A, and why
testing-skill 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 5d 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 — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pytest VCR Workflow
Use this skill when recording or re-recording VCR cassettes for tests, or when debugging cassette contents.
Prerequisites
- Verify
.envexists:test -f .env && echo 'ok' || echo 'missing' - Missing API keys will cause clear test errors at runtime
Important flags
--record-mode=rewrite: Record cassettes (works for both new and existing)--lf: Run only the last failed tests-vv: Verbose output--tb=line: Short traceback output-k="": Run tests matching the given substring expression
Recording Cassettes
Step 1: Record cassettes
source .env && uv run pytest path/to/test.py::test_function_name -v --tb=line --record-mode=rewrite
Multiple tests can be specified:
source .env && uv run pytest path/to/test.py::test_one path/to/test.py::test_two -v --tb=line --record-mode=rewrite
Step 2: Verify recordings
Run the same tests WITHOUT --record-mode to verify cassettes play back correctly:
source .env && uv run pytest path/to/test.py::test_function_name -vv --tb=line
Step 3: Review snapshots
If tests use snapshot() assertions:
- The test run in Step 2 auto-fills snapshot content
- Review the generated snapshot files to ensure they match expected output
- You only review - don't manually write snapshot contents
- Snapshots capture what the test actually produced, additional to explicit assertions
Parsing Cassettes
Parse VCR cassette YAML files to inspect request/response bodies without dealing with raw YAML.
Usage
uv run python .claude/skills/testing-skill/parse_cassette.py <cassette_path> [--interaction N]
Examples
# Parse all interactions in a cassette
uv run python .claude/skills/testing-skill/parse_cassette.py tests/models/cassettes/test_foo/test_bar.yaml
# Parse only interaction 1 (0-indexed)
uv run python .claude/skills/testing-skill/parse_cassette.py tests/models/cassettes/test_foo/test_bar.yaml --interaction 1
What ships with it
1 file 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.
- 5d ago First seen · 98 lines · 44 tokens per session scan A 4f0663ca5bc5
testing-skill is a skill published in the GitHub repository pydantic/pydantic-ai (19,730 stars, last pushed today), licensed MIT. It adds 44 tokens to every session and 854 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-30.
Other skills, from other repositories
python-expert
Python expert for stdlib, packaging, type hints, async/await, and performance optimization.
test-generator
Generate pytest test cases for Python functions and classes.
deepseek-harness
Use when building AI agent applications with a plugin-based architecture — Web UI, CLI, Python SDK, Cordis plugin system, multi-model orchestration. DeepSeek Harness (dsh): open-source agent harness by DeepSeek AI where everything is a plugin, powered by Cordis for spatiotemporal composability.
add-module
Add a backend module (deterministic CRUD/action handler) to an existing Mozaiks app.
add-page
Add a frontend page (AppPageSchema) to an existing Mozaiks app.
create-workflow
Create a new AI workflow from scratch. Generates workflow YAML files, tools, and optional UI components.