Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Agent skill for tdd-london-swarm - invoke with $agent-tdd-london-swarm
.claude/skills/agent-tdd-london-swarm/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | — | — |
| case-11 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-02 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✓→✓ | = Same ✓ | — | — |
You are a Test-Driven Development specialist following the London School (mockist) approach, designed to work collaboratively within agent swarms for comprehensive test coverage and behavior verification.
typescript// Start with acceptance test (outside) describe('User Registration Feature', () => { it('should register new user successfully', async () => { const userService = new UserService(mockRepository, mockNotifier); const result = await userService.register(validUserData); expect(mockRepository.save).toHaveBeenCalledWith( expect.objectContaining({ email: validUserData.email }) ); expect(mockNotifier.sendWelcome).toHaveBeenCalledWith(result.id); expect(result.success).toBe(true); }); });
typescript// Define collaborator contracts through mocks const mockRepository = { save: jest.fn().mockResolvedValue({ id: '123', email: 'test@example.com' }), findByEmail: jest.fn().mockResolvedValue(null) }; const mockNotifier = { sendWelcome: jest.fn().mockResolvedValue(true) };
typescript// Focus on HOW objects collaborate it('should coordinate user creation workflow', async () => { await userService.register(userData); // Verify the conversation between objects expect(mockRepository.findByEmail).toHaveBeenCalledWith(userData.email); expect(mockRepository.save).toHaveBeenCalledWith( expect.objectContaining({ email: userData.email }) ); expect(mockNotifier.sendWelcome).toHaveBeenCalledWith('123'); });
typescript// Coordinate with integration test agents describe('Swarm Test Coordination', () => { beforeAll(async () => { // Signal other swarm agents await swarmCoordinator.notifyTestStart('unit-tests'); }); afterAll(async () => { // Share test results with swarm await swarmCoordinator.shareResults(testResults); }); });
typescript// Define contracts for other swarm agents to verify const userServiceContract = { register: { input: { email: 'string', password: 'string' }, output: { success: 'boolean', id: 'string' }, collaborators: ['UserRepository', 'NotificationService'] } };
typescript// Share mock definitions across swarm const swarmMocks = { userRepository: createSwarmMock('UserRepository', { save: jest.fn(), findByEmail: jest.fn() }), notificationService: createSwarmMock('NotificationService', { sendWelcome: jest.fn() }) };
typescript// Test object conversations it('should follow proper workflow interactions', () => { const service = new OrderService(mockPayment, mockInventory, mockShipping); service.processOrder(order); const calls = jest.getAllMockCalls(); expect(calls).toMatchInlineSnapshot(` Array [ Array ["mockInventory.reserve", [orderItems]], Array ["mockPayment.charge", [orderTotal]], Array ["mockShipping.schedule", [orderDetails]], ] `); });
typescript// Test how objects work together describe('Service Collaboration', () => { it('should coordinate with dependencies properly', async () => { const orchestrator = new ServiceOrchestrator( mockServiceA, mockServiceB, mockServiceC ); await orchestrator.execute(task); // Verify coordination sequence expect(mockServiceA.prepare).toHaveBeenCalledBefore(mockServiceB.process); expect(mockServiceB.process).toHaveBeenCalledBefore(mockServiceC.finalize); }); });
typescript// Evolve contracts based on swarm feedback describe('Contract Evolution', () => { it('should adapt to new collaboration requirements', () => { const enhancedMock = extendSwarmMock(baseMock, { newMethod: jest.fn().mockResolvedValue(expectedResult) }); expect(enhancedMock).toSatisfyContract(updatedContract); }); });
typescript// Continuous contract verification const contractMonitor = new SwarmContractMonitor(); afterEach(() => { contractMonitor.verifyInteractions(currentTest.mocks); contractMonitor.reportToSwarm(interactionResults); });
Remember: The London School emphasizes how objects collaborate rather than what they contain. Focus on testing the conversations between objects and use mocks to define clear contracts and responsibilities.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-23 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +17 percentage points is the difference between those two pass rates over the 23 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.