Skip to content

Generate Python Runnability Test

Creates a minimal smoke test that checks a Python recipe's agent module imports and defines root_agent

Stars
10,568
Licence
Apache-2.0
Files
4 files

What it does

When installed, the agent can generate a small test file (tests/test_runnability.py) for a Python recipe in the google/adk-recipes repository. The test imports the recipe's agent module and checks that root_agent (and app, if defined) exist. The skill reads the agent code without running it, adds any mocks or environment variables needed for import to succeed, and can add a conftest.py so the recipe's code is importable. It can preview the result or write it to disk, and it will not overwrite existing test files unless explicitly told to.

Great for

  • Maintainers of Python recipes in google/adk-recipes who need to fix the missing runnability test failure in CI
  • Developers adding a new Python agent recipe who want a basic import check that matches repository conventions

Skip it if

  • Testing business logic or agent behaviour, since the generated test only checks that the module imports and defines expected globals
  • Recipes outside the google/adk-recipes layout, because the skill assumes that repository's structure and CI check

Try asking

  • “Add a runnability test to this recipe”
  • “Generate test_runnability.py for the customer-support recipe”
  • “Create a smoke test for this recipe and fix the python-validate-recipe failure”
  • “Preview the runnability test in dry-run mode before writing anything”
Step-by-step guide: how to use Generate Python Runnability TestInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 4 original files, the Apache-2.0 licence and an attribution note.

    generate-python-runnability-test.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip generate-python-runnability-test.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip generate-python-runnability-test.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Run in dry-run mode first to review the report and preview before applying changes
  • If the generated conftest.py is created, consider adding a [build-system] to pyproject.toml instead and then delete the conftest as the skill suggests
  • Keep the generated test minimal; add business-logic tests separately

What's inside

  • scripts/generate_runnability_test.py
  • SKILL.md
  • tests/conftest.py
  • tests/test_generate_runnability_test.py

Redistributed unmodified from google/adk-recipes under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.