Back to Agentic AI

Agentic AI / Skills

Run Fallow Skill

A Claude Code Skill that runs the fallow static analyzer on any JS/TS project: a preflight script checks the setup and reads the limits the project states for itself, a summarizer keeps fallow JSON out of context, and a reference guide covers fixing the fallow config when a finding is noise.

Skills

Use it

  1. 1

    Check you have

    fallowNode.jsnode_modules installed
  2. 2

    Install into your project

    curl -sSL https://raw.githubusercontent.com/ersanyamarya/agentry-labs/main/scripts/install.sh | bash -s -- skills/run-fallow
  3. 3

    Run it in Claude Code

    /skill run-fallow
View source on GitHub

Share

What fallow is

Fallow is a static analyzer for TypeScript and JavaScript codebases: dead code, duplication, complexity hotspots, architecture-boundary drift, feature-flag branches and security candidates, all built off the real module graph rather than regex matching. Point it at a repo and it tells you what's unused, what's copy-pasted, and what's getting too tangled to touch safely. It's read-only by default; nothing gets deleted or rewritten unless you explicitly run fallow fix.

The skill works on any JS/TS project. This portfolio happens to be one of them, with a .fallowrc.json at the repo root, so it's where I use it most.

What the skill enforces

Left alone, an agent running fallow tends to do three things wrong: read raw output that floods its context, apply a complexity threshold nobody chose, and treat every finding as gospel instead of checking whether the config itself is stale. The skill exists to close those gaps.

  1. Condensed JSON, never raw. Every command writes --format json to a temp file, and scripts/summarize.mjs turns it into totals plus the top findings per category (--top 10 by default). Claude reasons from that summary and only reaches for jq when it needs one item the summary cut off. Fallow's payloads get huge on a real repo, and raw output burns the one resource an agent can't get back, its own context window.
  2. The project's bar, or fallow's, and say which. Before anything runs, scripts/preflight.mjs checks that fallow is on the PATH, finds the config file and package manager, warns when node_modules is missing, and scans CLAUDE.md, AGENTS.md and CONTRIBUTING.md for lines that state a numeric limit. On this repo it picks up the "cyclomatic complexity ≤ 10" rule from CLAUDE.md, so health runs with --max-cyclomatic 10. When a project states nothing, the skill uses fallow's defaults and says so in the report. It never invents a standard.
  3. Verify, and fix config drift. A finding that looks wrong is sometimes wrong, and sometimes it's the fallow config describing a codebase that no longer exists (a missed framework entry point, an ignorePatterns path that's gone). A reference file lists the signs of each and walks through fallow config-schema and fallow recommend before any hand-edit, then a re-run to confirm only the false positive went away. Deletions get proved with fallow dead-code --trace first, and fallow security output stays "candidates" until Claude has read the source.
<!-- diagram: flow-run-fallow -->
graph TD
    A[preflight.mjs: version, config, stated limits] --> B{fallow on PATH?}
    B -- No --> S[Stop, offer npx or global install]
    B -- Yes --> C[Pick command, project limits or fallow defaults]
    C --> D[fallow command --format json to temp file]
    D --> E[summarize.mjs: totals and top findings]
    E --> F{Finding looks wrong?}
    F -- Real issue --> G[Verify with --trace, report file:line]
    F -- Stale config --> H[config-schema and recommend, then edit config]
    H --> D

For a refactor or PR check, the skill brackets the edit: fallow guard <files> before touching anything, and fallow audit --base <base-branch> after. Audit exits 1 on a fail verdict, so Claude reads the verdict instead of treating the exit code as a crash. fallow fix never runs without your say-so.

Prerequisites

  • fallow CLI on the PATH. If preflight can't find it, the skill stops and offers npx fallow or a global install. It won't install anything without asking.
  • Node.js, to run the two bundled scripts.
  • Installed dependencies. Without node_modules, dependency findings and framework plugins are unreliable, so the skill offers to run the install first. A fallow config is optional; with none, fallow auto-detects, and the skill asks before creating one.

What's inside

Maintained publicly in Agentry Labs, a framework-agnostic collection of reusable AI-agent components. Alongside SKILL.md it ships scripts/preflight.mjs and scripts/summarize.mjs, two references (command-map.md, mapping intents to fallow commands, and false-positives-and-config.md), and evals/evals.json with three test prompts covering a dead-code sweep, a suspected Next.js false positive, and a pre-PR complexity check.