Skip to content
Back to skills

Pydantic Ai

ASecurity

"Routes agents working with Pydantic AI, pydantic-graph,

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
ai-agentspythongobashbackend

Works with

  • cli
  • mcp

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill pydantic-ai --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pydantic Ai?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pydantic Ai
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-pydantic-ai/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-pydantic-ai)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pydantic-ai
description: "Routes agents working with Pydantic AI, pydantic-graph,
  pydantic-evals, clai, examples, and repository maintenance across focused
  workflow sub-skills."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Pydantic AI Repo Skill

Use this repo skill when a task mentions Pydantic AI, imports `pydantic_ai`, edits the Pydantic AI monorepo, uses `pydantic-graph`, `pydantic-evals`, `clai`, or asks about agents, tools, models, providers, MCP, evals, graph workflows, CLI apps, tests, docs, cassettes, or maintainer workflows for this ecosystem.

## Start Here

- Read [references/repo-provenance.md](references/repo-provenance.md) before deciding whether this skill is current for a checkout or whether `refresh-repo-skill` is needed.
- Read [references/installation-and-extras.md](references/installation-and-extras.md) for package names, Python version support, extras, and minimal import checks.
- Read [references/capability-map.md](references/capability-map.md) when choosing the best sub-skill or checking coverage boundaries.
- Read [references/troubleshooting.md](references/troubleshooting.md) for cross-cutting install/import/provider/CLI/configuration problems.
- Run [scripts/check_environment.py](scripts/check_environment.py) for a safe no-network diagnostic of installed Pydantic AI packages, optional extras, and CLI help.

## Route by Task

| User task | Read |
| --- | --- |
| Build, configure, run, stream, test, or compose `Agent` instances; use deps, instructions, message history, usage limits, `AgentSpec`, or `TestModel` | [sub-skills/agent-core/SKILL.md](sub-skills/agent-core/SKILL.md) |
| Define function tools, validate schemas, use `RunContext`, `ModelRetry`, approvals, deferred tools, tool search, or reusable toolsets | [sub-skills/tools-and-toolsets/SKILL.md](sub-skills/tools-and-toolsets/SKILL.md) |
| Design structured outputs, output functions, `ToolOutput`, `NativeOutput`, multimodal inputs, message parts, or history serialization | [sub-skills/outputs-and-messages/SKILL.md](sub-skills/outputs-and-messages/SKILL.md) |
| Choose model strings, provider classes, optional extras, profiles, native tools, embeddings, fallback, concurrency, or provider troubleshooting | [sub-skills/models-and-providers/SKILL.md](sub-skills/models-and-providers/SKILL.md) |
| Connect MCP/FastMCP, capabilities, hooks, Logfire, A2A, durable execution, AG-UI, Vercel AI, or web integration surfaces | [sub-skills/mcp-and-integrations/SKILL.md](sub-skills/mcp-and-integrations/SKILL.md) |
| Build Pydantic Evals datasets/evaluators/reports or pydantic-graph `GraphBuilder` workflows | [sub-skills/evals-and-graph/SKILL.md](sub-skills/evals-and-graph/SKILL.md) |
| Use `clai`, `pai`, `clai web`, `Agent.to_cli`, `Agent.to_web`, custom agent loading, or app/example scaffolds | [sub-skills/cli-and-apps/SKILL.md](sub-skills/cli-and-apps/SKILL.md) |
| Edit this repository, choose targeted tests, record cassettes, update docs/examples, follow contribution rules, or refresh generated skills | [sub-skills/repo-development/SKILL.md](sub-skills/repo-development/SKILL.md) |

## Install Baseline

Pydantic AI targets Python 3.10+ and is distributed as several related packages:

```bash
pip install pydantic-ai
pip install pydantic-ai-slim
pip install pydantic-graph pydantic-evals clai
```

Use `pydantic-ai-slim[...]` extras for optional providers and integrations. Do not install every extra by default; choose only the extras needed for the selected workflow.

Minimal import check:

```python
import pydantic_ai
import pydantic_graph
import pydantic_evals
import clai
```

For deterministic code examples and tests, prefer `pydantic_ai.models.test.TestModel` or `pydantic_ai.models.function.FunctionModel` before making live provider requests.

## Working Rules

- Use provider-prefixed model strings such as `openai:gpt-5.2`, `anthropic:claude-opus-4-6`, and `google:gemini-3-pro-preview` when examples intentionally call real providers.
- Treat provider SDKs, credentials, native tools, MCP servers, durable backends, UI servers, and cloud resources as optional surfaces that need explicit install/config checks.
- Do not run live model requests, record cassettes, start durable services, upload files, or mutate cloud resources unless the user explicitly asks and provides credentials/configuration.
- For repository edits, follow the scoped `AGENTS.md` and `agent_docs/` guidance summarized in [sub-skills/repo-development/SKILL.md](sub-skills/repo-development/SKILL.md).
- Keep generated skill usage self-contained: use these bundled references and scripts instead of depending on the original source docs, examples, tests, or scripts unless the task is explicitly about maintaining a Pydantic AI checkout.

Files in this skill

  • SKILL.md4.7 KB
  • references/capability-map.md3.2 KB
  • references/installation-and-extras.md3.9 KB
  • references/repo-provenance.md2.8 KB
  • references/repo-routing-metadata.json498 B
  • references/troubleshooting.md3.8 KB
  • scripts/check_environment.py6.3 KB
  • sub-skills/agent-core/SKILL.md3.8 KB
  • sub-skills/agent-core/references/agent-api.md11.2 KB
  • sub-skills/agent-core/references/testing-and-debugging.md11.2 KB
  • sub-skills/agent-core/references/workflows.md11.3 KB
  • sub-skills/agent-core/scripts/agent_smoke.py3.5 KB
  • sub-skills/cli-and-apps/SKILL.md3.7 KB
  • sub-skills/cli-and-apps/references/cli-reference.md6.3 KB
  • sub-skills/cli-and-apps/references/example-app-recipes.md8.8 KB
  • sub-skills/cli-and-apps/references/troubleshooting.md7.3 KB
  • sub-skills/cli-and-apps/scripts/check_cli_help.py4.6 KB
  • sub-skills/evals-and-graph/SKILL.md3.6 KB
  • sub-skills/evals-and-graph/references/evals-workflows.md8.9 KB
  • sub-skills/evals-and-graph/references/graph-workflows.md8.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.