Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

testing-patterns

verified

Agent-based declarative testing with YAML test specs. Tests run in sub-agents to preserve main context while executing many tests. Supports MCP servers, APIs, and browser automation. Use when: testing MCP servers, running integration tests, validating tool behavior after changes, or creating regression test suites. Keywords: yaml tests, agent testing, mcp test, integration tests.

View on GitHub

Marketplace

jezweb-skills

jezweb/claude-skills

Plugin

all

Repository

jezweb/claude-skills
261stars

skills/testing-patterns/SKILL.md

Last Verified

February 4, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/jezweb/claude-skills/blob/main/skills/testing-patterns/SKILL.md -a claude-code --skill testing-patterns

Installation paths:

Claude
.claude/skills/testing-patterns/
Powered by add-skill CLI

Instructions

# Testing Patterns

A pragmatic approach to testing that emphasises:
- **Live testing** over mocks
- **Agent execution** to preserve context
- **YAML specs** as documentation and tests
- **Persistent results** committed to git

## Philosophy

This is **not traditional TDD**. Instead:

1. **Test in production/staging** with good logging
2. **Use agents** to run tests (keeps main context clean)
3. **Define tests declaratively** in YAML (human-readable, version-controlled)
4. **Focus on integration** (real servers, real data)

### Why Agent-Based Testing?

Running 50 tests in the main conversation would consume your entire context window. By delegating to a sub-agent:

- Main context stays clean for development
- Agent can run many tests without context pressure
- Results come back as a summary
- Failed tests get detailed investigation

## Commands

| Command | Purpose |
|---------|---------|
| `/create-tests` | Discover project, generate test specs + testing agent |
| `/run-tests` | Execute tests via agent(s), report results |
| `/coverage` | Generate coverage report and identify uncovered code paths |

**Quick workflow:**
```
/create-tests        → Generates tests/specs/*.yaml + .claude/agents/test-runner.md
/run-tests           → Spawns agent, runs all tests, saves results
/run-tests api       → Run only specs matching "api"
/run-tests --failed  → Re-run only failed tests
/coverage            → Run tests with coverage, analyse gaps
/coverage --threshold 80  → Fail if below 80%
```

## Getting Started in a New Project

This skill provides the **pattern and format**. Claude designs the actual tests based on your project context.

**What happens when you ask "Create tests for this project":**

1. **Discovery** - Claude examines the project:
   - What MCP servers are configured?
   - What APIs or tools exist?
   - What does the code do?

2. **Test Design** - Claude creates project-specific tests:
   - Test cases for the actual tools/endpoints
   - Expected values based 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
9772 chars