Install any skill in seconds. Free to start, no credit card required.
Get Started Free →fradser/setup-ts-deep-modules
Wires dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through entry-point files.
Passed 11 of 16 test cases with the skill, and 9 of 16 without it.
and 6 more in the full report
7 fixed8 passed either way3 still failing4 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
How many core forbidden rules are defined in the deep module configuration and what severity level do they use?
| Checked | Without skill | With skill |
|---|---|---|
| Specifies four forbidden rules. | Missed | Passed |
| Sets all forbidden rules to error severity. | Missed | Passed |
The instructions your model reads when the skill loads.
Make every package in this repo a deep module: a lot of behaviour behind a small interface. A package's public surface is its entry points (the files at the package root), and everything in its subfolders is hidden. This skill installs dependency-cruiser and the rules that make the entry points the only way in, then proves the rules bite.
For the vocabulary (deep module, interface, seam, depth), call the Skill tool with "mattpocock:codebase-design" and use its language throughout.
src/packages/
<name>/
index.ts ← an entry point (public). Import this from outside.
client.ts ← another entry point. Packages may expose SEVERAL.
lib/ ← implementation: hidden from outside, free to import each other.
tests/ ← co-located tests + fixtures (a subfolder, so private).
The public surface is the package's root files, not one designated index.ts. By convention implementation lives in lib/ and tests in tests/, giving every package the same two-folder shape. The rule itself is general, though: anything in any subfolder is private, so you never extend the config to add a folder.
Four rules, all error:
<pkg>/tests/ may import any package's entry points and their own tests/ fixtures, but never any package's subfolder internals (not even their own). Integration tests across packages are fine; deep imports are not.Entry points, not a barrel. Because the public surface is every root file, a package can expose several small entry points (index.ts, client.ts, server.ts) instead of funnelling everything through one giant index.ts. Barrel files that re-export a whole subtree are discouraged; keep entry points small and hide implementation in subfolders.
Layering (which packages may depend on which) is a different concern and is left as a commented stub in the config for this repo to fill in.
pnpm-lock.yaml → pnpm, yarn.lock → yarn, bun.lockb → bun, else npm. Use it for every command below (pnpm/yarn/npm run/bunx).src/ exists use src/packages, else packages. Confirm the choice with the user if the repo already has a different obvious convention..dependency-cruiser.* file. If one exists, do not overwrite it: merge the four rules and the options in, and tell the user what you added.Done when: package manager, packages root, and existing-config status are all known.
test cases passed, vs 9 / 16 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.