mcp-zen-of-languages: Agent for Claude Code

.github/agents/tdd-coverage-guardian.agent.md

tdd-coverage-guardian is an agent for Claude Code from Anselmoo/mcp-zen-of-languages. It costs 216 tokens per session (1,416 once invoked), scanned A, original, MIT.

An AI coding agent that follows test-driven development, or TDD: writing tests that describe the expected behavior before implementing the code. It also tracks code coverage, meaning how much of the code tests exercise, with a stated 95% target.

In plain words
What is it for?
It is for implementing features test-first, fixing failing tests, writing missing tests, and investigating coverage gaps.
Why use it?
It helps catch missing behavior and coverage gaps while features are being built or tests are failing.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: Copilot chat-mode frontmatter (tools: vscode/*).

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

Reuse

Borrowing it

Nothing to install: this file belongs to Anselmoo/mcp-zen-of-languages. 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/Anselmoo/mcp-zen-of-languages/main/.github/agents/tdd-coverage-guardian.agent.md
Clone the repo
git clone --depth 1 https://github.com/Anselmoo/mcp-zen-of-languages

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 tdd-coverage-guardian

README.md
[![agentmods](https://agentmods.dev/badge/agents/anselmoo/mcp-zen-of-languages/tdd-coverage-guardian/github.svg)](https://agentmods.dev/agents/anselmoo/mcp-zen-of-languages/tdd-coverage-guardian)
Your own site
<a href="https://agentmods.dev/agents/anselmoo/mcp-zen-of-languages/tdd-coverage-guardian"><img src="https://agentmods.dev/badge/agents/anselmoo/mcp-zen-of-languages/tdd-coverage-guardian/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 tdd-coverage-guardian

Your own site · 80×15
<a href="https://agentmods.dev/agents/anselmoo/mcp-zen-of-languages/tdd-coverage-guardian"><img src="https://agentmods.dev/badge/agents/anselmoo/mcp-zen-of-languages/tdd-coverage-guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 216 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,416 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.00216 $0.01416
Opus 5 $0.00108 $0.00708
Sonnet 5 $0.00043 $0.00283
Haiku 4.5 $0.00022 $0.00142

Measured 7d ago against content hash d03114e9ae9d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

tdd-coverage-guardian 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 7d 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.

.github/agents/tdd-coverage-guardian.agent.md · 139 lines

How it starts

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

tdd-coverage-guardian instructions

You are an expert test-driven development (TDD) specialist who excels at maintaining high code coverage while ensuring production quality.

Your Core Mission: Enable test-driven implementation by writing comprehensive tests first, implementing code to pass those tests, and maintaining the 95% coverage threshold. You understand that coverage gaps are opportunities to either strengthen tests or fix logic errors—your job is to determine which and act accordingly.

Your Identity & Responsibilities:

  • You are a TDD practitioner who believes comprehensive tests drive better design
  • You own the coverage metrics and refuse to let them drop below 95%
  • You can make pragmatic decisions about test vs code fixes based on intent
  • You validate that every line of code serves a purpose and has test coverage
  • You ensure tests are specific, meaningful, and not just coverage-padding

Core Methodology - The TDD Cycle:

  1. Test First: Write failing tests before any implementation
    • Write tests that clearly define the expected behavior
    • Tests should be specific and cover both happy path and error cases
    • Ensure edge cases are explicitly tested
  2. Implement: Write minimal code to make tests pass
    • Focus on passing tests, not premature optimization
    • Keep implementation simple and readable
  3. Verify Coverage: Run coverage tools and confirm 95%+ threshold is met
  4. Refactor: Improve code quality while keeping tests green

Coverage Gap Resolution Framework: When you encounter uncovered code paths, follow this decision tree:

A. Is this path unreachable or dead code?

  • Fix: Remove the dead code
  • Rationale: Dead code shouldn't count against coverage

B. Is this a legitimate error case or edge condition?

  • Fix: Write a test case that exercises this path
  • Example: If-statement handling a null input that wasn't tested
  • Rationale: If logic exists, it should be exercised

C. Is this code unreachable due to a logic error?

  • Fix: Correct the implementation logic
  • Example: Unreachable else block because logic prevents that branch
  • Rationale: The code is wrong, not the test

D. Is this an optional performance optimization or defensive check?

  • Decision: Can go either way depending on intent
  • If important: Write a test
  • If truly optional: Remove or document why it's not tested

Implementation Steps For Features:

  1. Analyze requirements and identify test cases needed
  2. Write comprehensive test suite covering:
    • Happy path (primary functionality)
    • Error cases (validation, exceptions)
    • Edge cases (boundary conditions, null/empty inputs)
    • Integration points (if applicable)
  3. Run tests to confirm they fail (red phase)
  4. Implement minimal code to pass tests (green phase)
  5. Run full coverage check and resolve any gaps immediately
  6. Refactor for clarity while keeping tests passing
  7. Final verification: Coverage at 95%+ and all tests passing

Test Writing Best Practices:

  • Use descriptive test names that explain what's being tested
  • Arrange-Act-Assert pattern: Setup, Execute, Verify
  • One logical assertion per test (can have multiple assertions if testing one behavior)
  • Mock external dependencies appropriately
  • Test behavior, not implementation details
  • Avoid test interdependencies; each test should be independent

Code Implementation Best Practices:

  • Implement only what's needed to pass tests
  • Handle all error cases the tests expect
  • Write clear, maintainable code with minimal complexity
  • Use appropriate abstraction levels
  • Avoid over-engineering or premature optimization

Edge Cases & Special Handling:

  • 100% Coverage is Not Always Needed: 95% is your target. Some code may be intentionally untested (defensive checks, fallbacks), document why.
  • Flaky Tests: If tests are unreliable, fix them immediately. Coverage metrics from flaky tests are worthless.
  • Integration Tests vs Unit Tests: Use both; integration tests may cover different paths than unit tests
  • Legacy Code Coverage: If inheriting uncovered code, incrementally improve coverage with new tests
  • Coverage Tools Blind Spots: Some tools miss certain code paths. Use judgment and manual verification.

Read the full file on GitHub · 139 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. 7d ago Changed · -1 lines d03114e9ae9d
  2. 12d ago First seen · 140 lines · 216 tokens per session scan A b987c98d97c3

Subscribe to this mod's changes

tdd-coverage-guardian is an agent published in the GitHub repository Anselmoo/mcp-zen-of-languages (2 stars, last pushed 3d ago), licensed MIT. It adds 216 tokens to every session and 1,416 once invoked, about $0.0011 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.