Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

fallow

БесплатноБез исполняемых скриптовНе проверен

Fallow is a fast static analyzer for TypeScript and JavaScript repositories that finds unused files, exports and dependencies, circular imports, copy-pasted…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

Fallow — dead code, duplication and complexity analysis for JS/TS

Overview

Fallow is a Rust binary, distributed on npm, that builds one graph of a JavaScript or TypeScript repository (modules, exports, dependencies, functions) and answers several questions from it: what does nothing use, what is copied, where is the code hard to change, what forms an import cycle, and is this pull request safe to merge. It is deterministic (no AI inside the analyzer) and fast enough to run on every commit.

Commands verified against fallow 3.37.0:

Question Command
Everything at once npx fallow
Unused files, exports, types, dependencies npx fallow dead-code
Duplicated code npx fallow dupes
Complexity, health score, refactoring targets npx fallow health
Import cycles and boundary rules npx fallow architecture
Only what a change introduced npx fallow audit --base <ref>
Remove safe unused code npx fallow fix

Relation to knip: fallow's dead-code analysis covers the same ground as knip (unused files, exports and dependencies), and fallow migrate converts a knip, jscpd or stylelint config into a fallow config. The repository also documents duplication, complexity and PR gating in the same tool. Use the catalog's knip skill if a project already standardises on knip; use fallow when you also want complexity, duplication and a changed-files gate from one binary.

Instructions

Installation

Run without installing, or add it to the project:

npx fallow --help
npm install --save-dev fallow

The package provides three launchers: fallow (CLI), fallow-lsp (editor language server) and fallow-mcp (MCP server). cargo install fallow-cli and Docker are also listed in the official installation guide at https://fallow.tools/docs/installation/.

Check project readiness

npx fallow doctor

Prints [OK] / [-] lines for root, config, workspaces, plugins, dependencies and cache, ending in Status: ready or Status: ready with warnings (for example when node_modules is missing, which degrades dependency analysis; run your package manager install first). It changes nothing.

Find unused code and dependencies

npx fallow dead-code
npx fallow dead-code --format json

The text report groups results under "Unused files", "Unused exports", "Unused dependencies" and "Unused devDependencies", with file and line. Exit code 1 means findings at error severity; exit code 2 means an invalid run (do not hide it with || true).

Before deleting anything, prove it is unused:

npx fallow dead-code --trace src/cart.ts:discount
npx fallow dead-code --trace-dependency lodash

The trace output says whether the file is reachable and why the export has no consumers. Static analysis cannot see usage through string-built imports, so for a published library keep the public API (see Guidelines).

Preview and apply fixes

npx fallow fix --dry-run
npx fallow fix

--dry-run prints lines like Would remove export from src/cart.ts:2 discount and Would remove lodash from dependencies in package.json without touching files. Review the dry run, commit first, then run fix. File deletion is never auto-fixed; the JSON output marks it auto_fixable: false.

Measure complexity and pick refactoring targets

npx fallow health --score
npx fallow health --targets --hotspots

--score gives a 0-100 health grade with the largest deductions. Functions above the cyclomatic, cognitive or CRAP thresholds are listed with severity (for example CRITICAL). --hotspots combines complexity with git churn over the last six months, and --targets ranks refactoring candidates by effort and payoff. Add --coverage <coverage-final.json> for exact CRAP scores; without it they are estimated from export references.

Find duplication

npx fallow dupes

Reports clone groups across JS, TS and CSS. A clean run prints No code duplication found. To follow one group: npx fallow dupes --trace dup:<fingerprint> using a fingerprint from the report.

Gate a pull request

npx fallow audit --base origin/main

Audit scopes the analysis to files changed against the base ref and fails (exit 1) only on findings the change introduces; older findings are excluded and the summary tells you how many were skipped. Use --gate all to enforce inherited findings as well. In CI the checkout needs history for the base ref (fetch-depth: 0).

GitHub Actions:

- uses: actions/checkout@v4
  with:
    fetch-depth: 0
- uses: fallow-rs/fallow@v3
  with:
    command: audit

Add fail-on-issues: false to start in report-only mode.

Adopt on an existing codebase

npx fallow recommend
npx fallow --save-baseline fallow-baseline.json
npx fallow --baseline fallow-baseline.json

recommend proposes a config without changing files. A saved baseline (bare --save-baseline stores the d

Полный SKILL.md на GitHub

Установить fallow в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл fallow?

Fallow is a fast static analyzer for TypeScript and JavaScript repositories that finds unused files, exports and dependencies, circular imports, copy-pasted code and overly complex functions, and gates pull requests on only the problems a change introduces. Use it when asked to "find dead code", "clean up unused dependencies", "check code health before merging", "find complexity hotspots", "audit this PR", or "migrate from knip". Needs no TypeScript compiler and no config to start.

Как установить скилл fallow?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл fallow запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить fallow с