r/typescript • u/Goldziher • 23h ago
skif 0.9 replaces knip, sherif, and syncpack with one Rust binary
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
privateandpackageManager, sorted and empty dependency maps,@typesindependencies, 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 acrosspackageManager,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.tsthat 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-rundiffs, format-preserving edits, and a baseline that can only shrink.skif migratetranslates an existing sherif, syncpack, and knip setup into askif.tomlin 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/skifor the per-user cache directory, so a second run parses only the files that changed. It never changes a report.--no-cache,SKIF_CACHE=0or[cache] enabled = falseturns it off,skif cache statsandskif cache cleaninspect and remove it, and the GitHub Action restores and saves it through itscacheinput. - 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
| Tool | Primary job | Runtime | Relation to skif |
|---|---|---|---|
| skif | Manifest rules, version policy, and dead-code analysis in one run | Native binary, or a Node addon through npm | — |
| sherif | Zero-config monorepo manifest rules | Native binary | skif began as a fork; the manifest rules are ported with stable ids |
| syncpack | Version consistency, semver ranges, catalogs | Native binary | Same problem space; skif reuses its specifier model |
| knip | Unused files, exports, and dependencies | Node.js | Same 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
| Feature | skif | sherif | syncpack | knip |
|---|---|---|---|---|
| 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
| Feature | skif | knip |
|---|---|---|
| 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 frameworks | 213 | 207 |
| Runs no project code while linting | ✓ | — loads configuration files with jiti |
Fixing, adoption, and integrations
| Feature | skif | sherif | syncpack | knip |
|---|---|---|---|---|
| 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.
| skif | 0.9.0 at commit 69850aeed43d, built with rustc 1.100.0 |
|---|---|
| Compared tools | knip 6.45.1, sherif 1.13.0, syncpack 15.3.3 |
| Runner | GitHub-hosted ubuntu-24.04, image ubuntu24 20261111.127.1 |
| Machine | Ubuntu 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 average | 5.71 / 3.16 / 1.64 before, 2.97 / 2.56 / 2.01 after |
| Node and package managers | Node v26.13.0, npm 11.20.0, pnpm 11.24.0, yarn 1.22.22 |
| Timer | hyperfine 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
| Repository | skif, median | knip, median | knip / skif |
|---|---|---|---|
| create-t3-turbo | 28.1 ms | fails | — |
| vue-core | 63.3 ms | fails | — |
| tanstack-query | 359 ms | 2869 ms | 8.0x |
| babel | 807 ms | 4441 ms | 5.5x |
| npm-cli | 82.6 ms | 539 ms | 6.5x |
| angular | 857 ms | 3452 ms | 4.1x |
| vscode | 2566 ms | 12924 ms | 5.1x |
| n8n | 5079 ms | 21703 ms | 4.3x |
| next-js | 795 ms | 4695 ms | 5.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
| Target | skif --no-js | sherif | sherif / skif | syncpack lint | syncpack / skif |
|---|---|---|---|---|---|
| Generated, 50 packages | 3.9 ms | 24.9 ms | 6.4x | 31.8 ms | 7.9x |
| Generated, 500 packages | 19.0 ms | 38.2 ms | 2.0x | 115 ms | 6.0x |
| Generated, 2000 packages | 82.2 ms | 93.7 ms | 1.1x | 512 ms | 6.1x |
| create-t3-turbo | 2.9 ms | 23.4 ms | 7.9x | 27.2 ms | 9.2x |
| vue-core | 3.1 ms | 23.9 ms | 7.5x | 28.5 ms | 9.1x |
| tanstack-query | 7.9 ms | 27.9 ms | 3.5x | 77.3 ms | 9.9x |
| babel | 8.3 ms | 25.2 ms | 3.1x | 186 ms | 22.5x |
| npm-cli | 4.8 ms | 24.6 ms | 5.1x | 50.1 ms | 10.4x |
| angular | 5.0 ms | 25.1 ms | 5.1x | 63.2 ms | 12.5x |
| vscode | 34.3 ms | 27.4 ms | 0.8x | 99.7 ms | 2.9x |
| n8n | 82.2 ms | 29.4 ms | 0.4x | 137 ms | 1.7x |
| next-js | 57.9 ms | 25.5 ms | 0.4x | 242 ms | 4.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.
| Target | skif, peak RSS |
|---|---|
| graph: 10,000 files in 100 packages | 109 MiB |
| create-t3-turbo | 26 MiB |
| vue-core | 33 MiB |
| tanstack-query | 108 MiB |
| babel | 154 MiB |
| npm-cli | 45 MiB |
| angular | 215 MiB |
| vscode | 440 MiB |
| n8n | 844 MiB |
| next-js | 187 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.
| Target | skif, uncached | skif, warm cache | Speed-up |
|---|---|---|---|
| graph: 10,000 files in 100 packages | 204 ms | 197 ms | 1.0x |
| create-t3-turbo | 28.1 ms | 28.0 ms | 1.0x |
| vue-core | 63.3 ms | 41.8 ms | 1.5x |
| tanstack-query | 359 ms | 317 ms | 1.1x |
| babel | 807 ms | 797 ms | 1.0x |
| npm-cli | 82.6 ms | 56.0 ms | 1.5x |
| angular | 857 ms | 409 ms | 2.1x |
| vscode | 2566 ms | 1377 ms | 1.9x |
| n8n | 5079 ms | 3892 ms | 1.3x |
| next-js | 795 ms | 610 ms | 1.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.
| Tool | Precision | Recall | Precision, 33 non-member findings | Recall, 33 non-member findings |
|---|---|---|---|---|
| skif | 100% | 79% | 100% | 100% |
| knip | 74% | 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
| Repository | Package manager | Commit |
|---|---|---|
| create-t3-turbo | pnpm | 8f945b7bb3bf |
| vue-core | pnpm | 24c9d0bffb22 |
| tanstack-query | pnpm | 73c5686de77b |
| babel | yarn | 7750b3d69123 |
| npm-cli | npm | fc517df18fb5 |
| angular | pnpm | 37563fc32267 |
| vscode | pnpm | 6b7063d8883d |
| n8n | pnpm | c1420c662538 |
| next-js | pnpm | e8ec2aed9266 |
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.

