typescript-engineering

Reviews, refactors, and writes TypeScript code using type-system design and Clean Architecture principles.

Updated Apr 22, 2026
One-click install
npx skills add https://github.com/hoonsubin/scrum-master-mcp-server --skill typescript-engineering-hoonsubin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: typescript-engineering
Source: https://github.com/hoonsubin/scrum-master-mcp-server/tree/main/.roo/skills/typescript-engineering
Command: npx skills add https://github.com/hoonsubin/scrum-master-mcp-server --skill typescript-engineering-hoonsubin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? TypeScript codebases often accumulate loose typing (any, non-null assertions, lying casts), inconsistent paradigms, and architecture leaks where domain logic depends on infrastructure. This Skill provides a systematic framework for writing, reviewing, and refactoring TypeScript so code stays type-safe, maintainable, and scalable. ## Core Features & Use Cases - Code Auditing: Scan existing TypeScript against a catalog of 30+ named anti-patterns (T# type smells, P# design smells, A# architecture smells), each with a fix and before/after example. - Type-System Design Guidance: Apply discriminated unions, branded types, generics, narrowing, satisfies, and mapped/conditional types to make illegal states unrepresentable. - Architecture & Paradigm Decisions: Get concrete rules for module boundaries, ports and dependency injection, composition roots, layer mappers, and choosing between OOP and functional styles per unit of code. - Use Case: Ask for a review of a service module and receive grouped findings (Types / Design / Architecture) with smell codes, severity ordering by blast radius, and incremental refactoring steps. ## Quick Start Ask the assistant to review your TypeScript file or module for type safety, design smells, and architecture issues, and to suggest fixes with before-and-after examples.

Frequently Asked Questions about typescript-engineering

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

FAQPage Schema
How do I review TypeScript code for type safety issues?▼

Scan for `any`, non-null assertions (`!`), lying `as` casts including `as unknown as T`, and signatures that hide `undefined` returns. The Skill's anti-pattern catalog assigns each smell a code (T1-T12) with a concrete fix, such as replacing `any` with `unknown` plus a type predicate.

When should I use interface vs type in TypeScript?▼

Use `interface` for object contracts meant to be implemented or extended, especially dependency-injection ports. Use `type` for unions, intersections, tuples, mapped or conditional types, and primitive aliases. A discriminated union is always a `type`.

Should I use a class or a function in TypeScript?▼

Use a class when you need encapsulated mutable state or an instance satisfying a DI port; otherwise use a plain function. A class with one method and no state is a function in disguise, which the Skill flags as anti-pattern P11.

Does this approach work for small TypeScript scripts?▼

Yes, the rules scale down. A short script does not need ports, DI, or layered folders, but type honesty, inward-pointing dependencies, and unrepresentable illegal states apply at every size. Rigor is scaled to the code's change pressure.

Why does my TypeScript code have floating Promise bugs?▼

Floating Promises happen when an async function is called without `await` or explicit handling, silently swallowing rejections. The fix is to await every call, use `Promise.all` for independent operations, and enable ESLint's `no-floating-promises` rule.

How do I stop domain code from depending on infrastructure?▼

Define repository and service interfaces in the domain module that consumes them, then have infrastructure modules implement those ports. Construct concrete implementations only in a single composition root like `main.ts`, keeping the dependency arrow pointing inward.