stolinski/s-stack/fallow

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Codebase analyzer for JavaScript/TypeScript projects. Finds unused code (files, exports, types, dependencies), code duplication, circular dependencies, complexity hotspots, architecture boundary violations, and feature flag patterns. 90 framework plugins, zero configuration, sub-second performance. Use when asked to analyze code health, find unused code, detect duplicates, check circular dependencies, audit complexity, check architecture boundaries, detect feature flags, clean up the codebase, auto-fix issues, or run fallow.

Install

npx vskill@latest install stolinski/s-stack/fallow

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

Fallow: Codebase Analyzer

The codebase analyzer for JavaScript and TypeScript. Finds unused code, circular dependencies, code duplication, complexity hotspots, architecture boundary violations, and feature flag patterns. 90 framework plugins, zero configuration, sub-second performance.

When to Use

  • Finding dead code (unused files, exports, types, enum/class members)
  • Finding unused or unlisted dependencies
  • Detecting code duplication and clones
  • Checking code health and complexity hotspots
  • Cleaning up a codebase before a release or refactor
  • Auditing a project for structural issues
  • Setting up CI checks for dead code or duplication thresholds
  • Auto-fixing unused exports and dependencies
  • Detecting feature flag patterns (environment gates, SDK calls, config objects)
  • Investigating why a specific export or file appears unused

When NOT to Use

  • Runtime error analysis or debugging
  • Type checking (use tsc for that)
  • Linting style or formatting issues (use ESLint, Biome, Prettier)
  • Security vulnerability scanning
  • Bundle size analysis
  • Projects that are not JavaScript or TypeScript

Prerequisites

Fallow must be installed. If not available, install it:

bash
npm install -g fallow # prebuilt binaries (fastest)
# or
npx fallow dead-code # run without installing
# or
cargo install fallow-cli # build from source

Agent Rules

  1. Always use `--format json --quiet 2>/dev/null` for machine-readable output. The 2>/dev/null discards stderr so progress messages and threshold warnings don't corrupt the JSON on stdout. Never use 2>&1
  2. Always append `|| true` to every fallow command. Exit code 1 means "issues found" (normal), not a runtime error. Without || true, the Bash tool treats exit 1 as failure and cancels parallel commands. Only exit code 2 is a real error (invalid config, parse failure)
  3. Use `--explain` to include a _meta object in JSON output with metric definitions, ranges, and interpretation hints
  4. Use issue type filters (--unused-exports, --unused-files, etc.) to limit output scope
  5. Always `--dry-run` before `fix`, then fix --yes to apply
  6. All output paths are relative to the project root
  7. Never run `fallow watch`. It is interactive and never exits

Commands

CommandPurposeKey Flags
fallowRun all analyses: dead code + duplication + complexity (default)--only, --skip, --ci, --fail-on-issues, --group-by, --summary, --fail-on-regression, --tolerance, --regression-baseline, --save-regression-baseline, --score, --trend, --save-snapshot
dead-codeDead code analysis (check is an alias)--unused-exports, --changed-since, --production, --file, --include-entry-exports, --stale-suppressions, --ci, --group-by, --summary, --fail-on-regression, --tolerance, --regression-baseline, --save-regression-baseline
dupesCode duplication detection--mode, --threshold, --top, --changed-since, --skip-local, --cross-language, --ignore-imports, --fail-on-regression, --tolerance, --regression-baseline, --save-regression-baseline
fixAuto-remove unused exports/deps--dry-run, --yes (required in non-TTY)
initGenerate config file or pre-commit hook--toml, --hooks, --branch
migrateConvert knip/jscpd config--dry-run, --from PATH
listInspect project structure--files, --entry-points, --plugins, --boundaries
healthFunction complexity analysis--complexity, --max-cyclomatic, --max-cognitive, --top, --sort, --file-scores, --hotspots, --targets, --effort, --score, --min-score, --since, --min-commits, --save-snapshot, --trend, --coverage-gaps, --workspace, --baseline, --save-baseline
auditCombined dead-code + complexity + duplication for changed files--base, --production, --workspace, --ci, --fail-on-issues, --explain
flagsDetect feature flag patterns (env vars, SDK calls, config objects)--top
schemaDump CLI definition as JSON
configShow the loaded config path and resolved config (verifies which .fallowrc.json is in effect)--path

Issue Types

TypeFilter FlagDescription
Unused files--unused-filesFiles unreachable from entry points
Unused exports--unused-exportsSymbols never imported elsewhere
Unused types--unused-typesType aliases and interfaces
Unused dependencies--unused-depsPackages in dependencies, devDependencies, optionalDependencies, type-only production deps, and test-only production deps
Unused enum members--unused-enum-membersEnum values never referenced
Unused class members--unused-class-membersMethods and properties
Unresolved imports--unresolved-importsImports that can't be resolved
Unlisted dependencies--unlisted-depsUsed packages missing from package.json
Duplicate exports--duplicate-exportsSame symbol exported from multiple modules
Circular dependencies--circular-depsImport cycles in the module graph
Boundary violations--boundary-violationsImports crossing architecture zone boundaries. Presets: layered, hexagonal, feature-sliced, bulletproof
Stale suppressions--stale-suppressionsfallow-ignore comments or @expected-unused JSDoc tags that no longer match any issue
Test-only dependencies—Production deps only imported from test files (should be devDependencies)

MCP Tools

When using fallow via MCP (fallow-mcp), the following tools are available:

ToolDescription
analyzeFull dead code analysis. Set boundary_violations: true as a convenience alias for issue_types: ["boundary-violations"]. Set group_by to "owner" or "directory" to partition results
check_changedIncremental analysis of files changed since a git ref
find_dupesCode duplication detection. Set changed_since to scope to changed files since a git ref
fix_previewDry-run auto-fix preview
fix_applyApply auto-fixes (destructive)
check_healthComplexity metrics, health scores, hotspots, and refactoring targets
auditCombined dead-code + complexity + duplication for changed files, returns verdict
project_infoProject metadata. Set entry_points, files, plugins, or boundaries to true to request specific sections
list_boundariesArchitecture boundary zones and access rules. Returns {"configured": false} if no boundaries configured
detect_flagsDetect feature flag patterns (env vars, SDK calls, config objects). Set top to limit results

All tools accept root, config, no_cache, and threads params. The MCP server subprocess timeout defaults to 120s, configurable via FALLOW_TIMEOUT_SECS.

All JSON responses include structured actions arrays on every finding (dead code, health, duplication), enabling programmatic fix application or suppression.

References

  • CLI Reference: complete command and flag specifications
  • Gotchas: common pitfalls, edge cases, and correct usage patterns
  • Patterns: workflow recipes for CI, monorepos, migration, and incremental adoption

Common Workflows

Audit a project for all dead code
bash
fallow dead-code --format json --quiet

Parse the JSON output. It contains arrays for each issue type (unused_files, unused_exports, unused_types, unused_dependencies, etc.) plus total_issues and elapsed_ms metadata. Each issue object includes an actions array with structured fix suggestions (action type, auto_fixable flag, description, and optional suppression comment).

Find only unused exports (smaller output)
bash
fallow dead-code --format json --quiet --unused-exports
Check if a PR introduces dead code
bash
fallow dead-code --format json --quiet --changed-since main --fail-on-issues

Exit code 1 if new dead code is introduced. Only analyzes files changed since the main branch.

Find code duplication
bash
fallow dupes --format json --quiet
fallow dupes --format json --quiet --mode semantic

The semantic mode detects renamed variables. Other modes: strict (exact), mild (default, syntax normalized), weak (different literals).

Safe auto-fix cycle
bash
# 1. Preview what will be removed
fallow fix --dry-run --format json --quiet
# 2. Review the output, then apply
fallow fix --yes --format json --quiet
# 3. Verify the fix worked
fallow dead-code --format json --quiet

The --yes flag is required in non-TTY environments (agent subprocesses). Without it, fix exits with code 2.

Discover project structure
bash
fallow list --entry-points --format json --quiet
fallow list --plugins --format json --quiet

Shows detected entry points and active framework plugins (90 built-in: Next.js, Vite, Jest, Storybook, Tailwind, etc.).

Production-only analysis
bash
fallow dead-code --format json --quiet --production

Excludes test/dev files (*.test.*, *.spec.*, *.stories.*) and only analyzes production scripts.

Analyze a single workspace package
bash
fallow dead-code --format json --quiet --workspace my-package

Scopes output to one package while keeping the full cross-workspace graph.

Scope to specific files (lint-staged)
bash
fallow dead-code --format json --quiet --file src/utils.ts --file src/helpers.ts

Only reports issues in the specified files. Project-wide dependency issues are suppressed. Warns on non-existent paths.

Catch typos in entry file exports
bash
fallow dead-code --format json --quiet --include-entry-exports

Reports unused exports in entry files (package.json main/exports, framework pages). By default, exports in entry files are assumed externally consumed. This flag catches typos like meatdata instead of metadata.

Debug why something is flagged
bash
# Trace an export's usage chain
fallow dead-code --format json --quiet --trace src/utils.ts:myFunction
# Trace all edges for a file
fallow dead-code --format json --quiet --trace-file src/utils.ts
# Trace where a dependency is used
fallow dead-code --format json --quiet --trace-dependency lodash
Migrate from knip or jscpd
bash
# Preview migration
fallow migrate --dry-run
# Apply migration (creates .fallowrc.json)
fallow migrate
# Migrate to TOML (creates fallow.toml)
fallow migrate --toml

Auto-detects knip.json, .knip.json, .jscpd.json, and package.json embedded configs.

Initialize a new config
bash
fallow init # creates .fallowrc.json, adds .fallow/ to .gitignore
fallow init --toml # creates fallow.toml, adds .fallow/ to .gitignore
fallow init --hooks # scaffold a pre-commit git hook
fallow init --hooks --branch develop # hook using custom base branch

Exit Codes

CodeMeaning
0Success, no error-severity issues
1Error-severity issues found
2Runtime error (invalid config, parse failure, or fix without --yes in non-TTY)

When --format json is active and exit code is 2, errors are emitted as JSON on stdout:

json
{"error": true, "message": "invalid config: ...", "exit_code": 2}

Configuration

Fallow reads config from project root: .fallowrc.json > fallow.toml > .fallow.toml. Most projects work with zero configuration thanks to 90 auto-detecting framework plugins.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
59
Repository forks
2
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/stolinski/s-stack/fallow/badge)](https://verified-skill.com/skills/stolinski/s-stack/fallow)

Something wrong with this skill or its page? Tell us.