Sign in
Explore
Skills · SkillEveryday codingReviewed

setup-ts-deep-modules

Wire dependency-cruiser into a TypeScript repo so each package is a deep module, with implementation hidden in subfolders and reachable only through its entry-point files. User-invoked.

Kind
Skill
Works with
Claude Code
Languages
TypeScript / JavaScript
Source
mattpocock/skills @ 24fe0ef7737e
Path
skills/in-progress/setup-ts-deep-modules/SKILL.md
Jobs
Implementation, Guardrails

Credit

Made by
mattpocock
Original
github.com/mattpocock/skills/blob/24fe0ef7737efae15c87225755e…
License
MIT

Listed by Skill Manifest; not made by us.

InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
Adds
  • .claude/skills/setup-ts-deep-modules/ (the skill folder)
  • 2 file(s) the skill refers to
  • 2 other files in the folder: agents/openai.yaml, dependency-cruiser.config.cjs
Runs scripts
Yes
  • dependency-cruiser.config.cjs
  • script file in the folder (dependency-cruiser.config.cjs)
Uses the network
None found
Needs secrets
None found
Value without its scripts
Medium
  • The main file runs dependency-cruiser.config.cjs for one step; the rest works without it.
  • dependency-cruiser.config.cjs: Where packages live. One immediate child dir per package (flat, no nesting).
Source revision
24fe0ef7737e
Licence
MIT
Last activity
25 Nov 2026
Source changed after the scan
Yes
  • Last push 25 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
Review
Reviewed

Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.

# Setup TS Deep Modules

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](https://github.com/sverweij/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 "codebase-design" and use its language throughout.

## The shape this enforces

```
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).
```
…