typescript-patterns

Organize TypeScript projects into bounded domains with barrel exports and system.ts files.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/lekman/cdn --skill typescript-patterns-lekman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-patterns
Source: https://github.com/lekman/cdn/tree/main/.claude/skills/typescript-patterns
Command: npx skills add https://github.com/lekman/cdn --skill typescript-patterns-lekman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Organize large TypeScript projects into bounded domains and clear public API surfaces, improving maintainability and reducing cross-team conflict.

Core Features & Use Cases

  • Domain-driven folder structure that reflects business capabilities and domains
  • Barrel exports and class-based namespaces to publish stable public APIs
  • Naming APIs by business capability to improve readability and collaboration
  • System separation with system.ts files to isolate external I/O
  • Atomic tests and parallelizable test suites to support reliable validation

Quick Start

Organize an existing TS project by introducing a domains folder and an index.ts barrel for each domain.

Frequently Asked Questions about typescript-patterns

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

FAQPage Schema
How do I organize a large TypeScript project by bounded domains?

Create a domains folder structure that reflects business capabilities and use index.ts barrel exports for each domain to establish clear public API surfaces, improving maintainability and reducing cross-team conflict.

What is the best way to structure stable public APIs in TypeScript?

Use barrel exports and class-based namespaces to publish stable public APIs, naming APIs by business capability to improve readability and collaboration across teams.

How do I separate external I/O in a TypeScript architecture?

Use system.ts files to isolate external I/O and separate system-level dependencies, ensuring domain logic remains decoupled from external interactions for scalable collaboration.

Does domain-driven design work for TypeScript project structure?

Domain-driven design applies to TypeScript by organizing code into bounded domains reflecting business capabilities, providing modular structure, explicit public interfaces, and disciplined testability.

Why use barrel exports for TypeScript domain separation?

Barrel exports establish a stable public API surface for each bounded domain in TypeScript, controlling exposed modules and preventing direct access to internal implementation details.

How to set up atomic tests for TypeScript domain modules?

Set up atomic and parallelizable test suites to validate each bounded domain independently, supporting reliable validation aligned with the domain-driven folder structure.