stoa: Agent for Claude Code

.claude/agents/test-writer.md

test-writer is an agent for Claude Code from stoa-platform/stoa. It costs 49 tokens per session (1,591 once invoked), scanned A, original, Apache-2.0.

A test-writing agent for unit, integration, and end-to-end tests across React/TypeScript, Python, and Rust projects. End-to-end tests check complete user flows in a running application.

In plain words
What is it for?
Use it to write Vitest and React Testing Library tests, pytest tests, Rust tests, or Playwright BDD tests for the listed STOA components.
Why use it?
It helps create tests that follow the repository's required frameworks, mocks, markers, coverage rules, and naming conventions.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md.

This is stoa-platform/stoa's own configuration. It tells Claude Code how to work on stoa itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything stoa configures →

Reuse

Borrowing it

Nothing to install: this file belongs to stoa-platform/stoa. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/stoa-platform/stoa/main/.claude/agents/test-writer.md
Clone the repo
git clone --depth 1 https://github.com/stoa-platform/stoa

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 test-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/stoa-platform/stoa/test-writer/github.svg)](https://agentmods.dev/agents/stoa-platform/stoa/test-writer)
Your own site
<a href="https://agentmods.dev/agents/stoa-platform/stoa/test-writer"><img src="https://agentmods.dev/badge/agents/stoa-platform/stoa/test-writer/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 test-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/stoa-platform/stoa/test-writer"><img src="https://agentmods.dev/badge/agents/stoa-platform/stoa/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 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,591 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.00049 $0.01591
Opus 5.5 $0.00020 $0.00636
Sonnet 5.5 $0.00010 $0.00318
Haiku 4.5 $0.00005 $0.00159

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

Security

Grade A, and why

test-writer 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 2mo 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.

.claude/agents/test-writer.md · 150 lines

How it starts

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

Test Writer — Generateur de Tests STOA

Tu es un Test Engineer specialise pour le monorepo STOA Platform.

Frameworks par composant

Composant Framework Runner CI Threshold Chemin tests
control-plane-api pytest + pytest-asyncio pytest --cov=src 53% coverage tests/
control-plane-ui vitest + React Testing Library npm run test ESLint max 93 warnings src/**/*.test.tsx
portal vitest + React Testing Library npm run test ESLint max 20 warnings src/**/*.test.tsx
stoa-gateway cargo test cargo test --all-features 0 clippy warnings src/ (inline)
e2e Playwright + playwright-bdd npx playwright test - features/ + steps/

Conventions critiques

  • vitest (JAMAIS Jest) pour React/TypeScript
  • asyncio_mode = "auto" pour pytest-asyncio
  • MSW (Mock Service Worker) pour les mocks reseau React
  • React Testing Library (JAMAIS Enzyme)
  • Markers pytest: @slow, @integration, @unit
  • Coverage minimum: 53% control-plane-api (see ci-quality-gates.md; stoa-gateway has its own gate in stoa-gateway/CLAUDE.md)
  • ESLint ratchet: control-plane-ui max 93 warnings, portal max 20 warnings

Shared Test Helpers (React — OBLIGATOIRE)

Toujours utiliser les helpers partages pour les tests React:

  • Console: control-plane-ui/src/test/helpers.tsx
  • Portal: portal/src/test/helpers.tsx

Exports cles:

  • createAuthMock(role: PersonaRole) — mock complet de useAuth pour un role
  • renderWithProviders(ui, options?) — wrapper QueryClientProvider + MemoryRouter
  • Mock data factories: mockTenant(), mockAPI(), mockApplication(), mockGatewayInstance(), mockGatewayDeployment(), mockExternalMCPServer()

Regles:

  • Toujours createAuthMock(role) — jamais de mock inline pour useAuth
  • Toute page avec RBAC conditionnel → tester les 4 personas (describe.each)
  • vi.clearAllMocks() ne reset PAS les implementations → re-initialiser les mocks dans beforeEach
  • Voir testing-standards.md pour les regles completes

Read the full file on GitHub · 150 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. 2mo ago First seen · 150 lines · 49 tokens per session scan A fd26d766bb6d

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository stoa-platform/stoa (9 stars, last pushed yesterday), licensed Apache-2.0. It adds 49 tokens to every session and 1,591 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-08-31.

Related

test-writer compared with agents from other repositories

test-writer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-writerstoa-platform/stoaAgent9yesterdayApache-2.0A49Claude Code
tdd-guideaffaan-m/ECCAgent298k4d agoMITA42Claude Code, Kiro
test-automatorechoVic/blade-codeAgent18124d agoMITA46Claude Code
test-architectdshakes/compassAgent214d agoMITA72Claude Code
devhamc/blastproofAgent116d agoMITA50Claude Code
test-engineerashrafmusa/agenticanaAgent24d agoMITA49Claude Code
pact-test-engineerSynaptic-Labs-AI/PACT-PluginAgent73yesterdayMITA40Claude Code