ai-tab-optimizer: Agent for Claude Code

.claude/agents/test-writer.md

test-writer is an agent for Claude Code from eiler2005/ai-tab-optimizer. It costs 15 tokens per session (237 once invoked), scanned A, original, MIT.

An agent that reads source files and writes focused tests using Vitest for TypeScript or pytest for Python. It checks normal cases, edge cases, and expected errors while mocking outside services.

In plain words
What is it for?
Use it to create unit tests for TypeScript extensions or Python FastAPI endpoints, including tests for invalid input, failed operations, and external dependencies.
Why use it?
It saves time when a module has little or no test coverage and reduces the chance of overlooking failure cases. Tests are run afterward to check whether they pass.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is eiler2005/ai-tab-optimizer's own configuration. It tells Claude Code how to work on ai-tab-optimizer 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 ai-tab-optimizer configures →

Reuse

Borrowing it

Nothing to install: this file belongs to eiler2005/ai-tab-optimizer. 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/eiler2005/ai-tab-optimizer/master/.claude/agents/test-writer.md
Clone the repo
git clone --depth 1 https://github.com/eiler2005/ai-tab-optimizer

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/eiler2005/ai-tab-optimizer/test-writer/github.svg)](https://agentmods.dev/agents/eiler2005/ai-tab-optimizer/test-writer)
Your own site
<a href="https://agentmods.dev/agents/eiler2005/ai-tab-optimizer/test-writer"><img src="https://agentmods.dev/badge/agents/eiler2005/ai-tab-optimizer/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/eiler2005/ai-tab-optimizer/test-writer"><img src="https://agentmods.dev/badge/agents/eiler2005/ai-tab-optimizer/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 237 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.00015 $0.00237
Opus 5.5 $0.00006 $0.00095
Sonnet 5.5 $0.00003 $0.00047
Haiku 4.5 $0.00002 $0.00024

Measured 11d ago against content hash 2a4d85211b86, 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 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.

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

What it actually says

You are a test engineer for the AITab project.

When given a file or module to test:

  1. Read the source file and understand its public API, edge cases, and dependencies
  2. Check existing test files for patterns (look in extension/src/**/*.test.ts or tests/)
  3. Write focused unit tests covering:
    • Happy path for each public function/method
    • Edge cases (empty input, null, boundary values)
    • Error paths (invalid input, failed operations)
  4. For TypeScript (extension): use Vitest + happy-dom, import from @shared/*
  5. For Python (agent.py): use pytest + httpx for FastAPI endpoint tests
  6. Mock external dependencies (Chrome APIs, fetch, subprocess) — never call real services
  7. Run the tests after writing them to verify they pass

Keep tests focused and minimal. One assertion per test when possible. No unnecessary test helpers.

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. 11d ago Changed 2a4d85211b86
  2. 2mo ago First seen · 24 lines · 15 tokens per session scan A 759e607ac1de

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository eiler2005/ai-tab-optimizer (3 stars, last pushed 11d ago), licensed MIT. It adds 15 tokens to every session and 237 once invoked, about $0.0001 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

Other agents, from other repositories

test-writer

Use this agent to identify and test a distinct, realistic regression that existing tests do not catch, including during test-driven development. Do not generate a comprehensive suite by default. Invoke /writing-tests before changing test setup or assertions.\n\nExamples:\n \nContext: The user has just implemented a…

PostHog/posthog · 359 tokens

test-engineer

TDD & Logic Verification Expert. Specializes in the 'Inner Loop' of development: Unit Testing, Integration Testing, and Mocking Strategies.

DDS-Solutions/AI-TadPole-OS · 33 tokens

test-gap-finder

Finds missing, weak, or stale test coverage in a diff. Use during review when production logic, user flows, error paths, or acceptance criteria changed.

HoangNguyen0403/agent-skills-standard · 37 tokens

testing-bug-fixer

A bug-fixing agent that reproduces problems, traces them to their underlying cause, applies a small targeted change, and adds a regression test.

CronusL-1141/AI-company · 43 tokens

qa-automation-engineer

Quality Assurance & Automation Architect. Specializes in the "Testing Pyramid" (Unit, Integration, E2E), destructive testing, and CI/CD quality gates. The final arbiter of "Done.".

DDS-Solutions/AI-TadPole-OS · 46 tokens

frontend-test-engineer

Frontend test engineer for Arthur MCP. Use when writing, reviewing, debugging, or improving frontend tests for React pages, feature components, hooks, API client behavior, routing, permissions, i18n, forms, and user-visible flows with Vitest and React Testing Library.

alexmmatos/arthur-mcp · 59 tokens