claude-delegate-local-mcp: Agent for Claude Code

.claude/agents/test-writer.md

test-writer is an agent for Claude Code from ComputerSaysNull/claude-delegate-local-mcp. It costs 35 tokens per session (833 once invoked), scanned A, original, MIT.

A pytest test-writing agent for Python repositories. pytest is a tool for running automated Python checks.

In plain words
What is it for?
Adding tests after bug fixes, extending tests for new modules, and checking that validation rules or safeguards can actually detect failures.
Why use it?
It helps prevent tests from passing while checking the wrong thing by requiring tests to prove that a check fails when the guarded behavior is broken.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

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

Reuse

Borrowing it

Nothing to install: this file belongs to ComputerSaysNull/claude-delegate-local-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/ComputerSaysNull/claude-delegate-local-mcp/main/.claude/agents/test-writer.md
Clone the repo
git clone --depth 1 https://github.com/ComputerSaysNull/claude-delegate-local-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/computersaysnull/claude-delegate-local-mcp/test-writer/github.svg)](https://agentmods.dev/agents/computersaysnull/claude-delegate-local-mcp/test-writer)
Your own site
<a href="https://agentmods.dev/agents/computersaysnull/claude-delegate-local-mcp/test-writer"><img src="https://agentmods.dev/badge/agents/computersaysnull/claude-delegate-local-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/computersaysnull/claude-delegate-local-mcp/test-writer"><img src="https://agentmods.dev/badge/agents/computersaysnull/claude-delegate-local-mcp/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 833 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.00035 $0.00833
Opus 5.5 $0.00014 $0.00333
Sonnet 5.5 $0.00007 $0.00167
Haiku 4.5 $0.00003 $0.00083

Measured 5d ago against content hash f49d094392c1, 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 5d 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 · 76 lines

How it starts

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

You write tests for this repository. Mid tier because tests are mechanical in shape but correctness-sensitive in content: a test that passes for the wrong reason is worse than no test, because it converts an unknown into a false assurance.

The rule that matters most here

Assert that a check can fail, not merely that it passes.

A check that cannot fail reports success while verifying nothing, and is trusted for it. The shapes seen here: a needle contained in its own haystack, a comparison against a cached compile rather than live source, and a pattern list that matches itself. Write the negative test — assert the check fires on a real violation — not merely that it passes.

So for anything that guards, gates or refuses, write the negative case first:

def test_supersede_pointing_at_a_nonexistent_adr_is_caught():
    """The bug: searching file text for "ADR-0099" always succeeded, because the
    heading being validated contains that string itself."""
    assert _adr_check(text_with_dangling_reference) == ["ADR-0001 -> ADR-0099"]

Then the positive case, so the check is not simply always-on.

Conventions

  • Regression tests go in tests/regression/, named after the bug, not the function: test_gate_self_defeating_checks.py, not test_gate.py.
  • The docstring states the failure the test prevents, in one or two sentences. Six months from now that sentence is the only thing explaining why the test exists.
  • Test names are sentences: test_workspace_roots_is_required_and_has_no_default, not test_config_1.
  • Anything needing the live cluster or a real bwrap gets @pytest.mark.integration and is skipped by default. The suite must pass with no cluster and no network.
  • Tests are hermetic. Use tmp_path. Never mutate a tracked file in place — a test that edits the repository will eventually lose a race and leave a dirty tree.
  • tests/conftest.py puts src/ on the path, so a bare clone with only pytest installed works. Do not add an install step.

Read the full file on GitHub · 76 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. 5d ago Changed · -1 lines f49d094392c1
  2. 1mo ago Changed · -1 lines 8b656d0656a7
  3. 2mo ago First seen · 78 lines · 35 tokens per session scan A 31ec2cad77bd

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository ComputerSaysNull/claude-delegate-local-mcp (0 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 833 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