Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
prowler-cloud avatar

Typescript

  • 246 installs
  • 14.5k repo stars
  • Updated August 4, 2026
  • prowler-cloud/prowler

typescript is a Prowler repository skill that enforces strict TypeScript patterns—const maps, type guards, and tightened unknown/any removal—for cloud-security checks, providers, and shared libraries.

About

typescript is a version 1.0 Apache-2.0 agent skill from prowler-cloud/prowler that encodes strict TypeScript conventions for the Prowler cloud-security platform. It auto-invokes when writing or refactoring .ts/.tsx files involving types, interfaces, generics, const maps, type guards, and removal of any in favor of unknown. The required const-types pattern creates a const object first, then extracts the union type with typeof—avoiding string-literal drift across providers and shared libraries. Allowed tools include Read, Edit, Write, Glob, Grep, Bash, WebFetch, WebSearch, and Task, scoped to root and UI packages. Developers reach for typescript when implementing Prowler security checks, cloud provider adapters, or shared TypeScript services where strict typing prevents runtime misconfiguration. The skill tightens type safety in a large multi-provider codebase rather than teaching generic TypeScript from scratch, making it ideal for contributors aligning new modules with established Prowler repo conventions.

  • Typed Prowler module development
  • Cloud provider integration patterns
  • Shared library and service conventions
  • Safer refactors via strict typing
  • Aligns with prowler-cloud repo standards

Typescript by the numbers

  • 246 all-time installs (skills.sh)
  • Ranked #1,568 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/prowler-cloud/prowler --skill typescript

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs246
repo stars14.5k
Last updatedAugust 4, 2026
Repositoryprowler-cloud/prowler

How do you enforce strict TypeScript patterns in Prowler?

Implement and maintain TypeScript modules, types, and services in the Prowler codebase following repo conventions for cloud-security checks, providers, and shared libraries.

Who is it for?

Contributors implementing or refactoring TypeScript in the Prowler cloud-security monorepo who must match const-types and strict typing conventions.

Skip if: Greenfield TypeScript tutorials or projects outside the Prowler codebase that do not follow Prowler provider and check module structure.

When should I use this skill?

Agent writes TypeScript types, interfaces, generics, or refactors .ts/.tsx files in the Prowler repository.

What you get

Const-map type definitions, tightened interfaces, type guards, and any-free TypeScript modules aligned with Prowler repo conventions.

  • const-map type definitions
  • strict interfaces
  • type-guard refactors

By the numbers

  • Skill metadata version 1.0 with Apache-2.0 license
  • Scoped to root and ui packages in the Prowler monorepo

Files

SKILL.mdMarkdownGitHub ↗

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.

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
}

interface Admin extends User {
  permissions: string[];
}

// ❌ NEVER: Inline nested objects
interface User {
  address: { street: string; city: string };  // NO!
}

Never Use any

// ✅ Use unknown for truly unknown types
function parse(input: unknown): User {
  if (isUser(input)) return input;
  throw new Error("Invalid input");
}

// ✅ Use generics for flexible types
function first<T>(arr: T[]): T | undefined {
  return arr[0];
}

// ❌ NEVER
function parse(input: any): any { }

Utility Types

Pick<User, "id" | "name">     // Select fields
Omit<User, "id">              // Exclude fields
Partial<User>                 // All optional
Required<User>                // All required
Readonly<User>                // All readonly
Record<string, User>          // Object type
Extract<Union, "a" | "b">     // Extract from union
Exclude<Union, "a">           // Exclude from union
NonNullable<T | null>         // Remove null/undefined
ReturnType<typeof fn>         // Function return type
Parameters<typeof fn>         // Function params tuple

Type Guards

function isUser(value: unknown): value is User {
  return (
    typeof value === "object" &&
    value !== null &&
    "id" in value &&
    "name" in value
  );
}

Coupled Optional Props (REQUIRED)

Do not model semantically coupled props as independent optionals — this allows invalid half-states that compile but break at runtime. Use discriminated unions with never to make invalid combinations impossible.

// ❌ BEFORE: Independent optionals — half-states allowed
interface PaginationProps {
  onPageChange?: (page: number) => void;
  pageSize?: number;
  currentPage?: number;
}

// ✅ AFTER: Discriminated union — shape is all-or-nothing
type ControlledPagination = {
  controlled: true;
  currentPage: number;
  pageSize: number;
  onPageChange: (page: number) => void;
};

type UncontrolledPagination = {
  controlled: false;
  currentPage?: never;
  pageSize?: never;
  onPageChange?: never;
};

type PaginationProps = ControlledPagination | UncontrolledPagination;

Key rule: If two or more props are only meaningful together, they belong to the same discriminated union branch. Mixing them as independent optionals shifts correctness responsibility from the type system to runtime guards.

Import Types

import type { User } from "./types";
import { createUser, type Config } from "./utils";

Related skills

How it compares

Use this skill for Prowler-specific strict conventions; use a general TypeScript linter skill for non-Prowler projects.

FAQ

What TypeScript pattern does Prowler require?

The prowler-cloud/prowler typescript skill requires the const-types pattern: define a const object with as const, then extract the type via typeof. This keeps string-literal unions synchronized across Prowler checks, providers, and shared libraries.

When does the Prowler typescript skill auto-invoke?

The typescript skill auto-invokes when implementing or refactoring .ts/.tsx files—types, interfaces, generics, const maps, type guards, or removing any in favor of unknown—in Prowler root or UI scope.

Backend & APIsbackendintegrationstesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.