Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

typescript-advanced-patterns

БесплатноБез исполняемых скриптовНе проверен

Advanced TypeScript — type-level programming, library/DSL APIs, declaration merging, modern language features at depth (decorators, using, const T, NoInfer…

pproencaот pproenca★ 231 звезда на GitHub

Об этом скилле

TypeScript Advanced Patterns Best Practices

Type-level programming, library-author idioms, and feature-implementation patterns that go beyond surface uses of TypeScript 5.x. Contains 40 rules across 5 categories, prioritised by impact on consumer codebases.

When to Apply

Reference these guidelines when:

  • Designing a public library or DSL surface (fluent builders, event emitters, route parsers, query builders, schema-derived clients)
  • Writing type-level algorithms (recursive conditionals, accumulator pattern, key remapping, variadic tuples, type-level string/number ops, type-level tests)
  • Using TS 5.x features in non-trivial ways (Stage 3 decorators, using composition, const T for overload disambiguation, NoInfer for anchor-vs-constrained parameters, variance annotations, the bivariance hole)
  • Encoding workflow state, transitions, and capabilities at the type level so illegal states and missing checks are compile errors
  • Integrating with the declaration & module system (module augmentation, declaration merging, ambient asset modules, library type publishing via exports/typesVersions)

Boundary with neighbouring skills

Skill Don't reach for this skill if you need…
typescript (curated) Compiler performance / tsconfig tuning
typescript-refactor General refactoring patterns and modern-TS surface basics
ts-google Google-style code style decisions
clean-code-ts-react Clean-code principles (naming, function shape, abstraction)
effect-ts / opencode-ts Effect library-specific patterns

If a rule in this skill overlaps with one in typescript-refactor or .curated/typescript, the rule's Scope delta section names what this skill adds beyond the simpler version.

Rule Categories by Priority

Priority Category Impact Prefix Rules
1 Library Author / DSL Patterns CRITICAL dsl- 8
2 Type-level Programming HIGH tlp- 10
3 Modern Features at Depth HIGH mod- 8
4 Feature Implementation Patterns MEDIUM-HIGH impl- 8
5 Declaration & Module System MEDIUM decl- 6

Quick Reference

1. Library Author / DSL Patterns (CRITICAL)

2. Type-level Programming (HIGH)

3. Modern Features at Depth (HIGH)

  • mod-stage-3-decorators — Use Stage 3 decorators with decorator context for metaprogramming
  • [mod-using-disposal-ordering](references/mod-using-disposal-order
Полный SKILL.md на GitHub

Установить typescript-advanced-patterns в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

AGENTS.mdassets/templates/_template.mdmetadata.jsonreferences/_sections.mdreferences/decl-ambient-asset-modules.mdreferences/decl-authoring-d-ts-for-js.mdreferences/decl-declaration-merging.mdreferences/decl-exports-and-types-versions.mdreferences/decl-global-augmentation-discipline.mdreferences/decl-module-augmentation.mdreferences/dsl-fluent-builder-phantom-state.mdreferences/dsl-narrow-api-surface.mdreferences/dsl-overloads-vs-conditional-returns.mdreferences/dsl-route-param-inference.mdreferences/dsl-schema-first-inference.mdreferences/dsl-type-safe-object-paths.mdreferences/dsl-type-safe-query-builder.mdreferences/dsl-typed-event-emitter.mdreferences/impl-assert-never-exhaustive.mdreferences/impl-env-config-loader.mdreferences/impl-finite-state-machine.mdreferences/impl-phantom-feature-flags.mdreferences/impl-schema-derived-api-client.mdreferences/impl-state-discriminated-union.mdreferences/impl-tagged-result-type.mdreferences/impl-type-safe-form-builder.mdreferences/mod-const-type-params-overloads.mdreferences/mod-method-vs-property-bivariance.mdreferences/mod-noinfer-overload-disambiguation.mdreferences/mod-phantom-capability-tracking.mdreferences/mod-satisfies-branded-config.mdreferences/mod-stage-3-decorators.mdreferences/mod-using-disposal-ordering.mdreferences/mod-variance-debugging.mdreferences/tlp-distributive-conditional-control.mdreferences/tlp-hkt-emulation.mdreferences/tlp-infer-extends-constraints.mdreferences/tlp-key-remapping-as.mdreferences/tlp-recursive-conditional-types.mdreferences/tlp-tail-recursion-accumulator.md

FAQ

Что делает скилл typescript-advanced-patterns?

Advanced TypeScript — type-level programming, library/DSL APIs, declaration merging, modern language features at depth (decorators, using, const T, NoInfer, variance), and feature implementation patterns built on advanced types. Trigger on tasks involving recursive conditional types, infer patterns, mapped-type key remapping, variadic tuples, fluent builders with phantom state, schema-first inference (Zod/Valibot), end-to-end-typed API clients, finite state machines, module augmentation, and library-publishing concerns. Trigger even when the user does not say "advanced" — if the work involves type-level algorithms, library-author API design, or going beyond surface-level uses of TS 5.x features, this is the skill. Assumes the reader has absorbed the `typescript-refactor` skill — this one extends those patterns at depth, never restates them.

Как установить скилл typescript-advanced-patterns?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл typescript-advanced-patterns запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить typescript-advanced-patterns с