fallow

Detects dead code, duplication, and complexity issues in JavaScript and TypeScript projects.

5|Updated Jan 14, 2025
One-click install
npx skills add https://github.com/timmo001/dotfiles --skill fallow-timmo001
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fallow
Source: https://github.com/timmo001/dotfiles/tree/main/agents/.config/opencode/skills/fallow
Command: npx skills add https://github.com/timmo001/dotfiles --skill fallow-timmo001

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

It streamlines the process of identifying unused code, dependencies, and structural issues across JavaScript and TypeScript projects, improving code quality and maintainability.

Core Features & Use Cases

  • Static analysis: Finds unused files, exports, dependencies, types, and members to eliminate dead code.
  • Duplication detection: Identifies copy-pasted code blocks to reduce redundancy.
  • Complexity assessment: Measures function complexity scores to flag challenging code areas.
  • Integration options: Supports CI/CD pipelines, baseline comparisons, and detailed tracing to understand code usage.
  • Use case: Audit a large monorepo for unused dependencies and code clones to prepare for a release or refactor.

Quick Start

Run fallow dead-code --format json --quiet to analyze your project for redundant and unused code components.

Frequently Asked Questions about fallow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find dead code and unused exports in a TypeScript monorepo?

Static analysis detects dead code in TypeScript and JavaScript monorepos by tracing imports and usage to find unused files, exports, dependencies, types, and members. Run an analysis command to output a baseline of redundant components for removal.

What is the best way to measure function complexity and duplication in JavaScript projects?

Static analysis measures function complexity scores and identifies copy-pasted code blocks in JavaScript projects to flag challenging areas. This reduces redundancy and highlights targets for refactoring to improve overall codebase health.

Can I integrate static analysis into CI pipelines for continuous code health checks?

Static analysis supports CI/CD pipelines and baseline comparisons to continuously evaluate code structure. Integrating it into CI catches unused dependencies and complexity issues before merging changes into the main branch.

How do I audit a large codebase for unused dependencies before a major release?

Auditing for unused dependencies involves running static analysis across the project to trace imports and evaluate code structure. This identifies unneeded packages and refactoring targets, streamlining the codebase for a clean and optimized release.

What are the limitations of using static analysis to detect code clones in TypeScript?

Static analysis evaluates code structure and imports to detect duplication, but it may miss complex runtime dynamic imports or reflection-based usage. It should be combined with manual review when tracing highly dynamic JavaScript or TypeScript code paths.