pydanticai-docs SKILL.md skillA

pydanticai-docs from dougtrajano/pydantic-ai-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add dougtrajano/pydantic-ai-skills/pydanticai-docs@v1.0

Pins v1.0 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
dougtrajano/pydantic-ai-skills
Path
examples/skills/pydanticai-docs/SKILL.md
Versions recorded
4
Latest version
v1.0, committed Aug 26, 2026
First version recorded
Dec 19, 2025
Size
5,241 bytes
Repository stars
380
License
MIT

Use this skill whenever the user is working with the Pydantic AI framework — including building AI agents, defining structured outputs with Pydantic models, wiring up tools/function calling, configuring model providers (OpenAI, Anthropic, Gemini, etc.), managing dependencies via agent context, handling streaming responses, or debugging agent runs. Trigger this skill even for adjacent tasks like "how do I make my agent return JSON", "set up a multi-step agent", "add a tool to my agent", or…

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Pydantic AI Documentation Skill

## What is Pydantic AI?

Pydantic AI is a production-grade Python agent framework for building type-safe, dependency-injected Generative AI applications. It supports multiple LLM providers, structured outputs via Pydantic models, and composable multi-agent patterns.

Doc: <https://ai.pydantic.dev/>

---

## Core Concepts

### 1. Agent Instantiation

```python
from pydantic_ai import Agent

agent = Agent(
    'openai:gpt-4o',          # model string: provider:model-name
    system_prompt='Be helpful.',
)
result = agent.run_sync('What is the capital of France?')
print(result.output)
```

For full constructor parameters, run methods, and streaming: load `references/AGENT.md`.

### 2. Function Tools (`@agent.tool`)

```python
from pydantic_ai import Agent, RunContext

agent = Agent('openai:gpt-4o', deps_type=str)

@agent.tool
def get_user_name(ctx: RunContext[str]) -> str:
    """Return the current user's name."""
    return ctx.deps

result = agent.run_sync('What is my name?', deps='Alice')
```

Use `@agent.tool_plain` when you don't need `RunContext`. For tool registration, return types, and retries: load `references/FUNCTION_TOOLS.md`.
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add dougtrajano/pydantic-ai-skills/pydanticai-docs@sha256:3f15d3a6ac141de5

The line at the top of this page pins the label v1.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_mm5ktlh7mijh4eas.svg)](https://markdownregistry.com/a/art_mm5ktlh7mijh4eas)

4 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 4 versions of this file, between Dec 19, 2025 and Aug 26, 2026, about one every 83 days.

versioncommittedcommitsizeaudit
v1.0 latest2026-08-26 6938db3 5,241 BA view · diff
v1.02026-03-04 427fc83 5,115 BA view · diff
git:20260108.619c77e2026-01-08 619c77e 4,749 BA view · diff
git:20251219.172092f2025-12-19 172092f 4,805 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (5241 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

dougtrajano/pydantic-ai-skills · 380 stars · license MIT · pushed 2026-10-16 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_mm5ktlh7mijh4eas
GET https://markdownregistry.com/api/v1/resolve?ref=dougtrajano/pydantic-ai-skills/pydanticai-docs
GET https://markdownregistry.com/api/v1/blob/3f15d3a6ac141de519b80a3c28b9fb0b7e978c0169b60132fc8fbc7aac26da6c

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from dougtrajano/pydantic-ai-skills

sonarqube SKILL.md skill
dougtrajano/pydantic-ai-skills · .claude/skills/sonarqube/SKILL.md · Operate SonarQube-enabled repositories through the SonarQube CLI (`sonar`): verify authentication, discover project…
git:20260906.66d546f · audit A · 380 stars
AGENTS.md AGENTS.md file
dougtrajano/pydantic-ai-skills · AGENTS.md
git:20261003.91dcd8c · audit A · 380 stars
CLAUDE.md CLAUDE.md file
dougtrajano/pydantic-ai-skills · CLAUDE.md
git:20260516.6b85965 · audit B · 380 stars
arxiv-search SKILL.md skill
dougtrajano/pydantic-ai-skills · examples/skills/arxiv-search/SKILL.md · Search arXiv preprint repository for papers in physics, mathematics, computer science, quantitative biology, and…
git:20260124.c0a5a2f · audit A · 380 stars
data-analysis SKILL.md skill
dougtrajano/pydantic-ai-skills · examples/skills/data-analysis/SKILL.md · Profile and aggregate a bundled sales dataset - group revenue by region, category, channel or month, apply filters, and…
git:20260816.4a89ea0 · audit A · 380 stars
web-research SKILL.md skill
dougtrajano/pydantic-ai-skills · examples/skills/web-research/SKILL.md · Use this skill for requests related to web research; it provides a structured approach to conducting comprehensive web…
git:20251219.172092f · audit A · 380 stars

Every file in dougtrajano/pydantic-ai-skills

Browse by kind, by grade A, or by owner.