Enforces strict TypeScript patterns with a focus on const object mappings over raw union types, flat interfaces, and discriminated unions for coupled optional props. Auto-triggers when you're writing types or interfaces. The const-first pattern is opinionated but solid: you define a const object then extract the type, giving you runtime values and a single source of truth. The coupled optionals section is the most interesting bit, using discriminated unions with never to prevent half-states like having onPageChange without currentPage. Includes type guards, utility type quick reference, and a hard ban on any. Good for teams that want consistency without having to debate these choices in every PR.

skills.sh installs
254
GitHub stars
15.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add prowler-cloud/prowler --skill typescript --agent claude-code

Installs into .claude/skills of the current project.

Files

Const Types Pattern (REQUIRED)

// ✅ ALWAYS: Create const object first, then extract type
const STATUS = {
  ACTIVE: "active",
  INACTIVE: "inactive",
  PENDING: "pending",
} as const;

type Status = (typeof STATUS)[keyof typeof STATUS];

// ❌ NEVER: Direct union types
type Status = "active" | "inactive" | "pending";

Why? Single source of truth, runtime values, autocomplete, easier refactoring.

When you need the ordered list too (iteration, z.enum), a const array works the same way:

// ui/types/severities.ts
export const SEVERITY_LEVELS = ["critical", "high", "medium", "low", "informational"] as const;
export type SeverityLevel = (typeof SEVERITY_LEVELS)[number];

// Known key set -> Record<Union, ...> (typos fail to compile)
export const SEVERITY_DISPLAY_NAMES: Record<SeverityLevel, string> = { /* ... */ };

Flat Interfaces (REQUIRED)

// ✅ ALWAYS: One level depth, nested objects → dedicated interface
interface UserAddress {
  street: string;
  city: string;
}

interface User {
  id: string;
  name: string;
  address: UserAddress;  // Reference, not inline
}

Sponsors

Details

Repository
github.com/prowler-cloud/prowler
Categories
Frontend Development, Code Review & Quality, Cloud & Infrastructure
First seen
Jun 3, 2026

More from prowler-cloud/prowler

All 6
1thehotwireclub avatarhwc-stimulus-fundamentalsthehotwireclub/hotwire_club-skillsCover Stimulus controller fundamentals: lifecycle hooks, values and valueChanged callbacks, targets and target callbacks, outlets, action parameters, keyboard e254skills.sh installs
2julianobarbosa avatarmarkitdown-skilljulianobarbosa/claude-code-skillsGuide for using Microsoft MarkItDown - a Python utility for converting files to Markdown. Use when converting PDF, Word, PowerPoint, Excel, images, audio, HTML,252skills.sh installs
3davila7 avatarcore-componentsdavila7/claude-code-templatesCore component library and design system patterns. Use when building UI, using design tokens, or working with the component library.249skills.sh installs
4dchuk avatarintegrating-tauri-rust-frontendsdchuk/claude-code-tauri-skillsGuides the user through integrating Rust-based WASM frontend frameworks with Tauri v2, covering Leptos and Trunk setup, WASM compilation configuration, Cargo.to248skills.sh installs
5thedivergentai avatargodot-platform-mobilethedivergentai/gd-agentic-skillsExpert blueprint for mobile platforms (Android/iOS) covering touch controls, virtual joysticks, responsive UI, safe areas (notches), battery optimization, and a248skills.sh installs
6nocobase avatarnocobase-dsl-reconcilernocobase/skills**Opt-in DSL path** for NocoBase app building. Use ONLY when the user explicitly asks for YAML / DSL / committed-to-git / `cli push` / spec files — e.g. "use th244skills.sh installs