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
TypeScript refactoring and modernization guidelines from a principal specialist perspective. This skill should be used when refactoring, reviewing, or modernizing TypeScript code to ensure type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving TypeScript type architecture, narrowing, generics, error handling, or migration to modern TypeScript features.
tools
Resolves TypeScript and JavaScript problems across type-level programming, performance, monorepo management, migration, and modern tooling. Invoke when diagnosing "type instantiation excessively deep" errors, migrating JS to TS, configuring strict tsconfig, debugging module resolution, or choosing between Biome/ESLint/Turborepo/Nx.
tools
Turborepo monorepo build system guidance. Triggers on: `turbo.json`, task pipelines, `dependsOn`, caching, remote cache, the `turbo` CLI, `--filter`, `--affected`, CI optimization, environment variables, internal packages, monorepo structure, and package boundaries. Use when the user configures tasks or workflows, creates packages, sets up a monorepo, shares code between apps, runs changed packages, debugs cache behavior, or works in an `apps/` plus `packages/` workspace.
tools
Provides Tailwind CSS v4 performance optimization and best practices guidelines. Triggers when writing, reviewing, or refactoring Tailwind CSS v4 code; when working with Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.