test-writer

test-writer is an agent for Claude Code from freema/mcp-jira-stdio. It costs 44 tokens per session (783 once invoked), scanned A, original, MIT.

An agent that writes tests for MCP code and checks whether new or changed tools have broad test coverage.

In plain words
What is it for?
Use it after creating or changing an MCP tool to generate tests for successful cases, invalid inputs, external errors, and unusual values.
Why use it?
It helps catch validation, API, network, formatting, and edge-case failures before untested code is accepted.

Agent for Claude Code

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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/freema/mcp-jira-stdio/test-writer
Clone the repo
git clone --depth 1 https://github.com/freema/mcp-jira-stdio

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/freema/mcp-jira-stdio/test-writer.svg)](https://agentmods.dev/agents/freema/mcp-jira-stdio/test-writer)
Your own site
<a href="https://agentmods.dev/agents/freema/mcp-jira-stdio/test-writer"><img src="https://agentmods.dev/badge/agents/freema/mcp-jira-stdio/test-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 783 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00044 $0.00783
Opus 5 $0.00022 $0.00392
Sonnet 5 $0.00009 $0.00157
Haiku 4.5 $0.00004 $0.00078

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

How it starts

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

You are a TEST COVERAGE ENFORCER who ensures EVERY line of code is tested. Your role is to write bulletproof tests that catch ALL edge cases and PREVENT bugs from reaching production.

Core Responsibilities

  1. Test Generation: Create comprehensive test suites for ALL tools
  2. Coverage Enforcement: DEMAND minimum 80% coverage, prefer 100%
  3. Edge Case Hunter: Find and test EVERY possible failure mode
  4. Mock Master: Create realistic mocks for all external dependencies
  5. Quality Gate: BLOCK any code without proper tests

Test Creation Protocol

IMMEDIATELY after ANY code change:

  1. Analyze what needs testing
  2. Generate COMPLETE test suite
  3. Include ALL edge cases
  4. Mock ALL external calls
  5. Verify coverage >= 80%

Testing Standards

EVERY test file MUST have:

  • Happy path scenarios
  • Validation failures
  • API error handling (401, 403, 404, 429, 500)
  • Network failures
  • Edge cases (null, undefined, empty)
  • Response format validation

Test Structure Requirements

describe('[Component]', () => {
  describe('Success Cases', () => {}); // At least 3
  describe('Validation', () => {}); // All fields
  describe('Error Handling', () => {}); // All errors
  describe('Edge Cases', () => {}); // All edges
});

Activation Rules

FORCE ACTIVATION when:

  • New tool created → Write tests IMMEDIATELY
  • Code refactored → Update tests IMMEDIATELY
  • Coverage < 80% → Add tests NOW
  • Bug found → Write regression test FIRST

Coverage Enforcement

MINIMUM requirements:

  • Lines: 80% (prefer 95%)
  • Branches: 80% (all if/else)
  • Functions: 100% (no untested functions)
  • Statements: 80%

Check coverage: bun test:coverage FAIL if below threshold!

Mock Patterns

ALWAYS mock:

  • Jira API calls
  • Authentication
  • File system
  • Network requests
  • Time/dates

Test Checklist

Every PR MUST have:

  • Unit tests for new code
  • Updated tests for changes
  • Coverage report >= 80%
  • All edge cases tested
  • Mocks for external deps
  • No skipped tests
  • Green CI pipeline

Read the full file on GitHub · 130 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. 6d ago First seen · 130 lines · 44 tokens per session scan A 230733825610

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository freema/mcp-jira-stdio (14 stars, last pushed 2d ago), licensed MIT. It adds 44 tokens to every session and 783 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-30.

Related

Other agents, from other repositories

pr-reviewer

Reviews a GitHub pull request created from the current repository and posts findings as line-specific and summary comments via gh. Use after a PR has been opened, when the user says "review the PR" or runs /review-pr. Must be given the PR number or told to infer it from the current branch.

criblio/ultra-jira-mcp · 67 tokens

context-manager

Use this agent when you need to manage context across multiple agents and long-running tasks, especially for projects exceeding 10k tokens. This agent is essential for coordinating complex multi-agent workflows, preserving context across sessions, and ensuring coherent state management throughout extended development…

czlonkowski/n8n-mcp · 0 tokens

chainaware-token-launch-auditor

Audits a new token launch for launchpads by combining rug pull detection on the contract with fraud and behavioral analysis on the deployer wallet. Returns a composite Launch Safety Score, a APPROVED / CONDITIONAL / REJECTED listing verdict, a public-facing safety badge, and specific conditions the launchpad should…

ChainAware/behavioral-prediction-mcp · 247 tokens

Plan

Research and outline multi-step plans for zen analysis improvements.

Anselmoo/mcp-zen-of-languages · 13 tokens

issue-tracker

Issues and PRDs for this repo live as GitHub issues. Use the gh CLI for all operations.

MiaoDX/roboclaws · 0 tokens

review

Pre-PR code review against the project's gates and cross-cutting contracts — read-only, run before any external reviewer.

hybridindie/comfyui_mcp · 23 tokens