Skip to main content
AI/MLgoogle

adk-style

ADK development style guide for routine nits — Python idioms, codebase conventions, imports, typing, Pydantic patterns, formatting, logging, and file organization. Use this skill whenever writing code, tests, or reviewing PRs for the ADK project to ensure compliance with styling and coding conventions. Triggers on "code style", "how should I format", "naming convention", "lint", "nit", "imports", "typing", "Pydantic patterns", "testing rules".

Stars
19,929
Source
google/adk-python
Updated
2026-05-30
Slug
google--adk-python--adk-style
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/google/adk-python/HEAD/.agents/skills/adk-style/SKILL.md -o .claude/skills/adk-style.md

Drops the SKILL.md into .claude/skills/adk-style.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

ADK Style Guide

Style Guide (references/)

  • Visibility — naming conventions for module-private, internal, and package-private visibility.
  • Imports — relative vs absolute imports, TYPE_CHECKING patterns.
  • Typing — strong typing, avoiding Any, bare type names, keyword-only arguments, Optional vs | None, abstract parameter types, mutable default avoidance, runtime type discrimination.
  • Pydantic Patterns — Pydantic v2 usage, Field() constraints, field_validator, model_validator, private attributes, deprecation migration, post-init setup.
  • Formatting — indentation, line limits, and running pre-commit hooks.
  • Documentation — comments and docstrings.
  • Logging — lazy evaluation and log levels.
  • File Organization — file headers and class organization.

Testing

references/testing.md — core principles, 9 rules for writing ADK tests, test structure template