/xonovex-typescript:vitest-guidefrom xonovex-typescript
Provides Vitest 3+ testing guidelines for TypeScript projects: type-safe HTTP assertions, mocking patterns, CORS preflight tests, and config gotchas like ESM vs CommonJS differences.
Ships in xonovex-typescript. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
For framework-independent test design: Arrange-Act-Assert, FIRST, and choosing/naming test doubles, see testing-guide; this guide covers only Vitest-specific mechanics.
res.json() to declared interfaces, see references/type-safety.mdtest/ with nested describe blocks, see references/test-organization.mdvite-node) differ from Jest: __dirname/__filename work in CommonJS but not ESM tests without polyfillsvi.spyOn returns the spy; vi.fn creates a new mock: confusing them passes type checks but breaks call-tracking assertionsexpect.assertions(n) in async tests catches missed awaits, without it, a forgotten await lets the test pass spuriouslyvitest.config.ts requires a full restart to pick up new transformsres.json() or test variables lose type informationSOURCES.md (opens in a new tab)eval-queries.json (opens in a new tab)evals.json (opens in a new tab)moon.yml (opens in a new tab)references/http-testing.md (opens in a new tab)references/mock-patterns.md (opens in a new tab)references/test-organization.md (opens in a new tab)references/timestamp-testing.md (opens in a new tab)references/type-safety.md (opens in a new tab)references/typescript-config.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub xonovex/platform --plugin xonovex-typescript9 skills in this plugin
/astro-guideUse when editing or scaffolding Astro sites with islands architecture. Triggers on `.astro` files, `astro:content` imports, `Astro.props`, `client:` hydration directives, content-collection schemas, and on prompts about pages, layouts, MDX, content collections, image optimization, view transitions, or accessibility in an Astro project, even when the user doesn't say 'Astro'./hono-guideUse when editing or scaffolding Hono 4.0+ API servers in TypeScript. Triggers on `.ts` files with `hono` or `@hono/*` imports, route handlers, middleware, and prompts about validation, error handling, WebSockets, CORS, or building an HTTP API in Hono, even when the user doesn't say 'Hono'./hono-opinionated-guideUse when editing Hono APIs that follow the opinionated style: inline OpenAPI handlers, explicit router selection (LinearRouter / RegExpRouter), sync handlers where possible, bodyLimit middleware. A focused overlay that covers only house-style decisions, not generic Hono usage. Triggers on `.ts` files with `OpenAPIHono`, inline route schemas, and prompts about router perf, payload limits, or sync-vs-async handlers, even when the user doesn't say 'opinionated'./npm-guideUse when publishing an npm package or checking that one is ready to publish. Triggers on prompts about npm publish, publish-readiness or package.json validation (name/version/license/repository/files/publishConfig/private), idempotent publishing (skip if the version already exists), provenance and access flags, dist-tags, or platform-specific (os/cpu/libc) native-binary packages, even when the user doesn't say 'npm'./react-guideUse when building or editing React 19+ components, hooks, or app routing. Triggers on `.tsx`/`.jsx` files with React imports, Vite/Next configs, Server Components, `'use client'` / `'use server'` directives, and on prompts about Form Actions, useActionState, useOptimistic, use(), Suspense streaming, ref-as-prop, or the React Compiler, even when the user doesn't say 'React'./threejs-guideUse when building or editing 3D scenes in vanilla Three.js for WebGL/WebGPU. Triggers on `.js`/`.ts` files with `three` or `three/*` imports, and on prompts about Scene, Renderer, Mesh, BufferGeometry, materials, lighting, GLTF loaders, raycasting, shaders, post-processing, instancing, or perf tuning, even when the user doesn't say 'Three.js'.