All skills
google avatar

/adk-style

@29933ce
by googlegoogle/adk-python22k stars
4,084

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).

Use this Skill: https://skilld.dev/gh/google/adk-python/adk-style

This session only. Nothing lands on disk.

referenceslogging.md

≈303 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Logging Style Guide

Module Logger

Every module that logs declares its logger with the google_adk. prefix:

logger = logging.getLogger('google_adk.' + __name__)

scripts/compliance_checks.py fails the commit on a bare logging.getLogger(__name__). The prefix puts every ADK record under one logger tree, so an application embedding ADK can raise or silence the framework's logging with a single logging.getLogger('google_adk') call without touching its own.

General Rules

  • Lazy formatting: pass values as arguments so the string is only built when the level is enabled.
    • Good: logger.info('Processing item %s', item_id)
    • Bad: logger.info(f'Processing item {item_id}')
  • Never log secrets: API keys, credentials, tokens, or PII.
  • Contextual logging: include trace IDs when available so records correlate across an invocation.

Log Levels

  • DEBUG: diagnostic detail. Use freely in internal implementation.
  • INFO: expected milestones (workflow started, node completed).
  • WARNING: something unexpected that did not stop the operation (a retry, a deprecated field).
  • ERROR: a failure that prevented the operation from completing.

Source: SKILL.md on GitHub

No alerts17d3 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    This skill provides comprehensive Python style and codebase conventions for the Agent Development Kit (ADK). It covers visibility, imports, typing, Pydantic models, formatting, and testing, all of which align with standard software development best practices.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

Signed by skilld at 29933ce. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago

README badge

README badge for google/adk-python/adk-style