AGENT SKILL

adk-style

Python style and codebase conventions for ADK (Agent Development Kit): private-by-default file visibility, imports, type hints, Pydantic v2 models, formatting, docstrings, logging, async I/O, file and test layout, and unit test structure. Use when writing or editing ADK source or tests, deciding whether a new file or symbol should be public or private, naming or placing a test file, fixing a formatter, linter, or type-check failure (pyink, isort, ruff, mypy, addlicense, compliance-checks), or asking whether code matches house style. Don't use for reviewing a whole changeset (use adk-review), writing a developer guide or design doc for a code unit (use adk-unit-guide or adk-unit-design), building or configuring agents (use adk-agent-builder), or installing the toolchain (use adk-setup).

适用职业开发工程师
使用场景测试与质量
License 许可
Apache-2.0
所属仓库
google/adk-python
最近更新
2026-11-14
Stars
★ 2.2w
Forks
4.4k

01 前言 Front Matter

name
adk-style
description
Python style and codebase conventions for ADK (Agent Development Kit): private-by-default file visibility, imports, type hints, Pydantic v2 models, formatting, docstrings, logging, async I/O, file and test layout, and unit test structure. Use when writing or editing ADK source or tests, deciding whether a new file or symbol should be public or private, naming or placing a test file, fixing a formatter, linter, or type-check failure (pyink, isort, ruff, mypy, addlicense, compliance-checks), or asking whether code matches house style. Don't use for reviewing a whole changeset (use adk-review), writing a developer guide or design doc for a code unit (use adk-unit-guide or adk-unit-design), building or configuring agents (use adk-agent-builder), or installing the toolchain (use adk-setup).

02 资源文件 10

03 SKILL.md 正文

ADK Style Guide

Conventions for src/google/adk/ and tests/unittests/. Most are enforced by a pre-commit hook or a CI job, so a violation blocks the PR rather than surfacing in review. Read the one reference for the topic you are touching.

Pick a reference

Task Reference
Adding a .py file; deciding public vs private; __init__.py and __all__ visibility.md
Writing import lines; relative vs absolute; circular imports; TYPE_CHECKING; lazy imports imports.md
Annotating args and returns; AgentMode vs raw mode strings; _NodePathBuilder, _BranchPath, and build_node; X | None and X | Y instead of Optional and Union; keyword-only args; isinstance; asserts; mypy; # type: ignore and cast typing.md
Defining a Pydantic model, validator, private attribute, or on-wire payload pydantic.md
Indentation, line length, quotes; running the formatter; what each hook checks formatting.md
Writing a docstring or an explanatory comment documentation.md
Emitting a log record; naming the module logger; picking a level logging.md
Anything that performs I/O — network, disk, database async.md
Where a new file goes; license header; where its test goes and what to call it file-organization.md
Writing or restructuring a unit test; the testing_utils fakes testing.md

A check failed — where to look

Failing check Reference
check-new-py-prefix visibility.md
compliance-checks logging.md (logger name), typing.md (from __future__ import annotations), imports.md (cli/ import direction)
pyink, isort, ruff, addlicense, codespell formatting.md
Mypy Check CI job typing.md
tests/unittests/test_import_loading.py imports.md

04 同仓库更多 Skills

google
google/adk-python

bigquery-graph

Skill for Graph Query Language (GQL) or SQL/PGQ queries against a property graph. Includes path finding, multi-hop traversal, topological connection, shortest path, node reachability, edge connectivity, and semantic graph queries.

数据分析师Skill与智能体开发
★ 2.2w
google
google/adk-python

bigquery-ai-ml

Leverages BigQuery's built-in machine learning and GenAI capabilities for advanced data analytics. Use when you need to write SQL queries that perform time-series forecasting, predict values, detect outliers or anomalies, find key drivers, perform semantic search or vector search, classify text, calculate similarity, summarize content, translate language, evaluate models, filter by semantic conditions, measure the causal effect of an intervention, compute correlations between columns, detect change points or structural breaks, extract trend or seasonality components, or leverage generative AI capabilities in BigQuery. Do not use for general BigQuery dataset, table, or job management requests.

数据分析师
★ 2.2w
google
google/adk-python

code-review-skill

Reviews code with feedback tailored to the developer's profile in session state.

开发工程师代码审查Skill与智能体开发
★ 2.2w
google
google/adk-python

weather-skill

A skill that provides weather information based on reference data.

Skill与智能体开发
★ 2.2w
google
google/adk-python

weather-skill

A skill that provides weather information based on reference data and scripts.

Skill与智能体开发
★ 2.2w
google
google/adk-python

weather-skill

A skill that provides weather information based on reference data.

Skill与智能体开发
★ 2.2w