Skip to content
SkillMixed1,756 tokens in use

setup-ts-deep-modules

Wire dependency-cruiser into a TypeScript repo so each package is a deep module reachable only through its entry points.

328,764 stars on the repository MIT Licensemattpocock/skills · skills/in-progress/setup-ts-deep-modules
claude plugin install mattpocock-skills@claude-plugins-official
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing setup-ts-deep-modules costs

42tokens idle
1,756tokens in use

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Counts are approximate, made offline with cl100k_base.

Model dependence Mixed

Script-ledMixedModel-led

Scripts do part of the work and the model's judgement does the rest.

This describes the skill's structure, how much of it is scripts. It does not say how well it works. Scripts: dependency-cruiser.config.cjs.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts and code blocks. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter8/15
  • Structure25/25
  • Examples12/15
  • Output10/15
  • Size13/15
  • Resources7/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Excellent
  • Development activity96
  • Maintenance100
  • Community56
  • Maturity32
  • Momentum40

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.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers