Toolverse
All skills

typescript

by lobehub

TypeScript code style and optimization guidelines. Use when writing TypeScript code (.ts, .tsx, .mts files), reviewing code quality, or implementing type-safe patterns. Triggers on TypeScript development, type safety questions, or code style discussions.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
lobehub
Category
Frontend
Views
49

About this skill

TypeScript code style and optimization guidelines. Use when writing TypeScript code (.ts, .tsx, .mts files), reviewing code quality, or implementing type-safe patterns. Triggers on TypeScript development, type safety questions, or code style discussions.

How to use

  1. Aktywuj skill podczas pracy z kodem TypeScript. Skill automatycznie reaguje na pytania dotyczące TypeScript'u, bezpieczeństwa typów lub stylu kodu w plikach .ts, .tsx i .mts.

  2. Przy definiowaniu typów stosuj wnioskowanie TypeScript'a — unikaj jawnych adnotacji, gdy kompilator potrafi sam określić typ. Zawsze unikaj niejawnego any; jeśli musisz być jawny, wybierz konkretny typ zamiast any.

  3. Preferuj interface dla kształtów obiektów (np. props React'a) i type dla unii oraz przecięć typów. Dla stałych wartości używaj as const satisfies XyzInterface zamiast zwykłego as const.

  4. W kodzie asynchronicznym wybieraj async/await zamiast callbacków lub łańcuchów .then(). Korzystaj z promise'owych wariantów API, np. import { readFile } from 'fs/promises', i Promise.all do operacji równoległych.

  5. Strukturyzuj kod używając destrukturyzacji obiektów, opisowych nazw zmiennych i nazwanych stałych zamiast magicznych liczb. Deleguj formatowanie narzędziom dedykowanym do tego celu.

  6. Optymalizuj wydajność: preferuj pętle for…of zamiast pętli indeksowych, ponownie używaj narzędzi z packages/utils lub zainstalowanych pakietów npm, oraz pobieraj tylko wymagane kolumny z bazy danych.

Related skills

better-icons

by better-auth

Use when working with icons in any project. Provides CLI for searching 200+ icon libraries (Iconify) and retrieving SVGs. Commands: `better-icons search u003cqueryu003e` to find icons, `better-icons get u003cidu003e` to get SVG. Also available as MCP server for AI agents.

Frontend
2037

svg-precision

by dkyazzentwatwa

Deterministic SVG generation, validation, and rendering. Use for icons, diagrams, charts, UI mockups, or technical drawings requiring structural correctness and cross-viewer compatibility.

Frontend
233466

livewire-development

by spatie

Develops reactive Livewire 4 components. Activates when creating, updating, or modifying Livewire components; working with wire:model, wire:click, wire:loading, or any wire: directives; adding real-time updates, loading states, or reactivity; debugging component behavior;

Frontend
2335

frontend-slides

by sickn33

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual

Frontend
65135

brainstorming

by obra

Use when creating or developing, before writing code or implementation plans - refines rough ideas into fully-formed designs through collaborative questioning, alternative exploration, and incremental validation. Don't use during clear 'mechanical' processes

Frontend
49170

google-official-seo-guide

by littleben

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

Frontend
101196