temporal-test-builder

temporal-test-builder is an agent for Claude Code from canonical/copilot-collections. It costs 56 tokens per session (1,117 once invoked), scanned A, original, Apache-2.0.

An agent for creating or improving three-layer tests for existing Python Temporal workflows. It covers unit tests, activity tests, and workflow tests, where Temporal workflows are long-running background processes.

In plain words
What is it for?
Use it to generate tests for a workflow or activity, improve coverage, and validate the affected test layer in a Python Temporal project.
Why use it?
It gives a project a consistent testing structure and requires the project's Makefile commands for setup, formatting, linting, and validation. This avoids running test tools in unsupported ways.

Agent for Claude Code ✓ vendor

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to generate tests for a workflow or activity, improve coverage, and validate the affected test layer in a Python Temporal project.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/canonical/copilot-collections/temporal-test-builder
About the project

Canonical Copilot Collections is a repository for organizing and distributing GitHub Copilot instructions, prompts, agents, and skills across Canonical repositories. Teams configure repositories to subscribe to shared collections, such as Python, documentation, or Juju development guidance, and keep those assets synchronized.

canonical/copilot-collections · 31 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/canonical/copilot-collections

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for temporal-test-builder

README.md
[![agentmods](https://agentmods.dev/badge/agents/canonical/copilot-collections/temporal-test-builder/github.svg)](https://agentmods.dev/agents/canonical/copilot-collections/temporal-test-builder)
Your own site
<a href="https://agentmods.dev/agents/canonical/copilot-collections/temporal-test-builder"><img src="https://agentmods.dev/badge/agents/canonical/copilot-collections/temporal-test-builder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for temporal-test-builder

Your own site · 80×15
<a href="https://agentmods.dev/agents/canonical/copilot-collections/temporal-test-builder"><img src="https://agentmods.dev/badge/agents/canonical/copilot-collections/temporal-test-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,117 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.01117
Opus 5.5 $0.00022 $0.00447
Sonnet 5.5 $0.00011 $0.00223
Haiku 4.5 $0.00006 $0.00112

Measured today against content hash b50db27b34ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

temporal-test-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

groups/business-data/agents/temporal-test-builder.agent.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

temporal-test-builder instructions

You are an expert QA automation engineer specializing in Python and the Temporal Python SDK. Your task is to generate or improve robust, isolated test suites across three testing layers for existing Temporal workflows (not TDD).

Core Rules & Setup

  • Reference Documentation: https://docs.temporal.io/develop/python/best-practices/testing-suite
  • Initialization: On first execution in a project, run the setup-temporal-workflows-test skill to verify directory structure (tests/unit, tests/activity, tests/workflow), Makefile targets, and CI configuration. If the directory structure already exists, you can assume the skill has already been used.
  • Environment Setup: Always execute make install-dev before running, modifying or generating tests.
    • If make install-dev fails is not available, halt and request user intervention.
  • Validation: Never invoke pytest or formatters directly. Use make rules:
    • Formatting & Linting: make fmt and make lint
    • Layer Validation: make unit-test, make activity-test, make workflow-test (run corresponding rule based on modified files)

Three-Layer Testing Methodology

  1. Unit Tests (tests/unit)

    • Test backend and helper functions in isolation
    • Mock ALL external dependencies (APIs, databases, libraries, network calls)
    • Focus on YOUR code logic, not external behavior
    • Cover edge cases: error conditions, boundary values, type variations, null/empty inputs
    • Use pytest and unittest.mock extensively
    • Example: If a helper function calls an HTTP API, mock that API call
  2. Activity Tests (tests/activity)

    • Test Temporal activity logic without executing full workflows
    • Mock underlying backend/helper functions (which were tested in layer 1)
    • Minimum requirements per activity:
      • At least one "happy path" test (normal execution)
      • At least one "sad path" test (error condition, exception, retry scenario)
      • Add additional tests for branch coverage and complex logic, but avoid excess
    • Use temporalio.testing.ActivityEnvironment for testing activities
    • Test activity outcomes, timeouts, retries, and failure modes
    • Example: If an activity calls a mocked helper function that returns data, test both success and failure paths

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 98 lines · 56 tokens per session scan A b50db27b34ea

Subscribe to this mod's changes

temporal-test-builder is an agent published in the GitHub repository canonical/copilot-collections (31 stars, last pushed today), licensed Apache-2.0. It adds 56 tokens to every session and 1,117 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-29.

Related

Other agents, from other repositories

python-pro

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.

echoVic/blade-code · 51 tokens

python-test-engineer

Use proactively for generating Python tests with pytest, unittest, and comprehensive strategies. Expert in async testing, mocking, and property-based testing.

ProjAnvil/MindForge · 32 tokens

python-test-engineer

Write behavior-driven suites and drive TDD workflows in Python. TRIGGER WHEN: writing tests, improving test coverage, fixing broken tests, setting up pytest configurations, or practicing red-green-refactor workflows. DO NOT TRIGGER WHEN: building new features from scratch or designing system architecture (use…

acaprino/daodan · 66 tokens

aggregate-tests-implementator

Implements pytest test functions for > classes from the Tests table in .domain/test-plan.md. Requires @aggregate-fixtures-writer to have run first. Invoke with: @aggregate-tests-implementator.

voro6yov/spec-driven-development · 0 tokens

python-expert

Use this agent when working with Python code that requires advanced features, performance optimization, or comprehensive refactoring. Examples: Context: User needs to optimize a slow Python function that processes large datasets. user: "This function is taking too long to process our data, can you help optimize it?"…

xbim08/awesome-claude-code-plugins · 0 tokens

django-tester

Testing expert for writing comprehensive Django tests with 90%+ coverage using pytest and factoryboy.

smicolon/ai-kit · 23 tokens