Skip to content
PluginStats

@kwitsch/vitest-plugin-claude-code-mod weekly downloads statistics

By kwitsch · npm · Testing

Vitest plugin that tests Claude Code mods with the claude-code/testing API.

View on npm Fresh · Dec 6, 2026

@kwitsch/vitest-plugin-claude-code-mod has 8,493 recorded weekly downloads on npm, ranking #1337 of 3,247 tracked listings.

Weekly downloads
8,493
Official API · Dec 5, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#1337
Among tracked npm listings

About @kwitsch/vitest-plugin-claude-code-mod

@kwitsch/vitest-plugin-claude-code-mod

Vitest plugin that runs Claude Code mod tests written for claude plugin test under plain Vitest, without the claude binary.

Installation

pnpm add -D @kwitsch/vitest-plugin-claude-code-mod vitest

Requires Node 26 or newer, Vitest ^5.0.0 and Vite 6.4 or newer.

Usage

Add the plugin to the Vitest config and point it at the mod's register module:

// vitest.config.ts
import claudeCodeMod from "@kwitsch/vitest-plugin-claude-code-mod";
import { defineConfig } from "vitest/config";

export default defineConfig({
  plugins: [claudeCodeMod({ mod: "./src/hooks/register.ts" })],
});

Tests import the kit from claude-code/testing, exactly as under claude plugin test:

import { expect, mock, test } from "claude-code/testing";

test("a command reads an environment variable", async ($, on) => {
  mock.env(on, { GREETING: "hello" });
  expect(await $.command.run({ command: "env", args: "GREETING" })).toEqual({
    text: "hello",
  });
});

The plugin name is the name in package.json (without the npm scope). The options every register(on, options) gets start from the default of each entry under the top-level userConfig key of package.json:

{
  "name": "my-mod",
  "userConfig": { "greeting": { "type": "string", "default": "hello" } }
}

Projects that declare userConfig through the manifest option of the Rolldown plugin or the tsdown preset pass the entries through claudeCodeMod({ declared }) (the same shape as the userConfig entries of package.json) and, if they want to override a default, the values through claudeCodeMod({ userConfig }). declared is merged over the package.json entries per key, and its default values start the options. A test's own options are merged over them.

The options a mod would get are checked against the userConfig entries that package.json and the declared option declare (type, min, max, required), and a mismatch fails the test with Claude Code's text, for example options do not fit plugin.json userConfig: Limit must be a number.

For type checking, map claude-code/testing to the kit's types when no generated /plugin-types declaration covers it:

{
  "compilerOptions": {
    "paths": {
      "claude-code/testing": [
        "./node_modules/@kwitsch/vitest-plugin-claude-code-mod/dist/testing.d.mts"
      ]
    }
  }
}

Options

OptionDefaultMeaning
modrequiredThe mod's register module, relative to the Vite root or absolute. An array loads several modules in order, as one plugin.
declaredpackage.json entriesThe userConfig entries of a project that declares them elsewhere, such as the manifest option; merged over the package.json entries per key, checked against a test's options, and their default values start the options. Must be JSON-serializable.
userConfiguserConfig defaultsThe options handed to register, merged shallowly over the package.json defaults. Must be JSON-serializable.
aliastrueMap the claude-code/testing import to this package's kit.
strictSandboxtrueCheck the mod's modules against the Claude Code mod sandbox and fail the test that loads a violating module. false, or false for a single rule ({ timers: false }; the rules are imports, computedImport, globals, timers and size), only warns. See Sandbox check.
portablefalseWarns, with file and line, when a test calls an expect matcher that is not among the eight the official kit documents, and when an inline plugin's register uses a variable of the test file; "error" fails the test instead. The default false reports nothing. See Portable mode.

Invalid options and an unreadable package.json, a missing name or a missing mod file stop Vitest with a claudeCodeMod: error before any test runs.

Sandbox check

Before Vitest runs a module of the mod, the plugin checks its source against what Claude Code's mod sandbox provides. Checked are the mod modules and every module they reach by relative imports, including a module a test file imported first. Test files and the kit are not checked. The code of bundled npm dependencies is not checked in tests either: the build-time check catches their imports and globals, but not timers.…

Description from the npm listing.

  • claude-code
  • claude-code-plugin
  • claude-code-mod
  • vitest
  • vitest-plugin

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@kwitsch/vitest-plugin-claude-code-mod weekly downloads on npm, last 90 days: 8,493 weekly downloads as of Dec 5, 2026.@kwitsch/vitest-plugin-claude-code-modWeekly downloads on npm · Last 90 days8,493downloads / week02K4K6K8K10KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@kwitsch/vitest-plugin-claude-code-mod weekly downloads on npm, last 90 days: 8,493 weekly downloads as of Dec 5, 2026.

7/30/90-day growth

@kwitsch/vitest-plugin-claude-code-mod weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.@kwitsch/vitest-plugin-claude-code-modWeekly downloads growth on npm8,493downloads / week now7-day growth+8,493 weekly downloadsInsufficient history30-day growth+8,493 weekly downloadsInsufficient history90-day growth+8,493 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@kwitsch/vitest-plugin-claude-code-mod weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@kwitsch/vitest-plugin-claude-code-mod npm ranking history: currently #1337 (by weekly downloads).@kwitsch/vitest-plugin-claude-code-modnpm ranking · by weekly downloads · Last 90 days#1337current rank#1200#1400#1600#1800#2000#2200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankNov 30, 2026 – Dec 6, 2026 · 7 observations · Updated Dec 5, 2026pluginstats.com
@kwitsch/vitest-plugin-claude-code-mod npm ranking history: currently #1337 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 67, #17 (overall #1,337)
All npm: every listing in weekly downloads order

Listing placement

Testing26 listings · 2 pages · page 1, #3 (overall #3)
Testing: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (121)
Recent weekly downloads observations for @kwitsch/vitest-plugin-claude-code-mod
Date (UTC)Weekly downloadsChange vs. previous
8,493+280
8,213+1.7K
6,473+2.2K
4,323+3.3K
1,061+444
617+41
576+576
00
00
00
00
00
00
0—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@kwitsch/vitest-plugin-claude-code-mod. First seen Nov 30, 2026; last successful collection Dec 6, 2026. See the methodology.