Every premium and members-only resource for $9.99/month, as a no-commitment subscription. See the plans

PalateKit

Menu

Request a resource

Describe the resource you are missing in one sentence. We will email you when it is published.

0 / 280

Unlock PalateKit

Unlock everything

Plan

Paying means accepting our terms of sale.

Secure payment by Stripe. Receipts and invoices sent by email.

Welcome back

Sign in to install, download or save this resource. A free account is enough for free resources.

TypeScript and TSX refactoring and modernisation v1.0.0

Use this resource to refactor or modernise TypeScript and TSX for stronger type safety

New

  • 470 downloads
  • 219 likes
  • 210 saves

Free

Install with the CLI

In a terminal, from the folder you want:

npx --yes palatekit@latest install typescript-refactoring-patterns

With no option, the skill goes to ~/.agents/skills/; add --agent claude-code (or codex, cursor…) to target an agent.

First time: connect the CLI with

npx --yes palatekit@latest login

The agent reviews or refactors TypeScript and TSX against 47 rules, current to TypeScript 6.0 and React 19. It removes unsafe casts, prefers discriminated unions and types components and hooks. You get safer and more readable code.

Mostly picked by

Updated November 2, 2026

Card for the “TypeScript and TSX refactoring and modernisation” skill

Details

Generates with
Your agent's model
Licence
MIT

Similar resources

View all

What you get

  • references/: cards on discriminated unions, branded types and readonly
  • references/: cards on casts, narrowing and compile performance

Good fit for

  • Your code is full of 'as' casts silencing the compiler
  • You are typing custom React hooks

Not for

    Tags

    • typescript
    • tsx
    • react
    • types
    • refactoring

    About

    You say

    “Remove the 'as' casts in this module and replace the boolean state with a discriminated union.”

    Card for the “TypeScript and TSX refactoring and modernisation” skill

    Skill published by pproenca under the MIT license, delivered in its original version.

    Show more

    How to use it

    1. Install the skill in your agent's skills folder
    2. Ask your agent to refactor or modernise TypeScript and TSX for stronger type safety
    3. Review and adjust the result

    Content preview

    Files

    • AGENTS.md10.9 KB
    • assets/templates/_template.md0.8 KB
    • LICENSE1.1 KB
    • metadata.json1.5 KB
    • NOTICE-PALATEKIT.md0.5 KB
    • references/_sections.md2.4 KB
    • references/arch-avoid-partial-abuse.md1.4 KB
    • references/arch-branded-types.md1.4 KB
    • references/arch-const-assertion.md1.3 KB
    • references/arch-discriminated-unions.md1.9 KB
    • references/arch-interfaces-over-intersections.md1.7 KB
    • references/arch-readonly-by-default.md1.2 KB
    • references/arch-satisfies-over-annotation.md1.3 KB
    • references/compile-avoid-deep-recursion.md1.5 KB
    • references/compile-base-types-over-unions.md1.6 KB
    • references/compile-explicit-return-types.md2 KB
    • references/compile-isolated-declarations.md1.6 KB
    • references/compile-project-references.md1.7 KB
    • references/error-discriminated-error-unions.md1.3 KB
    • references/error-exhaustive-error-handling.md1.5 KB
    • references/error-result-type.md1.6 KB
    • references/error-typed-catch.md1.3 KB
    • references/generic-avoid-distributive-surprises.md1.2 KB
    • references/generic-constrain-dont-overconstrain.md1.1 KB
    • references/generic-mapped-type-utilities.md1.5 KB
    • references/generic-return-type-inference.md1.5 KB
    • references/modern-const-type-parameters.md1.3 KB
    • references/modern-erasable-syntax.md1.7 KB
    • references/modern-import-attributes.md1.1 KB
    • references/modern-noinfer-utility.md1.2 KB
    • references/modern-template-literal-types.md1.4 KB
    • references/modern-using-keyword.md1.6 KB
    • references/modern-verbatim-module-syntax.md1.4 KB
    • references/narrow-assertion-functions.md1.7 KB
    • references/narrow-custom-type-guards.md1.9 KB
    • references/narrow-eliminate-as-casts.md1.8 KB
    • references/narrow-exhaustive-switch.md1.6 KB
    • references/narrow-in-operator.md1.7 KB
    • references/perf-avoid-delete-operator.md1.1 KB
    • references/perf-map-set-over-object.md1.6 KB
    • references/perf-object-freeze-const.md1.3 KB
    • references/perf-object-keys-narrowing.md1.6 KB
    • references/perf-union-literals-over-enums.md1.8 KB
    • references/quirk-empty-object-type.md1.4 KB
    • references/quirk-excess-property-checks.md1.7 KB
    • references/quirk-structural-typing-escapes.md1.4 KB
    • references/quirk-variance-annotations.md1.8 KB
    • references/tsx-avoid-react-fc.md1.4 KB
    • references/tsx-discriminated-props.md1.7 KB
    • references/tsx-event-handler-types.md1.4 KB
    • references/tsx-extend-native-props.md1.7 KB
    • references/tsx-hook-typing.md1.3 KB
    • references/tsx-ref-as-prop.md1.3 KB
    • SKILL.md9.2 KB

    Origin and licence

    Listed unmodified

    Author
    pproenca
    Source
    github.com/pproenca/dot-skills/tree/cf93c57cac89d6fc3e4194686000411567f5caf3/skills/.experimental/typescript-refactor
    Licence
    MIT

    Notice

    « typescript-refactor » (pproenca, MIT) livré dans sa version d'origine : fiche en français et en anglais par PalateKit.

    User reviews

    –

    No ratings yet

    Loading reviews…

    Delete your review?

    Your rating and comment will be removed from the page.