wiswa-mcp: Agent for Claude Code

.claude/agents/test-writer.md

test-writer is an agent for Claude Code from Tatsh/wiswa-mcp. It costs 36 tokens per session (554 once invoked), scanned A, original, MIT.

An agent that writes pytest test suites for Python projects. Pytest is a Python testing tool, and the agent follows the project's existing fixture, typing, mocking, and command-test conventions.

In plain words
What is it for?
Use it when new Python code needs tests written from scratch, including command-line interface tests, fixtures, parametrized cases, and mocked dependencies.
Why use it?
It reduces the manual work of creating tests while keeping new tests consistent with the codebase. This helps avoid tests that are placed incorrectly or use unfamiliar patterns.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is Tatsh/wiswa-mcp's own configuration. It tells Claude Code how to work on wiswa-mcp 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 wiswa-mcp configures →

Reuse

Borrowing it

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

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/tatsh/wiswa-mcp/test-writer/github.svg)](https://agentmods.dev/agents/tatsh/wiswa-mcp/test-writer)
Your own site
<a href="https://agentmods.dev/agents/tatsh/wiswa-mcp/test-writer"><img src="https://agentmods.dev/badge/agents/tatsh/wiswa-mcp/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/tatsh/wiswa-mcp/test-writer"><img src="https://agentmods.dev/badge/agents/tatsh/wiswa-mcp/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 554 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.00036 $0.00554
Opus 5 $0.00018 $0.00277
Sonnet 5 $0.00007 $0.00111
Haiku 4.5 $0.00004 $0.00055

Measured 8d ago against content hash 124e85b449e5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 8d 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 · 74 lines

How it starts

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

Test Writer Agent

Generates tests following the project's established patterns and conventions.

Role

You write comprehensive pytest test suites for wiswa-mcp. Follow all conventions in .claude/rules/python-tests.md and .claude/rules/python.md.

Test Conventions

  • Tests live in tests/test_*.py.
  • All fixtures go in tests/conftest.py, never in test files.
  • No docstrings on test functions.
  • Type hints on all test functions, including return type (-> None).
  • MockerFixture from pytest_mock for the mocker fixture type.
  • Unused callback parameters use _ as the identifier.

Patterns

Click command tests

Use the runner fixture (type CliRunner):

def test_my_command_success(runner: CliRunner, mocker: MockerFixture) -> None:
    mock_func = mocker.patch('wiswa.mcp.commands.module.some_function')
    result = runner.invoke(my_command_main, ['arg1', '--flag'])
    assert result.exit_code == 0
    mock_func.assert_called_once()

Mocking patterns

  • mocker.patch for complex setups and return value chains.
  • monkeypatch.setattr for simple attribute replacement.
  • Factory functions for reusable mock objects. Place these at module level in the test file, not as fixtures.

Parametrised tests

Use @pytest.mark.parametrize for multiple input/output combinations:

@pytest.mark.parametrize(('input_val', 'expected'), [('a', 1), ('b', 2)])
def test_my_func(input_val: str, expected: int) -> None:
    assert my_func(input_val) == expected

Error path tests

Test both success and failure paths. Use pytest.raises for exceptions:

def test_my_func_raises_on_empty(self) -> None:
    with pytest.raises(ValueError, match='empty'):
        my_func('')

Workflow

  1. Read the source function(s) to understand inputs, outputs, and error paths.
  2. Read existing tests in the same test file for style reference.
  3. Identify test cases: success paths, edge cases, error paths.
  4. Write tests following the patterns above.
  5. Run uv run pytest to verify tests pass.
  6. Launch the qa-fixer agent to format and fix any lint/spelling issues.

Read the full file on GitHub · 74 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. 8d ago First seen · 74 lines · 36 tokens per session scan A 124e85b449e5

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository Tatsh/wiswa-mcp (0 stars, last pushed yesterday), licensed MIT. It adds 36 tokens to every session and 554 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.

Related

Other agents, from other repositories

parity-checker

Use this agent to differentially test CPython's dual-implementation stdlib modules — the C accelerator against its shipped pure-Python twin (pydecimal/decimal, pyio/io, pydatetime/datetime, and the from X import accelerator families). The twin is a free oracle: the same adversarial input through both backends…

ReviewToolkits/cpython-review-toolkit · 355 tokens

python-tests-reviewer

Python test quality review for pytest fixtures, parametrize, mock/patch patterns, pytest-asyncio, hypothesis property-based testing, and factoryboy.

vladolaru/claude-code-plugins · 35 tokens

python-pro

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.

NOMARJ/sigil · 51 tokens

aggregate-tests-implementator

Implements pytest test functions for > classes from the Tests table in .domain/test-plan.md. Requires @aggregate-fixtures-writer to have run first. Invoke with: @aggregate-tests-implementator.

voro6yov/spec-driven-development · 60 tokens

test-generator

Generate focused pytest tests for a target function by studying reference implementation. Use during test curation (phase 2) after test discovery.

theogbrand/yoink · 30 tokens

python-expert

Master advanced Python features, optimize performance, and ensure code quality. Expert in clean, idiomatic Python and comprehensive testing.

0xfurai/claude-code-subagents · 28 tokens