TE

test-with-spanner

Runs Go unit tests that depend on the Spanner emulator by automatically managing the environment.

Install

mkdir -p .claude/skills/test-with-spanner && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6272" && unzip -o skill.zip -d .claude/skills/test-with-spanner && rm skill.zip

Installs to .claude/skills/test-with-spanner

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Run unit tests that require the Spanner emulator. Use this skill when the user wants to run tests in packages like satellite/metabase, satellite/metainfo, or any other tests that interact with Spanner. Automatically handles checking for and configuring the Spanner emulator environment.
286 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Detects Spanner-dependent Go packages
  • Injects emulator binaries into test environments
  • Configures -spanner-test-db flags automatically
  • Manages test-specific database cleanup routines
  • Reports subtest outcomes for parallel execution

How it works

Checks for existing environment variables and manages the Spanner lifecycle by injecting runtime flags into standard Go test commands.

Inputs & outputs

You give it
Target package path or test name
You get back
Executed go test result with active Spanner emulator instance

When to use test-with-spanner

  • Running unit tests in Spanner-dependent packages
  • Executing tests in satellite/metabase or satellite/metainfo
  • Managing Spanner emulator environments for Go tests

About test-with-spanner

Detects if tests require the Spanner emulator and handles the start/stop lifecycle. It automatically configures the database connection or uses existing environment variables, simplifying the execution of complex database tests.

Run unit tests that require the Spanner emulator. Use this skill when the user wants to run tests in packages like satellite/metabase, satellite/metainfo, or any other tests that interact with Spanner. Automatically handles checking for and configuring the Spanner emulator environment.

When not to use it

  • Tests that do not use Spanner databases
  • Running tests in environments without emulator access

Prerequisites

Go environmentSpanner emulator binary on PATH

Limitations

  • Requires spanner_emulator binary available in PATH
  • Specific to Go test frameworks
  • May conflict with external DB environment configurations

How it compares

It abstracts the complexity of database state management for unit tests instead of requiring manual emulator setup.

Compared to similar skills

test-with-spanner side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
test-with-spanner (this skill)16moReviewIntermediate
generating-database-seed-data1027dReviewIntermediate
run-tests15moReviewIntermediate
test-with-postgres12moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry