xiaozhi-mcphub: Agent for Claude Code

.github/agents/tdd-development.agent.md

tdd-development is an agent for Claude Code from huangjunsen0406/xiaozhi-mcphub. It costs 16 tokens per session (1,488 once invoked), scanned A, a copy of tdd-development, Apache-2.0.

A specialised coding agent that fixes bugs and builds features through TDD, or test-driven development—the practice of writing a failing test, making it pass, then improving the code.

In plain words
What is it for?
Use it for bug fixes, new features, regression tests, refactoring with test coverage and investigations of unexpected behaviour, especially when the work comes from a GitHub issue.
Why use it?
Code changes made without tests can break existing behaviour or leave new bugs undetected. This enforces a Red–Green–Refactor cycle so the requested behaviour is tested before and after implementation.

Agent for Claude Code

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to huangjunsen0406/xiaozhi-mcphub. 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/huangjunsen0406/xiaozhi-mcphub/main/.github/agents/tdd-development.agent.md
Clone the repo
git clone --depth 1 https://github.com/huangjunsen0406/xiaozhi-mcphub

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-development

README.md
[![agentmods](https://agentmods.dev/badge/agents/huangjunsen0406/xiaozhi-mcphub/tdd-development.svg)](https://agentmods.dev/agents/huangjunsen0406/xiaozhi-mcphub/tdd-development)
Your own site
<a href="https://agentmods.dev/agents/huangjunsen0406/xiaozhi-mcphub/tdd-development"><img src="https://agentmods.dev/badge/agents/huangjunsen0406/xiaozhi-mcphub/tdd-development.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 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,488 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 100% copy Near-identical to another mod 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.00016 $0.01488
Opus 5 $0.00008 $0.00744
Sonnet 5 $0.00003 $0.00298
Haiku 4.5 $0.00002 $0.00149

Measured 8d ago against content hash 3cd568fc9fc1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

tdd-development 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.

Origin

This is a copy

100% identical to tdd-development — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.github/agents/tdd-development.agent.md · 363 lines

How it starts

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

TDD Development Agent

A specialized coding agent that fixes bugs and implements new features using a strict Test-Driven Development (TDD) workflow.

The agent always follows the Red → Green → Refactor cycle.


Purpose

This agent ensures all code changes are validated by tests before implementation.

It can handle two types of tasks:

Task Type Description
Bug Fix Existing behavior is broken
Feature Implementation New functionality must be implemented

Both follow the same TDD lifecycle.


When to Use

Use this agent when:

  • Fixing bugs reported in GitHub issues
  • Implementing new features from requirements
  • Adding regression tests
  • Refactoring code with test safety
  • Investigating unexpected behavior

TDD Workflow

The agent always follows the Red → Green → Refactor cycle.


Phase 1: Task Analysis

  1. Fetch Issue / Requirements

Use:

github.vscode-pull-request-github/issue_fetch

If the task is not tied to an issue, analyze the provided feature request.

  1. Determine Task Type

The agent must classify the task as:

  • Bug Fix
  • Feature Implementation
  1. Understand Context

Read relevant code and tests to understand:

  • architecture
  • existing behavior
  • coding conventions
  • test patterns

Phase 2: Write Failing Test (TDD Red Phase)

The agent must write tests before modifying implementation.

For Bug Fix

Create a regression test that reproduces the bug.

Expected outcome:

test fails

For New Feature

Create a behavior test that defines the expected functionality.

Expected outcome:

test fails

Test guidelines:

  • place in tests/ or *.test.ts
  • follow Jest patterns
  • tests must clearly describe behavior

Example:

it("should return empty array when user has no groups")

If reproduction is impossible due to external dependencies:

Read the full file on GitHub · 363 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 · 363 lines · 16 tokens per session scan A 3cd568fc9fc1

Subscribe to this mod's changes

tdd-development is an agent published in the GitHub repository huangjunsen0406/xiaozhi-mcphub (192 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 16 tokens to every session and 1,488 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to tdd-development, differing in 0 lines, and is treated as a copy.

Related

Other agents, from other repositories

quality-playbook

Run a complete quality engineering audit on any codebase. Orchestrates six phases — explore, generate, review, audit, reconcile, verify — each in its own context window for maximum depth. Then runs iteration strategies to find even more bugs. Finds the 35% of real defects that structural code review alone cannot catch.

github/awesome-copilot · 69 tokens

QA

Meticulous QA subagent for test planning, bug hunting, edge-case analysis, and implementation verification.

github/awesome-copilot · 22 tokens

mutation-tester

Mutation testing specialist that measures test suite quality by injecting code mutations. Supports Stryker (JS/TS), mutmut (Python), go-mutesting (Go). Use when evaluating test effectiveness, finding weak tests, or improving kill ratio.

vibeeval/vibecosystem · 52 tokens

qa-implementer

TDD implementation worker. Receives a failing-test artifact from qa-test-writer and writes the smallest production code change to make it pass. Forbidden from modifying tests — that boundary is enforced by qa-lead diff inspection. Half of the adversarial fix pair.

vinnie357/claude-skills · 57 tokens

qa-test-writer

TDD test-author worker. Reads a filed bees issue and writes ONE failing test that captures the bug. Forbidden from modifying production code — that boundary is enforced by qa-lead diff inspection. Half of the adversarial fix pair.

vinnie357/claude-skills · 51 tokens

issue-fixer

A bug-fixing assistant that applies test-driven development (TDD): first writing a test that reproduces the bug, then making the smallest code change that fixes it, and finally checking for regressions.

XRenSiu/claude-code-forge · 55 tokens