Typescript
TypeScript strict-mode patterns that replace unions, nested inline types, and any with const-derived types and guards.
- CCM score
- 63 of 100
- skills.sh installs
- 255
- GitHub stars
- 15.3K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers const-object type extraction, flat interfaces, utility types, type guards, and discriminated unions for coupled optional props
- Includes
unknownoveranyguidance, aRecord<Union, ...>pattern for known key sets, andimport typeusage - Enforces
pnpm run typecheck(tsc, TypeScript 5.5 strict) as the validation step for theuipackage - Designed for implementing or refactoring
.ts/.tsxcode where type safety must be tightened
Install
$ npx -y skills add prowler-cloud/prowler --skill typescript -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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
}
Details
- Repository
- github.com/prowler-cloud/prowler
- Categories
- Frontend & UI Code, Code Review & Quality
- First seen
- Jun 3, 2026
Questions
What does the typescript skill for Claude Code do?
The typescript skill gives Claude Code strict TypeScript patterns for .ts and .tsx files, covering types, interfaces, generics, const maps, type guards, removing any, and tightening unknown. It guides Claude to write type-safe code when implementing or refactoring TypeScript.
How do I install the typescript skill?
Run npx -y skills add prowler-cloud/prowler --skill typescript -y in your project to install the typescript skill. Once installed, the typescript skill applies its strict typing rules whenever Claude works on TypeScript files.
Where does the typescript skill stand in the Frontend and UI Code category?
The typescript skill is listed in the Frontend and UI Code category next to vercel-react-best-practices, web-design-guidelines, design-taste-frontend, vercel-composition-patterns, and lark-apps. Its focus is type discipline in TypeScript itself rather than visual design or component layout.
Does the typescript skill need any accounts, keys or extra tools?
The typescript skill's SKILL.md lists allowed tools such as Read, Edit, Write, Glob, Grep, Bash, WebFetch, WebSearch and Task. Its validation step runs pnpm run typecheck in the ui folder with TypeScript 5.5 in strict mode.
More from prowler-cloud/prowler
All 6Similar to Typescript
More Frontend & UI Codemastering-typescriptspillwavesolutions/mastering-typescript-skill832 installsComprehensive TypeScript 5.9+ guide covering generics, mapped types, Zod validation, and React, NestJS, and LangChain.js integration.
code-simplifiergetsentry/skills9.3K installsBehavior-preserving refactoring guide that simplifies recent code for clarity while following project conventions.
react-19prowler-cloud/prowler675 installsReact 19 component and hook patterns for Prowler UI, covering React Compiler rules and modern APIs.
ts-googlepproenca/dot-skills390 installsGoogle-derived TypeScript style guide with 45 prioritized rules for writing, reviewing, and refactoring code.
tamagui-best-practicesalleneubank/claude-code340 installsOpinionated patterns and gotchas for Tamagui v1.x projects, covering Config v4, compiler optimization, and compound components.
spatie-javascriptspatie/guidelines-skills606 installsOpinionated JavaScript and TypeScript style rules covering declarations, comparisons, functions, destructuring, and Prettier setup.