Agent skill

Setup TS Deep Modules

by smontlouis in smontlouis/bible-strong

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

GPL-3.0Auto-check passed

Install Setup TS Deep Modules

skills CLI
$ npx skills add smontlouis/bible-strong --skill setup-ts-deep-modules -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install smontlouis/bible-strong setup-ts-deep-modules --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/smontlouis/bible-strong.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/setup-ts-deep-modules .claude/skills/setup-ts-deep-modules && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
setup-ts-deep-modules
GitHub stars
171
Used in
4 other repos
Token cost
~1.9k tokens
SKILL.md length
996 words
Files
2
Skills in repo
12
Repo updated
First seen
Licence
GPL-3.0

At a glance

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

  • Works in 7 steps: Detect the environment → Install dependency-cruiser → Write the config → …
  • SKILL.md covers The shape this enforces, Steps and Notes
  • Runs JavaScript scripts from its folder; calls npm

What it does

Setup TS Deep Modules is an agent skill from smontlouis/bible-strong. Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It works with TypeScript. The licence is GPL-3.0.

Example prompts

  • “/setup-ts-deep-modules”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Detect the environment
  2. Install dependency-cruiser
  3. Write the config
  4. Wire it into the checks
  5. Scaffold the example package
  6. Prove the rules bite
  7. Document the convention

What it can do on your machine

Read from SKILL.md and the folder at commit 5fb49f7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Setup TS Deep Modules loads about 1.9k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 996 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from smontlouis/bible-strong at commit 5fb49f7, republished under its GPL-3.0 licence (© smontlouis). 996 words, ~1,883 tokens.

Download SKILL.mdSave it as .claude/skills/setup-ts-deep-modules/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
setup-ts-deep-modules
description
Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.
disable-model-invocation
true

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 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), run the /codebase-design skill — 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).

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:

  1. Entry-point boundary — code outside a package (app code or another package) may import only that package's entry points (its root files), never anything in its subfolders.
  2. Intra-package freedom — a package's own files import each other freely.
  3. Tests through the entry points — files under <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.
  4. No cycles — no dependency cycles.

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.

Steps

1. Detect the environment
  • Package manager — pnpm-lock.yaml → pnpm, yarn.lock → yarn, bun.lockb → bun, else npm. Use it for every command below (pnpm/yarn/npm run/bunx).
  • Packages root — if src/ exists use src/packages, else packages. Confirm the choice with the user if the repo already has a different obvious convention.
  • Existing config — check for a .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.

2. Install dependency-cruiser

Install dependency-cruiser as a devDependency with the detected package manager.

Done when: dependency-cruiser is in devDependencies.

3. Write the config

Copy dependency-cruiser.config.cjs to the repo root as .dependency-cruiser.cjs. Set PACKAGES_ROOT to the root detected in step 1. The rules are path-depth based and extension-agnostic, so nothing else needs adapting.

Done when: .dependency-cruiser.cjs exists with the correct PACKAGES_ROOT, and the four forbidden rules are present.

4. Wire it into the checks
  • Add a lint:boundaries script: depcruise <packages-root> (or depcruise src).
  • Fold it into the repo's umbrella check command — the one that already runs typecheck (e.g. a check / ci / validate script). Do not touch tsconfig or add path aliases.
  • If there is no umbrella script, add lint:boundaries and tell the user to include it in CI.

Done when: lint:boundaries exists and runs as part of the same command as typecheck.

5. Scaffold the example package

Create a committed <packages-root>/example/ as a copy-me template:

  • index.ts — an entry point. Export one function that delegates to an internal file (so the package is visibly deep, not a pass-through).
  • lib/impl.ts — an internal file in a subfolder, imported by index.ts, not reachable from outside.
  • tests/example.test.ts — imports only ../index (an entry point), and asserts against the public function.

Tell the user this is a starter template to copy or delete.

Done when: the example package exists, exposes its behaviour through a root entry point, and hides impl in a subfolder.

Show full SKILL.md (374 more words)Show less
6. Prove the rules bite

This is the completion criterion for the whole skill — a config that doesn't fail on a violation is worthless.

  1. Run lint:boundaries. It must pass on the clean example.
  2. Temporarily add a deep import to tests/example.test.ts (e.g. import { thing } from "../lib/impl"). Run lint:boundaries again — it must fail with tests-through-entrypoints.
  3. Revert the deep import. Run once more — it must pass.

Done when: you have observed a pass, then a fail on the deep import, then a pass again. If step 2 does not fail, the rules are not wired correctly — fix before finishing.

7. Document the convention

Write a README.md in the packages folder (<packages-root>/README.md) — next to the packages it governs — covering: the src/packages/<name>/ layout (entry points at the root, lib/ for implementation, tests/ for tests), "import only through a package's entry points (its root files)", and how to run lint:boundaries. Discourage barrel files explicitly — expose several small entry points instead of re-exporting a whole subtree through one index. Keep it to the copy-me snippet plus the four rules in one paragraph each.

Then add a context pointer to it from the repo's agent-instructions file — CLAUDE.md if present, else AGENTS.md (create AGENTS.md if neither exists). One line is enough, e.g. Packages are deep modules — see [src/packages/README.md](./src/packages/README.md) before adding or importing one. This is what makes an agent discover the boundary rule instead of tripping over it.

Done when: <packages-root>/README.md exists and discourages barrels, and the repo's CLAUDE.md/AGENTS.md links to it.

Notes

  • The config's $1 back-references (dependency-cruiser's group matching) are what let a package reach its own internals while outsiders can't — don't flatten them into separate per-package rules.
  • Public vs private is decided by depth: a package's root files are entry points; anything in a subfolder is private. The conventional subfolders are lib/ (implementation) and tests/, but the rule doesn't hardcode them — any subfolder is private, so a new folder never needs a config change. Adding an entry point is just adding a root file — no barrel.
  • Packages are flat: one tier of immediate children under the root. A package's internals may nest as deep as you like; a package may not contain another package.
  • Use .cjs (not .js) so the config's module.exports works even in "type": "module" repos.

© smontlouis, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/setup-ts-deep-modules of smontlouis/bible-strong.

  • SKILL.md
  • dependency-cruiser.config.cjs

Open the folder on GitHubat commit 5fb49f7

Used in 4 other repositories

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in smontlouis/bible-strong, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Setup TS Deep Modules next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Setup TS Deep Modules compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Setup TS Deep Modules this skillsmontlouis/bible-strong1714 repos~1.9kAutomated safety check: PassGPL-3.0
MCP Server Builderanthropics/skills180k64 repos~2.3kAutomated safety check: PassApache-2.0
Web Artifacts Builderanthropics/skills180k41 repos~769Automated safety check: PassApache-2.0
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 64 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 41 repos~769 tokens
    Frontend & DesignAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Nx Import

    nrwl/nx

    Import, merge, or combine repositories into an Nx workspace using nx import.

    29k GitHub starsUsed in 6 repos~3.5k tokens
    DevelopmentAuto-check passed

More from smontlouis/bible-strong

All 12 skills in this repo
  • Neon Postgres

    smontlouis/bible-strong

    Guides and best practices for working with Lakebase Postgres, the database behind Neon.

    171 GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check: notes
  • Bible Strong Illustrations

    smontlouis/bible-strong

    Create or adapt Bible Strong illustrations in the house style of flat colors, monochromatic characters, and fine detail lines.

    171 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Bible To Strong

    smontlouis/bible-strong

    Deterministic Strong-Bible command workflow for this repository.

    171 GitHub stars~17k tokensUpdated yesterday
    Auto-check: notes
  • Review And Merge PRs

    smontlouis/bible-strong

    Sequentially review and merge GitHub pull requests one at a time.

    171 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Neon

    smontlouis/bible-strong

    Overview of Neon, a complete set of cloud backend primitives for apps and agents, spanning Lakebase Postgres, Auth, the Data API, Object Storage, Compute Functions, and the AI Gateway.

    171 GitHub stars~7.1k tokensUpdated yesterday
    Auto-check: notes
  • Orchestrate Ready Issues

    smontlouis/bible-strong

    Sequentially orchestrate GitHub issues labeled ready-for-agent through the Bible Strong harness.

    171 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check: warnings

Works with

Questions about Setup TS Deep Modules

What does Setup TS Deep Modules do?

Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. Setup TS Deep Modules is an agent skill from smontlouis/bible-strong. Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files.

How do I install Setup TS Deep Modules in Claude Code?

Run `npx skills add smontlouis/bible-strong --skill setup-ts-deep-modules -a claude-code`. Or copy the skill folder (.agents/skills/setup-ts-deep-modules in smontlouis/bible-strong) into .claude/skills/setup-ts-deep-modules in your project. Claude Code loads it when a task matches its description.

How do I install Setup TS Deep Modules in Codex?

Run `npx skills add smontlouis/bible-strong --skill setup-ts-deep-modules -a codex`. Or copy the skill folder (.agents/skills/setup-ts-deep-modules in smontlouis/bible-strong) into .agents/skills/setup-ts-deep-modules in your project. Codex loads it when a task matches its description.

Can I use Setup TS Deep Modules in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add smontlouis/bible-strong --skill setup-ts-deep-modules -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/setup-ts-deep-modules, .gemini/skills/setup-ts-deep-modules, .github/skills/setup-ts-deep-modules and .opencode/skills/setup-ts-deep-modules in your project.

What does Setup TS Deep Modules need to run?

Going by SKILL.md and its folder, Setup TS Deep Modules needs JavaScript for the scripts in its folder and the command-line tools its instructions call (npm).

Does Setup TS Deep Modules access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Setup TS Deep Modules safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Setup TS Deep Modules use?

Setup TS Deep Modules is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Setup TS Deep Modules use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Setup TS Deep Modules?

Skills that share tags, products or a category with Setup TS Deep Modules: MCP Server Builder (anthropics/skills, 180k stars), Web Artifacts Builder (anthropics/skills, 180k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Setup TS Deep Modules?

smontlouis (a GitHub user) maintains it in smontlouis/bible-strong, which has 171 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 7, 2026.

Source: smontlouis/bible-strong on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.