canary-test-author

canary-test-author is an agent for Claude Code from bop-clocktower/canary. It costs 93 tokens per session (2,298 once invoked), scanned A, original, MIT.

An agent that writes automated tests from plain-language requirements. It supports browser tests with Playwright, JavaScript or TypeScript tests with Vitest, Python tests with Pytest, and performance tests with k6.

In plain words
What is it for?
Use it when you need new end-to-end, unit, component, API, or performance test code.
Why use it?
It turns feature descriptions and API requirements into tests that follow the project’s existing patterns. It also helps choose suitable fixtures and frameworks before code is written.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; mentions Claude Code.

Part of the canary plugin — 22 skills, 13 commands, 8 agents, 4 hooks, 3 MCP servers shipped together

Good fit Use it when you need new end-to-end, unit, component, API, or performance…

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/bop-clocktower/canary/canary-test-author
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/bop-clocktower/canary

Made for: Claude Code.

Or install canary, the plugin that ships this one along with the rest of its 22 skills, 13 commands, 8 agents, 4 hooks, 3 MCP servers.

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 canary-test-author

README.md
[![agentmods](https://agentmods.dev/badge/agents/bop-clocktower/canary/canary-test-author.svg)](https://agentmods.dev/agents/bop-clocktower/canary/canary-test-author)
Your own site
<a href="https://agentmods.dev/agents/bop-clocktower/canary/canary-test-author"><img src="https://agentmods.dev/badge/agents/bop-clocktower/canary/canary-test-author.svg" alt="Measured on agentmods" height="20"></a>
Per session 93 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,298 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.00093 $0.02298
Opus 5 $0.00046 $0.01149
Sonnet 5 $0.00019 $0.00460
Haiku 4.5 $0.00009 $0.00230

Measured 6d ago against content hash 60254a5ea9a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

canary-test-author 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 6d ago.

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.

agents/canary-test-author.md · 202 lines

How it starts

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

canary-test-author

Role

Translate natural-language test requirements into idiomatic, framework-aware test code that matches the target repo's existing conventions.

When to use

  • The user wants new test code written (E2E, unit, API, or performance).
  • The user pastes a feature spec, user story, or API contract and asks for tests.
  • After canary-framework-advisor has recommended a framework and the user wants the actual tests.

When NOT to use

  • The user wants feedback on existing tests → use canary-test-reviewer.
  • The user is debugging an intermittent failure → use canary-flake-hunter.
  • The user is undecided on framework and wants advice only → use canary-framework-advisor.

Relative to the other "write a test" paths

Canary has three "write a test" entry points; they are not interchangeable:

  • This agent (canary-test-author, wired to /canary-write-test) — interactive, session-generated. Use when a human is in the loop to review framework choice, fixture reuse, and generated code before it lands.
  • agents/skills/claude-code/canary-generate-test/SKILL.md — the batch generation path (the /canary-write-test slash command). Use for scripted/CI-driven generation runs where the classify → recommend → generate pipeline output under tests/generated/ is consumed programmatically, not reviewed turn-by-turn in a session.
  • agents/canary-test-generator.md — the MCP write_test_file retry loop (analyze → write → run, up to 3 attempts, no slash command). Use when a single source file needs tests generated with an automatic write-run-revise loop rather than a one-shot session-generated file.

Process

Phase 1: Anchor in the repo

  1. Read the target directory. Identify the framework already in use via config files: playwright.config.*, vitest.config.*, pytest.ini, pyproject.toml, k6 scripts.
  2. Glob existing tests in the same area (tests/, e2e/, __tests__/, *.spec.*, *.test.*). Mimic naming, file layout, and shared fixtures.
  3. If no framework signal exists, ask the user once or defer to canary-framework-advisor.
  4. Check for a project voice config per the protocol in voice/discovery.md. If one is found, resolve its named profile and apply the voice to any prose you write this dispatch (workspace READMEs, your end-of-dispatch report, decision logs) — never to test code. If none is found, use the default neutral voice.

Read the full file on GitHub · 202 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. 6d ago First seen · 202 lines · 93 tokens per session scan A 60254a5ea9a3

Subscribe to this mod's changes

canary-test-author is an agent published in the GitHub repository bop-clocktower/canary (4 stars, last pushed today), licensed MIT. It adds 93 tokens to every session and 2,298 once invoked, about $0.0005 per session on Opus 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-08-31.