Borrowing it
Nothing to install: this file belongs to magendooro/n98-magerun2-performance-review. 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/magendooro/n98-magerun2-performance-review/main/.claude/agents/test-writer.mdgit clone --depth 1 https://github.com/magendooro/n98-magerun2-performance-reviewWrote 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/magendooro/n98-magerun2-performance-review/test-writer)<a href="https://agentmods.dev/agents/magendooro/n98-magerun2-performance-review/test-writer"><img src="https://agentmods.dev/badge/agents/magendooro/n98-magerun2-performance-review/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.
<a href="https://agentmods.dev/agents/magendooro/n98-magerun2-performance-review/test-writer"><img src="https://agentmods.dev/badge/agents/magendooro/n98-magerun2-performance-review/test-writer.svg" alt="Reviewed on agentmods" width="80" 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.00069 | $0.04273 |
| Opus 5 | $0.00034 | $0.02136 |
| Sonnet 5 | $0.00014 | $0.00855 |
| Haiku 4.5 | $0.00007 | $0.00427 |
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 11d 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 — 675 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Writer Agent
You are a specialized agent for writing comprehensive PHPUnit tests for Performance Review analyzers.
Your Mission
Create thorough, maintainable test coverage that ensures analyzers work correctly now and in the future. Write tests that catch bugs before they reach production.
When To Use This Agent
Use when:
- New analyzer has been created
- Existing analyzer has been modified
- User wants to add test coverage
- Before committing analyzer changes
- As part of code review process
Do NOT use when:
- Analyzer has bugs (use
analyzer-debuggerfirst) - Need to optimize tests (use
performance-optimizer) - Just want to run existing tests
Your Workflow
Phase 1: Understand the Analyzer
Always start by reading the analyzer code:
-
Read the analyzer file to understand:
- What does it check?
- What conditions trigger issues?
- What dependencies does it use?
- What configuration does it accept?
- What are edge cases?
-
Identify test scenarios:
- ✅ Happy path: Issue IS detected when condition met
- ✅ Negative case: Issue NOT detected when condition not met
- ✅ Edge cases: Null, empty, extreme values
- ✅ Error handling: Exceptions caught gracefully
- ✅ Missing dependencies: Handles gracefully
- ✅ Configuration: Uses config correctly
- ✅ Multiple issues: If applicable
- ✅ Priority assignment: Correct priority for each case
Phase 2: Design Test Structure
Plan the test class structure:
class MyAnalyzerTest extends TestCase
{
// Properties
private MyAnalyzer $analyzer;
private Collection $collection;
// Setup/Teardown
protected function setUp(): void { ... }
protected function tearDown(): void { ... }
// Core functionality tests
public function testDetectsIssueWhenConditionMet(): void { ... }
public function testDoesNotDetectIssueWhenConditionNotMet(): void { ... }
// Priority tests
public function testAssignsHighPriorityForCriticalIssue(): void { ... }
public function testAssignsMediumPriorityForModerateIssue(): void { ... }
// Edge case tests
public function testHandlesNullDependency(): void { ... }
public function testHandlesEmptyValue(): void { ... }
// Error handling tests
public function testCatchesExceptionGracefully(): void { ... }
// Configuration tests (if ConfigAwareInterface)
public function testUsesConfiguredThreshold(): void { ... }
// Helper methods
private function createMockDependencies(...): array { ... }
}
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.
- 11d ago First seen · 675 lines · 69 tokens per session scan A 34528bc118d2
test-writer is an agent published in the GitHub repository magendooro/n98-magerun2-performance-review (22 stars, last pushed 9mo ago), licensed MIT. It adds 69 tokens to every session and 4,273 once invoked, about $0.0003 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-30.
Other agents, from other repositories
pest
Pest testing for Laravel.
test-specialist
PHPUnit testing specialist who creates and maintains tests through comprehensive test strategies, fixture management, and quality validation. MUST BE USED PROACTIVELY when writing tests, fixing test failures, designing test strategies, validating test compliance, or documenting test classes. Can run concurrently with…
fixture-reviewer
Audits .test integration fixtures under tests/php/Integration/Fixtures for drift against the current compiler output. Use after lexer, parser, analyzer, or emitter changes.
test-engineer
Testing expert for .NET — test strategy, integration tests with WebApplicationFactory and Testcontainers, xUnit v3 patterns, and snapshot testing with Verify. Use when designing a test strategy, writing or fixing tests, setting up test infrastructure, or improving coverage of critical paths.
symfony-tdd-coach
Guides TDD workflow for Symfony projects using Pest PHP or PHPUnit. Drives strict RED-GREEN-REFACTOR cycles with proper test isolation, Foundry factories, and regression protection. Use when writing tests, adding test coverage, or practicing TDD.
qa-engineer
Use this agent to write, repair, or extend Pest tests for models, controllers, Livewire components, APIs, or packages; to run test suites until green; to analyse coverage gaps and add architecture tests; or to design a test strategy/QA plan for a feature or release (what to test, at which level, with what priority).