migrating-claude-agent-sdk-to-pydantic-ai

Installation
SKILL.md

Migrate Claude Agent SDK to Pydantic AI

Preserve observable behavior, not the Claude Code process or API shape. Migrate the smallest complete caller path and keep application infrastructure in place.

Trace the source before choosing a target

  1. Read repository instructions, dependencies, tests, and the runtime entrypoint. Record the installed Claude Agent SDK, bundled Claude Code CLI, Pydantic AI, and Harness versions.
  2. Trace one real request from query() or ClaudeSDKClient through prompts, tools, events, results, state, persistence, approvals, and side effects that callers use. Establish a focused baseline or characterization test.
  3. Separate these source contracts when present:
    • fresh query() calls, live ClaudeSDKClient continuation, disk/external-store resume, transcript forks, and file rewind;
    • tool availability, automatic approval, policy callbacks, and OS/container isolation;
    • completed messages, raw token deltas, lifecycle events, and terminal results;
    • conversation history, workflow checkpoints, model-owned plans, long-term memory, and workspace state;
    • model-directed subagents from application-owned loops, queues, retries, and schedulers.
  4. Record each observed contract, its owner, semantic difference, and executable proof. An unobserved Claude Code feature is not migration scope.

Read Research and concept mapping for the detected source features. Read Verification and cutover before implementation.

Choose the smallest target

Installs
223
Repository
pydantic/skills
GitHub Stars
140
First Seen
Sep 19, 2026