
Setup TS Deep Modules
Installs dependency-cruiser rules so TypeScript packages only expose their root entry-point files.
- Repository
- mattpocock/skills
- Stars
- 309,658
- Licence
- MIT
- Files
- 2 files
What it does
When installed, this skill tells an AI agent how to set up architectural boundaries in a TypeScript repository. It adds the dependency-cruiser tool, writes a config that blocks other code from importing a package's internal subfolders, adds a lint:boundaries check alongside typecheck, creates a starter example package, and documents the convention for future agents. The agent then verifies the rules actually fail on a deliberate violation.
Great for
- TypeScript teams that want packages to behave like deep modules with small public interfaces
- Developers who keep hitting accidental deep imports between packages in a monorepo-style src/packages folder
- Maintainers who want agents to discover import boundaries from a README and CLAUDE.md or AGENTS.md pointer
Skip it if
- Projects that are not TypeScript or do not use a packages folder layout, since the rules are path-based and the skill assumes this structure
- Repos that already use a different boundary tool or a heavily customised dependency-cruiser config, because the skill may overwrite or conflict with it (it asks to merge, but this is still intrusive)
Try asking
- “Set up dependency-cruiser so each package in src/packages only exposes its root entry points”
- “Add a lint:boundaries script and fold it into our existing check command”
- “Scaffold an example package showing an entry point with a hidden lib folder”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 2 original files, the MIT licence and an attribution note.
setup-ts-deep-modules.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip setup-ts-deep-modules.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip setup-ts-deep-modules.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Review the generated .dependency-cruiser.cjs and the changes to package.json before committing, since the agent edits config and scripts.
- Check the README and CLAUDE.md or AGENTS.md changes, which the skill also writes.
- Delete the example package once you have copied its pattern, since it is only a template.
What's inside
- agents/openai.yaml
- SKILL.md
Redistributed unmodified from mattpocock/skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.