agentleFS
MindrallyMindrally/skills/typescript/SKILL.md

typescript

Skill275 starsChanged 52 days agoApache-2.0View on GitHub

Expert in TypeScript development with best practices for type safety and clean code

76 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use tailwind-4, zod-4 and 7 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • prowler-cloudSkill

    tailwind-4

    Tailwind CSS 4 patterns and best practices. Trigger: When styling with Tailwind (className, variants, cn()), especially when dynamic styling or CSS variables are involved (no var() in className).

    Also in 4 projects that use this

  • prowler-cloudSkill

    zod-4

    Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.

    Also in 4 projects that use this

  • nek1987Skill

    react-19

    Guide for React 19 development with Actions, Server Components, and new hooks. Use for building React 19 apps, form handling, optimistic updates, and migrations.

    Also in 3 projects that use this

  • thongdn-itSkill

    msw

    MSW (Mock Service Worker) best practices for API mocking in tests (formerly test-msw). This skill should be used when setting up MSW, writing request handlers, or mocking HTTP APIs. This skill does NOT cover general testing patterns (use test-vitest or test-tdd skills) or test methodology.

    Also in 3 projects that use this

  • joeldevzSkill

    chained-pr

    Split large changes (>400 lines OR >5 slices) into a series of reviewable PRs. Two strategies — stacked-to-main and feature-branch-chain. Prevents the 100-conflict merge disaster.

    Also in 3 projects that use this

  • SupabaseSkill

    react-hook-form

    Correct React Hook Form usage anywhere in the monorepo — data flow, subscriptions,

    Also in 3 projects that use this

  • +1 more from prowler-cloud

The file

Show its rules and text

We split this skill into the rules it gives an agent

27 rules. 0 are common, 23 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 56 edited versions we read keep these.

  • 23

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write concise, technical TypeScript with accurate examples

    line 16
  2. Distinctive:

    Use functional and declarative programming patterns.

    line 17
  3. Distinctive:

    Prefer iteration and modularization over code duplication

    line 18
  4. Very specific:

    Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)

    line 19
  5. Distinctive:

    Use PascalCase for classes, types, and interfaces

    line 23
  6. Distinctive:

    Use camelCase for variables, functions, and methods

    line 24
  7. Distinctive:

    Use kebab-case for file and directory names

    line 25
  8. Distinctive:

    Use UPPERCASE for environment variables and constants

    line 26
  9. Distinctive:

    Use TypeScript for all code.

    line 31
  10. Very specific:

    Avoid any type; create precise type definitions

    line 32
  11. Distinctive:

    Use functional components with TypeScript interfaces

    line 33
  12. Distinctive:

    Avoid enums; use maps instead

    line 34
  13. Very specific:

    Use readonly for immutable properties

    line 35
  14. Very specific:

    Use as const for literal values

    line 36
  15. Distinctive:

    Write short functions with single purpose (less than 20 lines)

    line 40
  16. Distinctive:

    Use arrow functions for simple operations (less than 3 lines)

    line 41
  17. Distinctive:

    Use named functions for complex logic

    line 42
  18. Distinctive:

    Use default parameters instead of null/undefined checks

    line 44
  19. Distinctive:

    Prefer immutability where possible

    line 50
  20. Distinctive:

    Prefer composition over inheritance

    line 52
  21. Distinctive:

    Keep classes under 200 lines with fewer than 10 public methods

    line 53
  22. Distinctive:

    Use exceptions for unexpected errors

    line 57
  23. Distinctive:

    Create custom error types for consistency

    line 59
  24. Distinctive:

    Use guard clauses for preconditions

    line 60
  25. Distinctive:

    Use JSDoc for public classes and methods

    line 65
  26. Distinctive:

    Document all exports clearly

    line 66
  27. Distinctive:

    Keep documentation concise and accurate

    line 68

“Common” is measured: kept by at least 6 in 10 of the 56 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

TypeScript

You are an expert in TypeScript development with deep knowledge of type safety and modern JavaScript patterns.

Core Principles

Code Style & Structure

  • Write concise, technical TypeScript with accurate examples
  • Use functional and declarative programming patterns; avoid classes
  • Prefer iteration and modularization over code duplication
  • Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
  • Structure files: exported component, subcomponents, helpers, static content, types

Naming Conventions

  • Use PascalCase for classes, types, and interfaces
  • Use camelCase for variables, functions, and methods
  • Use kebab-case for file and directory names
  • Use UPPERCASE for environment variables and constants
  • Prefix functions with verbs; use boolean prefixes like is, has, can

TypeScript Usage

  • Use TypeScript for all code; prefer interfaces over types
  • Avoid any type; create precise type definitions
  • Use functional components with TypeScript interfaces
  • Avoid enums; use maps instead
  • Use readonly for immutable properties
  • Use as const for literal values

Functions & Methods

  • Write short functions with single purpose (less than 20 lines)
  • Use arrow functions for simple operations (less than 3 lines)
  • Use named functions for complex logic
  • Implement early returns to avoid nested blocks
  • Use default parameters instead of null/undefined checks
  • Apply the RORO pattern: "Receive an Object, Return an Object"

Data & Classes

  • Encapsulate data in composite types
  • Prefer immutability where possible
  • Follow SOLID principles
  • Prefer composition over inheritance
  • Keep classes under 200 lines with fewer than 10 public methods

Error Handling

  • Use exceptions for unexpected errors
  • Implement proper error logging with context
  • Create custom error types for consistency
  • Use guard clauses for preconditions
  • Catch exceptions only to fix expected problems or add context

Documentation

  • Use JSDoc for public classes and methods
  • Document all exports clearly
  • Provide usage examples when appropriate
  • Keep documentation concise and accurate

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.