Skip to content
polylintPublic

About

Dependency and package-manager linter, auditor and enforcer for JavaScript and TypeScript, with first-class monorepo support. One Rust binary replaces sherif, syncpack and knip; MCP server, LSP and GitHub Action.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

9 stars

Watchers

0 watching

Forks

Latest commit

 

History

2,897 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

skif: dependency linter for JavaScript and TypeScript monorepos

npm · pnpm · yarn · bun · 54 rules · 213 plugins · type-aware · format-preserving fixes

crates.io npm CI Docs License: MIT

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.

Performance

  • 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.

Installation

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       # Homebrew
scoop bucket add polylint https://github.com/polylint/scoop-bucket
scoop install skif

The 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: true

pre-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 fixes

The 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.

Quick start

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 fewer

skif 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.

Features

  • Manifest and workspace rules: root private and packageManager, sorted and empty dependency maps, @types in dependencies, 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 update finds 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.json subpaths; 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-usage says why a file, export, member or dependency counts as used.
  • Type-aware analysis: where a package has a tsconfig.json or jsconfig.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 read a.dispose() then keeps only the dispose of a's class out of unused-class-members, not every dispose of the project, and unused-enum-members and unused-namespace-members also count reads through an alias or this. It is off by default in the CLI and the npm package because it costs time and memory (see the benchmarks); --type-aware or [js] type-aware = true turns 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 -r over many roots, Rush, Turborepo, Nx and Lerna, and Bazel with rules_js.
  • Fixes: safe and unsafe levels, --fix-type to fix some rules only, --dry-run diffs, and skif format for package.json layout.
  • 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 skif crate does no I/O of its own and puts the JS analysis and the type checker behind its js-analysis and type-aware features, and the npm package exports lint, lintAsync and run. See the library guide.

Support

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.

Documentation

polylint organization

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.

Contributing

See CONTRIBUTING.md and SECURITY.md. Design decisions are recorded as architecture decision records.

License

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.

About

Dependency and package-manager linter, auditor and enforcer for JavaScript and TypeScript, with first-class monorepo support. One Rust binary replaces sherif, syncpack and knip; MCP server, LSP and GitHub Action.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

9 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages