pydantic-ai: Skill for Claude Code

.claude/skills/pre-push-review/SKILL.md

pre-push-review is a skill for Claude Code from pydantic/pydantic-ai. It costs 24 tokens per session (627 once invoked), scanned A, original, MIT.

A local code review workflow for checking a branch before it is pushed to GitHub. A branch is a separate line of development, and a pull request is a proposed change for review.

In plain words
What is it for?
It reviews the full branch change, reads project guidance and pull-request context, and checks whether the work is ready to push.
Why use it?
It helps find correctness, testing, documentation, and integration problems before they reach a pull request or another round of review.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions AGENTS.md.

This is pydantic/pydantic-ai's own configuration. It tells Claude Code how to work on pydantic-ai itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything pydantic-ai configures →

About the project

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.

pydantic/pydantic-ai · 19,869 stars · on GitHub · pydantic.dev

Reuse

Borrowing it

Nothing to install: this file belongs to pydantic/pydantic-ai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/pydantic/pydantic-ai/main/.claude/skills/pre-push-review/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/pydantic/pydantic-ai

Made for: Claude Code.

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 pre-push-review

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/pydantic/pydantic-ai/pre-push-review"><img src="https://agentmods.dev/badge/skills/pydantic/pydantic-ai/pre-push-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 627 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00024 $0.00627
Opus 5 $0.00012 $0.00313
Sonnet 5 $0.00005 $0.00125
Haiku 4.5 $0.00002 $0.00063

Measured 12d ago against content hash 6da2a4396cdf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pre-push-review 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 12d 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.

.claude/skills/pre-push-review/SKILL.md · 71 lines

How it starts

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

Pre-push Review

Use the strongest locally available reviewer to catch problems while they are still cheap to fix. Run this before the first push and again before every later push to an existing PR.

This is the local counterpart to douwebot: a high-judgment standards review paid for by the developer's model subscription. It is independent of the automatic CI Review, which runs on GitHub after CI passes.

Read the review rubric

Read the prompt: of the douwebot review job in .github/workflows/bots.yml. It is the source of truth for what to look for, how to prioritise concerns, and what makes feedback useful. Apply its review judgment and comment-quality rules, but ignore its hosted workflow mechanics: triggers, checkout, model selection, pre-gathered file paths, and GitHub comment tools.

Read the root AGENTS.md, agent_docs/index.md and its relevant topic guides, plus every directory-specific AGENTS.md governing a changed file.

Gather local and PR context

First run gh pr view for the current branch.

  • If a PR exists, read its title, body, base branch, linked issue, comments and reviews. Review the entire branch diff against that base, not just the latest commit. Use the existing discussion to avoid duplicate findings and to detect concerns that remain unresolved after an iteration.
  • If no PR exists, use main as the base and review against the task context available locally. Skip only PR metadata that does not exist; scope and readiness are still valid review concerns.

Gather the corresponding local state:

git status --short
git merge-base <base> HEAD
git diff <base>...HEAD --stat
git diff <base>...HEAD -W
git diff HEAD

The last command includes staged and unstaged work that has not reached HEAD. Read a large diff in chunks, core implementation before tests, and skip generated files (uv.lock, cassettes).

Return the review locally

Do not post comments, submit a GitHub review, or modify the branch. Return only actionable findings as text: file:line, the problem, and the concrete fix. Put higher-level concerns before lower-level ones, following the ordering in the douwebot rubric. Say plainly when there are no findings.

Read the full file on GitHub · 71 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. 12d ago First seen · 71 lines · 24 tokens per session scan A 6da2a4396cdf

Subscribe to this mod's changes

pre-push-review is a skill published in the GitHub repository pydantic/pydantic-ai (19,869 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 627 once invoked, about $0.0001 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.