Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL
All skills

setup-ts-deep-modules

Install dependency-cruiser and enforce that each TypeScript package is reachable only through its root entry-point files.

When to use it

You have a TypeScript monorepo where packages already exist but nothing stops code from importing another package's internal subfolders.

For example

You say

Use setup-ts-deep-modules on my pnpm TypeScript monorepo with packages under src/packages, so imports can only reach each package's root entry points.

You get
  • dependency-cruiser devDependency
  • .dependency-cruiser.cjs with four rules
  • lint:boundaries script

How it works

  • Public vs private is decided by folder depth: root files are entry points, anything in a subfolder is private.
  • A package can expose several small entry points instead of one barrel index.
  • Finishes by proving the rules fail on a deliberate deep import, then pass again.

Before installing

This skill includes a script your assistant may run on your computer.