bundles/testing/skills/testing-cicd-init/SKILL.md
Installs Vitest testing infrastructure and GitHub Actions CI/CD for TypeScript projects (Next.js, NestJS, React). Configures 80% coverage thresholds, test setup files, and Bun-based CI workflows. Use when adding tests to a new project, migrating from Jest to Vitest, or setting up GitHub Actions CI/CD for the first time.
npx skillsauth add shipshitdev/library testing-cicd-initInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Inputs:
package.json and config files; can be specified explicitly (nextjs, nestjs, react, node).Outputs:
vitest.config.ts configured for detected environment.src/test/setup.ts for Next.js/React, test/setup.ts for NestJS)..github/workflows/ci.yml with Bun-based pipeline and coverage enforcement.package.json scripts (test, test:coverage, typecheck).Creates/Modifies:
vitest.config.ts (created)..github/workflows/ci.yml (created or updated).package.json scripts section (updated).External Side Effects:
bun add -D to install Vitest and related testing packages.Confirmation Required:
Delegates To:
husky-test-coverage skill for adding pre-commit coverage gate (optional, not auto-invoked).playwright-e2e-init for E2E layer (optional, not auto-invoked).This skill should be used when:
The skill detects project type by scanning:
package.json dependencies (next, @nestjs/core, react, etc.)Example prompt:
Add testing and CI/CD to this project
Or be specific:
Set up Vitest with 80% coverage and GitHub Actions for this Next.js project
Dependencies installed:
bun add -D vitest @vitest/coverage-v8 @vitejs/plugin-react @testing-library/react @testing-library/jest-dom jsdom
Files created:
vitest.config.ts - Vitest with jsdom environmentsrc/test/setup.ts - Test setup with RTL matchers.github/workflows/ci.yml - CI pipelineTest pattern: **/*.{test,spec}.{ts,tsx}
Dependencies installed:
bun add -D vitest @vitest/coverage-v8 supertest @types/supertest
Files created:
vitest.config.ts - Vitest with node environmenttest/setup.ts - Test setup for NestJS.github/workflows/ci.yml - CI with MongoDB serviceTest pattern: src/**/*.spec.ts
Follows similar patterns based on detected framework.
Default thresholds (configurable):
Coverage is enforced:
The generated CI workflow includes:
Templates are located in the templates/ directory:
| Template | Purpose |
|----------|---------|
| vitest.config.nextjs.ts | Vitest config for Next.js |
| vitest.config.nestjs.ts | Vitest config for NestJS |
| ci-nextjs.yml | GitHub Actions for Next.js |
| ci-nestjs.yml | GitHub Actions for NestJS |
| test-setup-react.ts | Test setup with RTL |
| test-setup-node.ts | Test setup for Node.js |
For monorepos (detected by workspaces in package.json):
vitest.workspace.ts at rootvitest.config.ts per packagebun --filter '*' test for orchestration| Skill | Integration |
|-------|-------------|
| husky-test-coverage | Adds pre-commit coverage enforcement |
| linter-formatter-init | Works alongside for code quality |
| playwright-e2e-init | Adds E2E testing after unit tests |
| testing-expert | Provides testing patterns guidance |
User: Add testing to this project
Agent:
1. Detects Next.js from package.json
2. Installs vitest, @vitest/coverage-v8, @testing-library/react
3. Creates vitest.config.ts with jsdom environment
4. Creates src/test/setup.ts
5. Creates .github/workflows/ci.yml
6. Adds test scripts to package.json
User: Set up tests for this NestJS API
Agent:
1. Detects NestJS from @nestjs/core dependency
2. Installs vitest, @vitest/coverage-v8, supertest
3. Creates vitest.config.ts with node environment
4. Creates test/setup.ts
5. Creates .github/workflows/ci.yml with MongoDB service
6. Adds test scripts to package.json
Ensure path aliases in vitest.config.ts match tsconfig.json:
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
bun test --coverageEnsure bunx tsc --noEmit passes locally before pushing.
development
Coordinates a weekly engineering review of board accuracy, recent code changes, operational health, and scoped cleanup. Use for a recurring repository health review or a review of the last several days.
testing
Audits project board configuration and prepares explicitly requested setup, copy, or normalization changes while preserving the existing workflow and provider boundaries. Use when inspecting a board's fields, columns, scope, or configuration.
testing
Reconciles a project board with current work and delivery evidence, reports incomplete coverage and metadata gaps, and applies only approved provider-supported field changes. Use when auditing board drift, reviewing blocked work, or assessing upcoming delivery.
development
Walk through how a subsystem works. Use for "how does X work", code walkthroughs before changing something, and placement or ownership questions. Explains architecture, runtime flow, and onboarding mental models. Can critique architecture. Use why for motivation.