add-unit-tests

Generates Vitest-based unit tests for Softplan Lambda microservices across handler, service, repository, middleware layers.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/tcelestino/softplan-engineering-skills --skill add-unit-tests-tcelestino
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-unit-tests
Source: https://github.com/tcelestino/softplan-engineering-skills/tree/main/skills/add-unit-tests
Command: npx skills add https://github.com/tcelestino/softplan-engineering-skills --skill add-unit-tests-tcelestino

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill generates a complete Vitest-based unit test scaffold for an existing Softplan Lambda microservice, enabling consistent testing across handler, service, repository, and middleware layers.

Core Features & Use Cases

  • Generates test factories, test setup, and unit tests for handler, service, repository, and middleware layers.
  • Provides a ready-to-run Vitest configuration (vitest.config.ts) and test setup aligned with Softplan testing standards.
  • Simplifies extending tests to new entities by following a repeatable structure.

Quick Start

Run this skill inside an existing microservice to generate Vitest-based unit tests for all layers (handler, service, repository, and middleware).

Frequently Asked Questions about add-unit-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Vitest unit tests for Lambda handler, service, and repository layers?

To add Vitest unit tests for Lambda layers, this skill generates test factories, setup files, and unit tests that mock repository, service, and handler interactions to align with project testing standards.

What's the best way to scaffold Vitest tests for an existing serverless microservice?

Scaffolding Vitest tests for a serverless microservice is done by generating a dedicated vitest.config.ts, test setup, and factories that cover middleware, handler, service, and repository layers in a repeatable structure.

Does this unit testing approach work with mocking for Lambda interactions?

Yes, mocking Lambda interactions works by generating unit tests that ensure repository, service, and handler dependencies are mocked, validating the interactions across the microservice layers.

Can I generate a vitest.config.ts and update test scripts for a Lambda project?

You can generate a vitest.config.ts and update test scripts because the skill produces a ready-to-run Vitest configuration and adjusts project dependencies to match the required testing standards.

When do I need test factories for Vitest unit testing in a Lambda microservice?

You need test factories for Vitest unit testing when extending tests to new entities in a Lambda microservice, allowing you to follow a repeatable structure for setup and mock data generation across layers.