Specialist Tdd Guide logo

Specialist Tdd Guide

Community
VenTheZone
specialist-tdd-guide

Test-driven development specialist enforcing write-tests-first workflows with comprehensive coverage. Use when developing new features, fixing bugs with regression tests, guiding developers through the red-green-refactor cycle, or ensuring 80%+ unit, integration, and E2E coverage.

Overview

PublisherVenTheZone
Repositorypi-dots
Skill namespecialist-tdd-guide
Stars
41
Forks
0
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by VenTheZone on GitHub. Read the source before you install it.

Installation

Install the Specialist Tdd Guide AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/VenTheZone/pi-dots/tree/main/pi-dotfiles-specialist-skills/skills/specialist-tdd-guide
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/VenTheZone/pi-dots.git /tmp/pi-dots
mkdir -p .claude/skills
cp -r /tmp/pi-dots/pi-dotfiles-specialist-skills/skills/specialist-tdd-guide .claude/skills/specialist-tdd-guide
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Specialist Tdd Guide in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Specialist Tdd Guide on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Specialist Tdd Guide is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Specialist: TDD Guide

Tests-before-code specialist ensuring all code is developed test-first with comprehensive, meaningful coverage. Enforces the red-green-refactor cycle and catches edge cases before implementation.

Workflow

  1. Write failing test first (RED) — define the expected behavior as a test; run it and confirm it fails
  2. Write minimal implementation (GREEN) — add just enough code to make the test pass
  3. Refactor (IMPROVE) — remove duplication, clarify names, optimize under a green suite
  4. Verify coverage — run the coverage report and confirm thresholds (80%+ lines/branches/functions/statements)
  5. Review edge cases — ensure null/empty/invalid/error/race cases are covered, not just the happy path

Write the Test First

typescript
// ALWAYS start with a failing test
describe('searchMarkets', () => {
  it('returns semantically similar markets', async () => {
    const results = await searchMarkets('election')

    expect(results).toHaveLength(5)
    expect(results[0].name).toContain('Trump')
    expect(results[1].name).toContain('Biden')
  })
})

Run it — it must fail before any implementation exists:

bash
npm test
# Test should fail - we haven't implemented yet

Minimal Implementation (GREEN)

typescript
export async function searchMarkets(query: string) {
  const embedding = await generateEmbedding(query)
  const results = await vectorSearch(embedding)
  return results
}

Re-run the test — this time it passes. Then refactor while the suite stays green.

Test Types

1. Unit Tests (Mandatory)

Functions in isolation — fast, deterministic, no I/O:

typescript
import { calculateSimilarity } from './utils'

describe('calculateSimilarity', () => {
  it('returns 1.0 for identical embeddings', () => {
    const embedding = [0.1, 0.2, 0.3]
    expect(calculateSimilarity(embedding, embedding)).toBe(1.0)
  })

  it('returns 0.0 for orthogonal embeddings', () => {
    const a = [1, 0, 0]
    const b = [0, 1, 0]
    expect(calculateSimilarity(a, b)).toBe(0.0)
  })

  it('handles null gracefully', () => {
    expect(() => calculateSimilarity(null, [])).toThrow()
  })
})

2. Integration Tests (Mandatory)

API endpoints and database operations:

typescript
import { NextRequest } from 'next/server'
import { GET } from './route'

describe('GET /api/markets/search', () => {
  it('returns 200 with valid results', async () => {
    const request = new NextRequest('http://localhost/api/markets/search?q=trump')
    const response = await GET(request, {})
    const data = await response.json()

    expect(response.status).toBe(200)
    expect(data.success).toBe(true)
    expect(data.results.length).toBeGreaterThan(0)
  })

  it('returns 400 for missing query', async () => {
    const request = new NextRequest('http://localhost/api/markets/search')
    const response = await GET(request, {})
    expect(response.status).toBe(400)
  })
})

3. E2E Tests (Critical Flows)

Complete user journeys with Playwright:

typescript
import { test, expect } from '@playwright/test'

test('user can search and view market', async ({ page }) => {
  await page.goto('/')

  // Search for market
  await page.fill('input[placeholder="Search markets"]', 'election')
  await page.waitForTimeout(600) // Debounce

  // Verify results
  const results = page.locator('[data-testid="market-card"]')
  await expect(results).toHaveCount(5, { timeout: 5000 })

  // Click first result
  await results.first().click()

  // Verify market page loaded
  await expect(page).toHaveURL(/\/markets\//)
  await expect(page.locator('h1')).toBeVisible()
})

Edge Cases You MUST Test

  1. Null/Undefined — what if input is null?
  2. Empty — empty array/string
  3. Invalid Types — wrong type passed
  4. Boundaries — min/max values
  5. Errors — network failures, database errors
  6. Race Conditions — concurrent operations
  7. Large Data — 10k+ items
  8. Special Characters — unicode, emojis, SQL characters

Anti-Patterns (Test Smells)

Testing implementation details instead of behavior:

typescript
// DON'T test internal state
expect(component.state.count).toBe(5)

// DO test what users see
expect(screen.getByText('Count: 5')).toBeInTheDocument()

Tests depending on each other:

typescript
// DON'T rely on previous test
test('creates user', () => { /* ... */ })
test('updates same user', () => { /* needs previous test */ })

// DO setup data in each test
test('updates user', () => {
  const user = createTestUser()
  // Test logic
})

Coverage

bash
# Run tests with coverage
npm run test:coverage

# View HTML report
open coverage/lcov-report/index.html

Required thresholds: Branches 80%, Functions 80%, Lines 80%, Statements 80%.

Test Quality Checklist

  • All public functions have unit tests
  • All API endpoints have integration tests
  • Critical user flows have E2E tests
  • Edge cases covered (null, empty, invalid)
  • Error paths tested (not just happy path)
  • Mocks used for external dependencies
  • Tests are independent (no shared state)
  • Test names describe what's being tested
  • Assertions are specific and meaningful
  • Coverage is 80%+ (verified with coverage report)

Remember: No code without tests. Tests are the safety net enabling confident refactoring and production reliability.

Frequently asked questions

What does the Specialist Tdd Guide AI skill do?

Test-driven development specialist enforcing write-tests-first workflows with comprehensive coverage. Use when developing new features, fixing bugs with regression tests, guiding developers through the red-green-refactor cycle, or ensuring 80%+ unit, integration, and E2E coverage.

Why use Specialist Tdd Guide on TypingMind?

Because you install it once and use it with any model. Specialist Tdd Guide is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Specialist Tdd Guide in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/VenTheZone/pi-dots/tree/main/pi-dotfiles-specialist-skills/skills/specialist-tdd-guide. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Specialist Tdd Guide?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Specialist Tdd Guide?

As many as you like. As long as a model supports skills, you can use Specialist Tdd Guide with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Specialist Tdd Guide AI skill free?

It is published on GitHub by VenTheZone. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇