setup-deep-modules

Configure dependency-cruiser to enforce deep-module import boundaries in Next.js TypeScript apps.

1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/dineshrevunuru/SuperSkills --skill setup-deep-modules-dineshrevunuru
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-deep-modules
Source: https://github.com/dineshrevunuru/SuperSkills/tree/main/setup-deep-modules
Command: npx skills add https://github.com/dineshrevunuru/SuperSkills --skill setup-deep-modules-dineshrevunuru

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dependency-cruiser.

What problem does it solve? Designed module boundaries in a growing React/Next/TypeScript codebase erode when code imports past a feature's public entry point into its private internals, and no one catches it in review. This Skill wires dependency-cruiser so that shallow cross-layer imports become hard lint errors instead of silent architecture rot. ## Core Features & Use Cases - Boundary rule enforcement: Installs a dependency-cruiser config where each feature folder's root files are public entry points and subfolders are private, blocking outside and cross-module imports of internals. - Two modes: A scrappy single-rule setup for one eroding seam, or a full rigor setup with layering rules, an example module, and documentation. - Solo-first wiring: Folds the lint:boundaries check into the existing local check script or pre-commit hook, adding CI only when a pipeline already exists. - Use Case: A page component imports @/features/bookings/lib/queries directly; after setup, lint:boundaries fails with an entrypoint-boundary-from-outside error until the import goes through the feature's public entry point. ## Quick Start Set up dependency-cruiser boundary enforcement for my Next.js app's src/features modules and prove the rules fail on a shallow cross-layer import.

Frequently Asked Questions about setup-deep-modules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce module boundaries in a Next.js TypeScript app?

Install dependency-cruiser as a devDependency and add a config that forbids imports into feature subfolders from outside the module. Wire a lint:boundaries script into your existing check or pre-commit hook so violations fail as errors.

How do I stop imports reaching into a feature's internal files?

Treat each feature folder's root files as public entry points and its subfolders as private, then add a dependency-cruiser forbidden rule matching imports into module internals. Callers must import through the entry point instead of files like lib/queries.

Does dependency-cruiser work with an existing config file?

Yes, an existing .dependency-cruiser config should be detected first and the new boundary rules merged into it rather than overwritten. The setup reports which rules were added.

When should I not add architecture boundary linting?

Skip it on prototypes, throwaway code, and small single-feature apps where discipline still holds. Boundary enforcement is a low-priority guard justified only when a codebase is multi-feature and seams are actively eroding.

Why does my dependency-cruiser config not fail on violations?

An untested config may have wrong path patterns or an incorrect modules root. Verify by running the check clean, adding a deliberate shallow cross-layer import to confirm it fails, then reverting to confirm it passes again.