Skills Explorer Add Skills

setup-ts-deep-modules

An agent skill by mattpocock, from mattpocock/skills. Tags: architecture, code-quality, dependency-cruiser, setup, typescript.

What it does

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.

Install

With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:

npx skills add mattpocock/skills --skill setup-ts-deep-modules

Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):

git clone --depth 1 https://github.com/mattpocock/skills
cp -r skills/skills/in-progress/setup-ts-deep-modules ~/.claude/skills/setup-ts-deep-modules

Safety box score

Grade C, moderate risk: 28 of 100 risk points, rated 2026-10-16. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.

This skill configures a TypeScript repo to enforce deep-module boundaries with dependency-cruiser, adds a starter example package, and wires the boundary check into the repo’s scripts/CI. The main risks are the package-manager install, broad in-repo file edits, and a validation step that intentionally breaks then reverts a test file.

Category levels, from 0 (none) to 3 (high)
CategoryLevelWhy
Code & shell execution2 (moderate)It explicitly installs a devDependency and runs validation commands such as `Run lint:boundaries`, so it will execute shell/package-manager commands, though not arbitrary code.
Network access2 (moderate)`Install dependency-cruiser as a devDependency` requires downloading from the package registry; no other remote destinations are specified.
Filesystem reach2 (moderate)It creates and edits several repo files and directories (`.dependency-cruiser.cjs`, `lint:boundaries`, `src/packages/example/`, `README.md`, `AGENTS.md`/`CLAUDE.md`), but stays within the project tree.
Secrets & credentials0 (none)No step reads, requests, or manipulates tokens, keys, passwords, `.env` files, or browser/CLI sessions.
Privilege & persistence0 (none)There is no sudo, global install, service registration, or shell/OS settings change.
Instruction hijack surface0 (none)The files do not ask the agent to ignore instructions, hide actions, fetch remote prompts, or adopt a deceptive persona.
Irreversible actions1 (low)It commits a new example package and deliberately mutates/reverts a test file to prove the rule, but it does not post, deploy, pay, or delete outside the repo.
Transparency1 (low)The skill depends on a separately downloaded `dependency-cruiser` package, but the shipped skill files themselves are plain text and readable.

Before installing

Rated 2026-10-16 by an automated review of 3 files from the skill's repository.

Source

Repository
mattpocock/skills (all skills from this repository)
Path
skills/in-progress/setup-ts-deep-modules/SKILL.md
Branch
main
Updated
2026-10-05