r/typescript • • 23h ago

skif 0.9 replaces knip, sherif, and syncpack with one Rust binary

0 Upvotes

Hi people,

I'm glad to announce skif 0.9.0. It's a dependency linter and dead-code analysis tool for JavaScript and TypeScript monorepos, written in Rust. One binary and one skif.toml cover what knip, sherif, and syncpack check, and on the repositories where knip produces a report it runs the dead-code analysis 4 to 8 times faster than knip. It's available through npm (@polylint/skif), Cargo (skif-cli), Homebrew, Scoop, a GitHub Action, and pre-commit (see the installation instructions for details). The tool covers the following parts of dependency hygiene:

  • Manifest and workspace rules. Root private and packageManager, sorted and empty dependency maps, @types in dependencies, unmatched workspace patterns, stray lockfiles, nested workspace roots. This is the job sherif does, and skif began as a fork of it. Rules
  • Version policy. Version and semver-range groups, banned dependencies, dependency families, the workspace: protocol, catalogs (pnpm, Bun, Yarn 4.10+), and toolchain pins across packageManager, engines, .nvmrc, Dockerfiles, and workflows. This is syncpack's job, and skif vendors syncpack's specifier model. Comparison
  • Dead-code analysis. Unused files, exports, types, enum, namespace and class members; unused and unlisted dependencies, unlisted binaries, unresolved imports, duplicate exports, circular imports. It parses with oxc, reads Vue, Svelte, Astro, MDX and Marko files, and ships 213 plugins that read the configuration of common tools. Every issue type of knip 6.45 has a skif rule.
  • No project code is run while linting. Tool configurations are read statically, so a vite.config.ts that only loads inside the repository's own build does not break the run. A package whose configuration skif cannot read is listed as incomplete in the report.
  • Fixes and adoption. Safe and unsafe fix levels, --fix --dry-run diffs, format-preserving edits, and a baseline that can only shrink. skif migrate translates an existing sherif, syncpack, and knip setup into a skif.toml in one step. Migrating
  • CI, editors, and agents. Human, JSON, TOON, SARIF, GitHub annotations, GitLab Code Quality, Markdown and CODEOWNERS reports, watch mode, a language server, an MCP server, and a library API in Rust and in the npm package. Integrations

What is new in 0.9.0

Two changes matter to a user. Both are breaking, and the changelog has the full list.

  • The disk cache is on by default. skif keeps the parse result of every source file between runs, below node_modules/.cache/skif or the per-user cache directory, so a second run parses only the files that changed. It never changes a report. --no-cache, SKIF_CACHE=0 or [cache] enabled = false turns it off, skif cache stats and skif cache clean inspect and remove it, and the GitHub Action restores and saves it through its cache input.
  • Type-aware analysis is removed. It was an opt-in mode that ran a TypeScript checker for one rule, unused-class-members. I measured it before deciding: a typed run cost 1.3x to 16x the untyped run, and on the seeded dead-code benchmark it was less precise, 81% precision against 100% without types, for a recall gain of 86% against 79%. So it is gone, and every rule behaves as it did with types off, which was the default. The reasoning is in ADR 0010.

Tool comparisons

skif is of course not the only tool in this space. It stands on the three it replaces: it started as a fork of sherif, vendors parts of syncpack, and follows knip's issue types and plugin knowledge. The comparison below is against sherif 1.13.0, syncpack 15.3.3, and knip 6.45.1, checked against their source at those release tags. I did my best to ensure it's fair and comprehensive, but of course I might have missed something.

Ecosystem Location

ToolPrimary jobRuntimeRelation to skif
skifManifest rules, version policy, and dead-code analysis in one runNative binary, or a Node addon through npm—
sherifZero-config monorepo manifest rulesNative binaryskif began as a fork; the manifest rules are ported with stable ids
syncpackVersion consistency, semver ranges, catalogsNative binarySame problem space; skif reuses its specifier model
knipUnused files, exports, and dependenciesNode.jsSame problem space; skif runs on oxc and reads configuration statically

GitHub · Quick start · Benchmarks and methodology

Detailed feature matrices

✓ means the tool has the capability. ~ means narrower support, with the limit named in the cell. — means it does not. The full matrices, with numbered notes and links to the sources of each cell, are in the comparison guide.

Manifests, versions, and workspaces

Featureskifsherifsyncpackknip
Manifest and workspace rules✓✓~ sorts dependency maps only—
Version mismatches across packages✓✓ semver specifiers in dependencies and devDependencies✓—
Version groups and semver-range groups✓—✓—
Banned dependencies✓—✓—
Related dependencies on one version✓ configurable families~ fixed list of ten, within each package.json✓—
Catalog policy✓ pnpm, Bun, Yarn 4.10+—~ pnpm and Bun—
Unused catalog entries, unresolved catalog: references✓ unused entries are opt-in—~ unresolved references only✓
workspace: protocol for workspace packages✓—~ through a pinned version group—
Peer ranges the installed dev version does not satisfy✓—~ compares declared ranges—
Toolchain pins across files✓~ presence of packageManager only~ package.json fields only—
Another package manager's commands in Dockerfiles, workflows, scripts✓———
package.json formatting✓~ sorts dependency maps✓—
Newer published versions from the registry✓ skif update—✓ syncpack update—

JavaScript and TypeScript analysis

Featureskifknip
Unused and unlisted dependencies, unlisted binaries, unresolved imports✓✓
Unused files, exports, and exported types✓✓
Unused enum and namespace members✓✓
Unused class members✓ matched by name— dropped in knip 6
Duplicate exports✓✓
Circular imports✓ off by default✓ not reported by default
Test-runner mocks of modules that do not exist✓—
Why a file, export, or dependency counts as used✓ skif explain-usage✓ --trace-*
Production and strict modes✓✓
Custom compilers for other file types~ declared import patterns, never a function✓
Built-in plugins for tools and frameworks213207
Runs no project code while linting✓— loads configuration files with jiti

Fixing, adoption, and integrations

Featureskifsherifsyncpackknip
Autofix✓✓✓✓
Safe and unsafe fix levels✓——~ file deletion is opt-in
Preview fixes as a diff✓—~ lists changes, no diff—
Baseline that can only shrink✓———
Configuration translated from the other tools✓ skif migrate———
Configuration layered across directories✓——~ one file with a workspaces map
SARIF✓——✓
Language server✓——✓
MCP server✓——✓
Editor extension———✓
Custom reporters and preprocessors———✓
GitHub Action✓✓——
Library API✓ Rust crate and npm package——~ undocumented

Benchmark results

Every number below comes from one run of the bench workflow on the 0.9.0 code: GitHub Actions run 44151292705, measured on 2026-11-17.

skif0.9.0 at commit 69850aeed43d, built with rustc 1.100.0
Compared toolsknip 6.45.1, sherif 1.13.0, syncpack 15.3.3
RunnerGitHub-hosted ubuntu-24.04, image ubuntu24 20261111.127.1
MachineUbuntu 24.04.5 LTS, Linux 7.0.0-1014-aws, x86_64, Intel Xeon 6975P-C, 4 logical CPUs (2 physical cores), 15.3 GiB memory, KVM
Load average5.71 / 3.16 / 1.64 before, 2.97 / 2.56 / 2.01 after
Node and package managersNode v26.13.0, npm 11.20.0, pnpm 11.24.0, yarn 1.22.22
Timerhyperfine 1.20.0, 3 warmup runs and 15 measured runs; 1 and 5 on angular, vscode, n8n, and next-js

The method in brief. hyperfine times whole command-line invocations, process start-up included, without a shell. Times are wall clock on a warm file cache, and the tables show medians. The ratio columns are the ones the run summary prints, which is hyperfine's ratio of the means. Each compared row runs on the scope its comparison tool reads: a full skif run against knip, and skif --no-js, which runs only the manifest and policy rules, against sherif and syncpack. Every compared skif row runs with --no-cache. The repositories are pinned to a full commit SHA and their dependencies are installed first, since knip needs them. On npm-cli knip runs with --no-gitignore, since npm's .gitignore otherwise hides every workspace from it. On angular, vscode, n8n, and next-js both tools get the configuration of the agreement comparison, so they read the same files. It's a shared virtual machine, so read the ratios, which share the machine and its noise, rather than the absolute times.

Dead-code analysis: skif against knip

Repositoryskif, medianknip, medianknip / skif
create-t3-turbo28.1 msfails—
vue-core63.3 msfails—
tanstack-query359 ms2869 ms8.0x
babel807 ms4441 ms5.5x
npm-cli82.6 ms539 ms6.5x
angular857 ms3452 ms4.1x
vscode2566 ms12924 ms5.1x
n8n5079 ms21703 ms4.3x
next-js795 ms4695 ms5.9x

skif was 4.1x to 8.0x faster on the seven repositories where knip prints a report. The target I set for the project is at least 5x faster than knip on the same tree, and this run missed it on two repositories: angular at 4.1x and n8n at 4.3x. It passed on the other five.

knip exited with an error in every run on create-t3-turbo (its Expo Metro config needs metro-cache, which pnpm's strict install does not provide) and on vue-core (its SFC playground Vite config reads a build-time global that only the repository's own build defines), so there is nothing to compare there. On n8n and next-js knip exits with an error after printing its report, because two Vite configs and the root Jest config do not load outside the repositories' own builds. Its time there is that of a run without the entries of those configurations.

Three of the repositories hold nested projects that are not workspace members. skif --recursive lints them too, and no comparison tool reads them, so those rows have no ratio: 812 ms on babel, 4067 ms on vscode, 2440 ms on next-js.

Manifest and policy checks: skif --no-js against sherif and syncpack

Targetskif --no-jssherifsherif / skifsyncpack lintsyncpack / skif
Generated, 50 packages3.9 ms24.9 ms6.4x31.8 ms7.9x
Generated, 500 packages19.0 ms38.2 ms2.0x115 ms6.0x
Generated, 2000 packages82.2 ms93.7 ms1.1x512 ms6.1x
create-t3-turbo2.9 ms23.4 ms7.9x27.2 ms9.2x
vue-core3.1 ms23.9 ms7.5x28.5 ms9.1x
tanstack-query7.9 ms27.9 ms3.5x77.3 ms9.9x
babel8.3 ms25.2 ms3.1x186 ms22.5x
npm-cli4.8 ms24.6 ms5.1x50.1 ms10.4x
angular5.0 ms25.1 ms5.1x63.2 ms12.5x
vscode34.3 ms27.4 ms0.8x99.7 ms2.9x
n8n82.2 ms29.4 ms0.4x137 ms1.7x
next-js57.9 ms25.5 ms0.4x242 ms4.2x

skif was faster than syncpack on all twelve targets, from 1.7x to 22.5x. Against sherif it was faster on nine and slower on three: vscode, n8n, and next-js, where sherif finished in under 30 ms and skif took 34 to 82 ms. The target for these rules, under 50 ms on 500 packages, passed at 19.0 ms.

Module graph and peak memory

The graph target is a generated workspace of 10,000 TypeScript files in 100 packages. A whole skif run on it, every JS rule included, took 204 ms against a target of under 2 s. Peak resident set size is measured for skif only, on the full run. The run does not measure the other tools' memory, so this is not a comparison.

Targetskif, peak RSS
graph: 10,000 files in 100 packages109 MiB
create-t3-turbo26 MiB
vue-core33 MiB
tanstack-query108 MiB
babel154 MiB
npm-cli45 MiB
angular215 MiB
vscode440 MiB
n8n844 MiB
next-js187 MiB

Warm cache

This is skif against itself: the same full run, once with --no-cache and once on the store a previous run of the same tree wrote. It is compared with no other tool and enters none of the ratios above.

Targetskif, uncachedskif, warm cacheSpeed-up
graph: 10,000 files in 100 packages204 ms197 ms1.0x
create-t3-turbo28.1 ms28.0 ms1.0x
vue-core63.3 ms41.8 ms1.5x
tanstack-query359 ms317 ms1.1x
babel807 ms797 ms1.0x
npm-cli82.6 ms56.0 ms1.5x
angular857 ms409 ms2.1x
vscode2566 ms1377 ms1.9x
n8n5079 ms3892 ms1.3x
next-js795 ms610 ms1.3x

The cache saves between nothing and half of a run, 1.0x to 2.1x. Parsing is only part of the work. Reading and hashing every file, the configuration, the manifests, the module graph, and the rules still run on a warm store. The same workflow also compares the report of a cached run with the report of an uncached run on every corpus repository, across seeded source edits, and fails on any difference. In this run, 66 comparisons were identical and none differed.

Precision on seeded dead code

Real repositories have no answer key, so precision is measured on a generated 5-package workspace with 73 seeded findings next to live code that is reached only through patterns that caused false findings on real repositories. This was measured with skif 0.8.0 (commit 4d3bdd7f) without types, which is how 0.9.0 behaves, against knip 6.45.1.

ToolPrecisionRecallPrecision, 33 non-member findingsRecall, 33 non-member findings
skif100%79%100%100%
knip74%59%69%100%

skif reported no live code as dead. The recall it lacks is in members: it matches member reads by name, so it found 15 of 20 seeded unused class members and 5 of 15 enum members. knip found the same 5 of 15 enum members and has no class-member check in version 6. Precision, agreement with knip on real repositories, and reproducibility

Pinned corpus

RepositoryPackage managerCommit
create-t3-turbopnpm8f945b7bb3bf
vue-corepnpm24c9d0bffb22
tanstack-querypnpm73c5686de77b
babelyarn7750b3d69123
npm-clinpmfc517df18fb5
angularpnpm37563fc32267
vscodepnpm6b7063d8883d
n8npnpmc1420c662538
next-jspnpme8ec2aed9266

The full SHAs, the tool versions, and the declared knip failures are in tools/bench/corpus.toml. The benchmark runs only in CI, as a dispatched workflow on a GitHub-hosted runner. Harness and how to reproduce

Note: skif is not uniformly faster than everything. It is faster than knip on every repository where knip completes, and faster than syncpack on every target, but sherif beats it on the three largest repositories for the manifest checks, and it missed its own 5x target against knip on angular and n8n. What it does give you is one tool, one configuration file, and one report in place of three, without running your project's code, and a skif migrate that makes trying it cheap: run npx @polylint/skif migrate --dry-run in a repository that already uses sherif, syncpack, or knip, and it prints the skif.toml and what it could not translate.

I'm happy to hear any comments. If you find the tool useful, star it. It really does help. And of course, I'd love to see people use it and get involved with the project.