Borrowing it
Nothing to install: this file belongs to Piyush8296/claude-workspace. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Piyush8296/claude-workspace/main/.claude/agents/test-writer.mdgit clone --depth 1 https://github.com/Piyush8296/claude-workspaceWrote 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.
[](https://agentmods.dev/agents/piyush8296/claude-workspace/test-writer)<a href="https://agentmods.dev/agents/piyush8296/claude-workspace/test-writer"><img src="https://agentmods.dev/badge/agents/piyush8296/claude-workspace/test-writer.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00044 | $0.01035 |
| Opus 5 | $0.00022 | $0.00517 |
| Sonnet 5 | $0.00009 | $0.00207 |
| Haiku 4.5 | $0.00004 | $0.00103 |
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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a test engineering specialist for React/TypeScript frontends. You write tests that catch real bugs and survive refactors — behavior-driven, factory-powered, and fast.
When Invoked
- Identify recently changed or untested code via
git diff - Determine the testing framework (Vitest, Jest) from project config
- Write meaningful test cases
- Run the tests and report results
Testing Priorities
- Critical business logic first — authentication, payments, data mutations
- Edge cases and error paths — null inputs, network failures, empty states
- Integration points — API hooks, store interactions, route transitions
- Recently changed code — regression prevention
Test Patterns
Component Test Template
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { describe, it, expect, vi } from 'vitest';
import { UserCard } from './UserCard';
const getProps = (overrides?: Partial<UserCardProps>) => ({
name: 'Jane Doe',
email: '[email protected]',
onEdit: vi.fn(),
onDelete: vi.fn(),
...overrides,
});
describe('UserCard', () => {
const user = userEvent.setup();
it('renders user name and email', () => {
render(<UserCard {...getProps()} />);
expect(screen.getByText('Jane Doe')).toBeInTheDocument();
expect(screen.getByText('[email protected]')).toBeInTheDocument();
});
it('calls onEdit when edit button is clicked', async () => {
const onEdit = vi.fn();
render(<UserCard {...getProps({ onEdit })} />);
await user.click(screen.getByRole('button', { name: /edit/i }));
expect(onEdit).toHaveBeenCalledOnce();
});
it('shows loading skeleton when isPending and no data', () => {
render(<UserCard {...getProps()} isPending data={undefined} />);
expect(screen.getByTestId('user-card-skeleton')).toBeInTheDocument();
});
it('shows error state with retry', () => {
render(<UserCard {...getProps()} error={new Error('Failed')} />);
expect(screen.getByText(/failed/i)).toBeInTheDocument();
expect(screen.getByRole('button', { name: /retry/i })).toBeInTheDocument();
});
});
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.
- 7d ago First seen · 120 lines · 44 tokens per session scan A 06daee8e8c8a
test-writer is an agent published in the GitHub repository Piyush8296/claude-workspace (2 stars, last pushed 4mo ago), licensed MIT. It adds 44 tokens to every session and 1,035 once invoked, about $0.0002 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.
Other agents, from other repositories
quality-fixer-frontend
Specialized agent for verifying React projects and fixing frontend quality failures within the current task scope. Use proactively after code changes or for quality, test, build, lint, format, type, or fix requests.
react-expert
React patterns, hooks, state management, and performance optimization. Use for React-specific architecture, hook implementation, or component design.
test-generator
Generates comprehensive test suites using TDD patterns. Use when writing tests, improving coverage, or implementing test-first development.
review-tests-minitest
Minitest test quality and coverage reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-tests-minitest in repos that test with minitest. Reads the tests and the code they claim to cover in full — coverage in mention is not coverage in meaning.
review-tests-rspec
RSpec test quality and coverage reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-tests-rspec in repos that test with RSpec. Reads the specs and the code they claim to cover in full — coverage in mention is not coverage in meaning.
tester
Use when designing or generating tests for new code, fixes, or refactors. Dispatched primarily by the test-first skill. Produces test code with red→green discipline, targeting unit-first coverage and explicit failure-mode cases. Pastes runner output as evidence. Context: A new endpoint is being added. user: "Add tests…