Setup TS deep modules installs dependency-cruiser and a config with four error-level rules: an entry-point boundary, freedom inside a package, tests that go through entry points, and no cycles. A package’s public surface is its root files, and everything in subfolders is hidden.
It finishes by proving the rules work: a clean run passes, a deliberate deep import fails, and the reverted code passes again.
What You Get
- A .dependency-cruiser.cjs with four forbidden rules
- A lint:boundaries script folded into the repo’s umbrella check
- A copy-me example package with an entry point, a lib folder and a test
- A README in the packages folder plus a context pointer from CLAUDE.md or AGENTS.md
Common Use Cases
- Stop code outside a package from importing its internals
- Make tests exercise packages only through their entry points
- Catch dependency cycles in CI
What Makes It Unique
Public and private are decided by folder depth, so adding a folder or an entry point never needs a config change. A package can expose several small entry points and barrel files are discouraged. The skill’s completion test is observing a pass, a failure on a planted violation and a pass again.
Under The Hood
A SKILL.md with a bundled dependency-cruiser.config.cjs. The agent reads lockfiles to pick pnpm, yarn, bun or npm, installs the dev dependency, edits package.json scripts, writes the config and example files, and runs depcruise, including a temporary violation that it reverts. If a config already exists it merges the rules in.