sdd-mcp: Skill for Claude Code

.claude/skills/sdd-test-gen/SKILL.md

sdd-test-gen is a skill for Claude Code from yi-john-huang/sdd-mcp. It costs 49 tokens per session (2,049 once invoked), scanned A, original, MIT.

A test-generation workflow based on Test-Driven Development, or TDD: write a failing test, make it pass, then improve the code. It creates unit, integration, and edge-case tests using the project's existing test tools.

In plain words
What is it for?
Use it to generate tests for a file or function, including normal cases, integration behaviour, and unusual inputs.
Why use it?
It turns expected behaviour into executable documentation and helps catch regressions while code is changed.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is yi-john-huang/sdd-mcp's own configuration. It tells Claude Code how to work on sdd-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 sdd-mcp configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { UserService } from '../UserService';.

Part of the sdd-mcp plugin — 11 skills, 6 agents shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to yi-john-huang/sdd-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/yi-john-huang/sdd-mcp/master/.claude/skills/sdd-test-gen/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/yi-john-huang/sdd-mcp

Made for: Claude Code.

Or install sdd-mcp, the plugin that ships this one along with the rest of its 11 skills, 6 agents.

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 sdd-test-gen

README.md
[![agentmods](https://agentmods.dev/badge/skills/yi-john-huang/sdd-mcp/sdd-test-gen/github.svg)](https://agentmods.dev/skills/yi-john-huang/sdd-mcp/sdd-test-gen)
Your own site
<a href="https://agentmods.dev/skills/yi-john-huang/sdd-mcp/sdd-test-gen"><img src="https://agentmods.dev/badge/skills/yi-john-huang/sdd-mcp/sdd-test-gen/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 sdd-test-gen

Your own site · 80×15
<a href="https://agentmods.dev/skills/yi-john-huang/sdd-mcp/sdd-test-gen"><img src="https://agentmods.dev/badge/skills/yi-john-huang/sdd-mcp/sdd-test-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,049 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00049 $0.02049
Opus 5 $0.00024 $0.01025
Sonnet 5 $0.00010 $0.00410
Haiku 4.5 $0.00005 $0.00205

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

Security

Grade A, and why

sdd-test-gen 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 11d 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/skills/sdd-test-gen/SKILL.md · 296 lines

How it starts

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

SDD Test Generation

Generate comprehensive tests following Test-Driven Development (TDD) methodology. Write tests that serve as living documentation and ensure code correctness.

TDD Philosophy

"Write a failing test before you write the code to make it pass."

Tests are not an afterthought—they're a design tool that:

  1. Document behavior - Tests show how code is intended to be used
  2. Prevent regressions - Catch bugs before they ship
  3. Enable refactoring - Change with confidence
  4. Drive design - Writing tests first leads to better interfaces

The TDD Cycle

┌─────────────────────────────────────┐
│                                     │
│   ┌─────────┐   Write failing test  │
│   │   RED   │◄──────────────────────┤
│   └────┬────┘                       │
│        │                            │
│        ▼ Make it pass               │
│   ┌─────────┐                       │
│   │  GREEN  │                       │
│   └────┬────┘                       │
│        │                            │
│        ▼ Improve code               │
│   ┌─────────┐                       │
│   │REFACTOR │───────────────────────┘
│   └─────────┘
└─────────────────────────────────────┘

Workflow

Step 1: Identify Test Scope

/sdd-test-gen src/services/UserService.ts           # Generate tests for file
/sdd-test-gen UserService.createUser                # Generate for specific method
/sdd-test-gen src/services/ --integration           # Integration tests for module

Step 2: Analyze the Code

Before generating tests:

  1. Read the source file to understand its behavior
  2. Check existing tests (if any) to avoid duplication
  3. Review related requirements in .spec/specs/
  4. Identify dependencies that need mocking

Step 3: Test File Structure

Generate tests with this structure:

import { UserService } from '../UserService';
import { UserRepository } from '../../repositories/UserRepository';
import { EmailService } from '../../services/EmailService';

// Mock dependencies
jest.mock('../../repositories/UserRepository');
jest.mock('../../services/EmailService');

describe('UserService', () => {
  let userService: UserService;
  let mockUserRepo: jest.Mocked<UserRepository>;
  let mockEmailService: jest.Mocked<EmailService>;

  beforeEach(() => {
    jest.clearAllMocks();
    mockUserRepo = new UserRepository() as jest.Mocked<UserRepository>;
    mockEmailService = new EmailService() as jest.Mocked<EmailService>;
    userService = new UserService(mockUserRepo, mockEmailService);
  });

  describe('createUser', () => {
    it('should create a user with valid input', async () => {
      // Arrange
      const input = { email: '[email protected]', name: 'Test User' };
      mockUserRepo.save.mockResolvedValue({ id: '1', ...input });

      // Act
      const result = await userService.createUser(input);

      // Assert
      expect(result.id).toBeDefined();
      expect(mockUserRepo.save).toHaveBeenCalledWith(expect.objectContaining(input));
    });

    it('should throw error when email already exists', async () => {
      // Arrange
      mockUserRepo.findByEmail.mockResolvedValue({ id: '1', email: '[email protected]' });

      // Act & Assert
      await expect(userService.createUser({ email: '[email protected]' }))
        .rejects.toThrow('Email already exists');
    });
  });
});

Read the full file on GitHub · 296 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. 11d ago First seen · 296 lines · 49 tokens per session scan A d37c0df646ee

Subscribe to this mod's changes

sdd-test-gen is a skill published in the GitHub repository yi-john-huang/sdd-mcp (51 stars, last pushed 1mo ago), licensed MIT. It adds 49 tokens to every session and 2,049 once invoked, about $0.0002 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-30.