npm · pnpm · yarn · bun · 54 rules · 213 plugins · type-aware · format-preserving fixes
Docs · Benchmarks · Comparison · Install · Quick start · Rules
skif is a dependency linter for JavaScript and TypeScript repositories, written in Rust. One binary and one
skif.toml cover what sherif (monorepo and manifest rules), syncpack (version and catalog policies) and knip (unused
files, exports and dependencies) check. The dead-code analysis parses with oxc and, with --type-aware,
resolves member reads with the TypeScript type checker of tsrs. skif reads tool
configurations statically and runs no project code while linting, its fixes keep key order, indentation and comments,
and skif migrate translates an existing sherif, syncpack and knip setup in one step.
- 4.1–8.4x faster than knip (median 5.8x) for dead-code analysis, on 7 pinned public repositories where knip completes; it fails on create-t3-turbo and vue-core (on n8n and next-js it exits with an error after its report).
- up to 7.4x faster than sherif (median 3.2x), and slower on 3 of 12 targets for manifest and workspace checks (
skif --no-js), on 9 pinned public repositories and 3 generated workspaces of 50, 500 and 2000 packages. - 1.7–28.0x faster than syncpack (median 8.5x) for version-policy checks (
skif --no-js), on 9 pinned public repositories and 3 generated workspaces of 50, 500 and 2000 packages.
skif 0.7.0 against knip 6.45.1, sherif 1.13.0, syncpack 15.3.3: medians of 15 runs (5 on angular, vscode, n8n and next-js) on a GitHub-hosted runner, measured on 2026-11-17.
The knip numbers time a whole skif run as it runs by default; the sherif and syncpack numbers time skif --no-js,
which runs the manifest and policy rules those tools cover. Each claim links to the
benchmarks page, which gives the tables per repository and
workspace, the workflow run the numbers come from, the methodology, the accuracy on seeded defects and the agreement
with knip on real repositories.
pnpm add -D @polylint/skif # or npm install -D, yarn add -D, bun add -D; the command is `skif`
cargo binstall skif-cli # prebuilt binary; or cargo install skif-cli
brew install polylint/tap/skif # Homebrewscoop bucket add polylint https://github.com/polylint/scoop-bucket
scoop install skifThe npm package needs Node.js 22, 24 or 26, or Bun 1.x, on macOS, Linux or Windows.
GitHub Action:
- uses: actions/checkout@v7
- uses: polylint/skif@v0.8
with:
fail-on-warnings: truepre-commit or prek (needs neither Rust nor Node):
repos:
- repo: https://github.com/polylint/skif
rev: v0.8.0 # use the latest release tag
hooks:
- id: skif # lints manifests, skipping JS analysis
- id: skif-fix # optional: also applies safe fixesThe installation guide lists every channel, the prebuilt archives and the supported versions; the integrations guide covers the Action inputs, Poly, Lefthook, GitLab CI and the npm API.
npx @polylint/skif # lint the workspace or package you are in
npx @polylint/skif --fix --dry-run # show the safe fixes as a diff
npx @polylint/skif --fix # apply them, then run the package manager's install
npx @polylint/skif migrate # translate sherif, syncpack and knip config into a skif.toml
npx @polylint/skif baseline write # record the findings you cannot fix yet; CI then accepts only fewerskif works without configuration. skif init writes a starter skif.toml, and files layer from a project up to the
git root, so one organisation file applies to every project below it. See the
quickstart and the
configuration reference.
- Manifest and workspace rules: root
privateandpackageManager, sorted and empty dependency maps,@typesindependencies, unmatched workspace patterns, stray lockfiles, nested workspace roots, Lerna configuration. - Version policy: version and semver-range groups, banned dependencies, dependency families, the
workspace:protocol, catalogs (pnpm, Bun, Yarn 4.10+) and toolchain pins (packageManager,engines,.nvmrc, Dockerfiles, workflows,MODULE.bazel).skif updatefinds newer published versions; it is the only command that uses the network. - Dead-code analysis on oxc: unused files, exports, types, enum, namespace and class members
and
package.jsonsubpaths; unused and unlisted dependencies, unlisted binaries and unresolved imports; duplicate exports; circular imports. Vue, Svelte, Astro, MDX and Marko files are read, and 213 plugins read the configuration of common tools.skif explain-usagesays why a file, export, member or dependency counts as used. - Type-aware analysis: where a package has a
tsconfig.jsonorjsconfig.json, the TypeScript checker of tsrs resolves each member read to the declaration it reaches, also through a base class or an implemented interface. A reada.dispose()then keeps only thedisposeofa's class out ofunused-class-members, not everydisposeof the project, andunused-enum-membersandunused-namespace-membersalso count reads through an alias orthis. It is off by default in the CLI and the npm package because it costs time and memory (see the benchmarks);--type-awareor[js] type-aware = trueturns it on. A package without types keeps the name-based analysis, and the report names it (type-aware analysis). - Monorepo layouts: npm, pnpm, Yarn 2+, Yarn Classic and Bun workspaces, single packages,
skif -rover many roots, Rush, Turborepo, Nx and Lerna, and Bazel with rules_js. - Fixes: safe and unsafe levels,
--fix-typeto fix some rules only,--dry-rundiffs, andskif formatforpackage.jsonlayout. - CI output: human, JSON, TOON, SARIF, GitHub annotations, GitLab Code Quality, compact, Markdown and CODEOWNERS reports, several in one run, with stable rule ids and documented exit codes.
- Editors and agents: watch mode, a language server, an MCP server (all three without types) and an agent skill.
- Library: the
skifcrate does no I/O of its own and puts the JS analysis and the type checker behind itsjs-analysisandtype-awarefeatures, and the npm package exportslint,lintAsyncandrun. See the library guide.
| skif | |
|---|---|
| Package managers | npm, pnpm, Yarn 2+, Yarn Classic, Bun |
| Linkers tested end to end in CI | npm (hoisted); pnpm (isolated, nodeLinker: hoisted); Yarn 2+ (Plug'n'Play, nodeLinker: node-modules, nodeLinker: pnpm); Yarn Classic (hoisted); Bun (default, linker = "hoisted", linker = "isolated") |
| Runtime | Native binary, or through npm on Node.js 22, 24, 26 and Bun 1.x |
| Type checker | tsrs 7.1.0-beta.tsrs2, a Rust port of the TypeScript 7 checker, for packages with a tsconfig.json or jsconfig.json |
| Platforms | macOS, Linux (glibc, musl), Windows; x64, arm64 |
Versions per package manager and operating system are under supported versions. The comparison guide compares skif with sherif, syncpack and knip capability by capability, with sources.
- Introduction and quickstart
- Rules (
docs/rules.md) - CLI reference and configuration reference
- Migrating from sherif, syncpack and knip
- Benchmarks and comparison
skif is part of polylint, a set of Rust linters and formatters. Sibling tools:
polylint (one linter and formatter for every language; it can run skif as an
engine), adrlint (MADR decision records),
uncomment (comment removal and linting). Install any of them from the Homebrew
tap (brew tap polylint/tap) or the Scoop bucket.
See CONTRIBUTING.md and SECURITY.md. Design decisions are recorded as architecture decision records.
MIT, see LICENSE. skif started as a fork of sherif, vendors parts of syncpack and follows knip's issue types and plugin knowledge; derived code is credited in ATTRIBUTIONS.md.