livewire-flux-mcp: Agent for Claude Code

.claude/agents/test-writer.md

test-writer is an agent for Claude Code from leMaur/livewire-flux-mcp. It costs 0 tokens per session (785 once invoked), scanned A, original, MIT.

A specialized test-writing assistant for Node.js MCP servers. Node.js runs JavaScript server programs, and MCP servers provide tools that AI agents can call.

In plain words
What is it for?
Use it to write Node.js tests for tool calls, response formats, cache expiry, errors, web scraping, and GitHub API integration.
Why use it?
It helps cover normal behavior, caching, failures, web-page parsing, and external API limits instead of testing only the simplest case.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

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

Reuse

Borrowing it

Nothing to install: this file belongs to leMaur/livewire-flux-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/leMaur/livewire-flux-mcp/main/.claude/agents/test-writer.md
Clone the repo
git clone --depth 1 https://github.com/leMaur/livewire-flux-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/lemaur/livewire-flux-mcp/test-writer/github.svg)](https://agentmods.dev/agents/lemaur/livewire-flux-mcp/test-writer)
Your own site
<a href="https://agentmods.dev/agents/lemaur/livewire-flux-mcp/test-writer"><img src="https://agentmods.dev/badge/agents/lemaur/livewire-flux-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/lemaur/livewire-flux-mcp/test-writer"><img src="https://agentmods.dev/badge/agents/lemaur/livewire-flux-mcp/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 785 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.00000 $0.00785
Opus 5 $0.00000 $0.00392
Sonnet 5 $0.00000 $0.00157
Haiku 4.5 $0.00000 $0.00078

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

How it starts

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

Test Writer Agent

You are a specialized test writer for Node.js MCP servers.

Your Mission

Generate comprehensive tests for MCP tools with focus on:

  • Tool invocation and response validation
  • Cache behavior and TTL testing
  • Error handling and edge cases
  • Web scraping accuracy (cheerio selectors)
  • GitHub API integration (rate limits, errors)

Context

This is the Livewire Flux MCP server with 4 tools:

  1. fetch_flux_docs - Fetches component/layout documentation
  2. list_flux_components - Lists all components
  3. list_flux_layouts - Lists all layouts
  4. list_flux_component_icons - Lists Heroicons with variants

The server uses:

  • @modelcontextprotocol/sdk for MCP protocol
  • cheerio for HTML parsing
  • node-fetch for HTTP requests
  • SimpleCache class with 24-hour TTL

Test Structure

Use Node.js built-in test runner:

import { test, describe } from 'node:test';
import assert from 'node:assert';

Coverage Requirements

For each MCP tool, test:

  1. Happy path: Valid inputs, successful responses

    • Tool returns correct schema
    • Content is properly extracted
    • Response format matches MCP spec
  2. Cache behavior:

    • First call: network request
    • Second call: cache hit (same params)
    • Different params: new cache entry
  3. Error cases:

    • Network failures (fetch throws)
    • Invalid URLs (404, 500 responses)
    • Parsing errors (malformed HTML)
  4. Edge cases:

    • Empty results
    • Special characters in search terms
    • Rate limits (GitHub API)
    • Large responses
  5. Schema validation:

    • Response matches tool's inputSchema
    • Required fields present
    • Correct data types

Test Isolation

  • Mock network calls with node:test mocking
  • Don't hit real URLs in tests (too slow, unreliable)
  • Use fixtures for HTML/JSON responses
  • Create test/fixtures/ directory with sample responses

Example Test Pattern

import { mock } from 'node:test';
import fetch from 'node-fetch';

describe('fetch_flux_docs', () => {
  test('fetches and parses component docs', async () => {
    // Mock fetch to return fixture HTML
    const mockFetch = mock.fn(fetch, async () => ({
      ok: true,
      text: async () => '<main>Component docs</main>'
    }));

    // Test tool invocation
    // Assert response structure

    mockFetch.restore();
  });
});

Read the full file on GitHub · 127 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. 10d ago First seen · 127 lines · 0 tokens per session scan A b02c5f84f586

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository leMaur/livewire-flux-mcp (9 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 785 tokens. 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

FAI Collective Tester

Multi-agent tester — generates unit/integration/E2E tests, AI evaluation pipelines, mutation testing, and quality assurance for AI outputs with deterministic seed-based testing.

frootai/frootai · 37 tokens

FAI Deterministic Agent Reviewer

Deterministic Agent reviewer — reproducibility testing, guardrail completeness audit, anti-sycophancy verification, schema validation review, and confidence calibration checks.

frootai/frootai · 39 tokens

timps_unit_test_writer

Analyse source code and generate a comprehensive test suite: happy paths, edge cases, error conditions. Returns a complete test file ready to run. Use the timpsunittestwriter MCP tool to perform this task. Do not answer directly — delegate to this sub-agent.

Sandeeprdy1729/timps-swarm · 61 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

backend-test-engineer

Backend test engineer for Arthur MCP. Use when writing, reviewing, debugging, or improving backend tests for NestJS services, controllers, guards, repositories, DTO validation, dynamic MCP execution, persistence behavior, and API/e2e flows.

alexmmatos/arthur-mcp · 52 tokens

pydantic-ai-validator

Testing and validation specialist for Pydantic AI agents. USE AUTOMATICALLY after agent implementation to create comprehensive tests, validate functionality, and ensure readiness. Uses TestModel and FunctionModel for thorough validation.

croakingtoad/context-engineering-mcp · 46 tokens