agentleFS
MindrallyMindrally/skills/typescript/SKILL.md

typescript

Skill266 starsChanged 10 months agoApache-2.0View on GitHub

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

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security and debugging.

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.
  • 0xSeroSkill

    security

    Also in 4 projects that use this

  • BlockSkill

    debugging

    Debugging guidelines and best practices

    Also in 3 projects that use this

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 27 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 13
  2. Distinctive:

    Use functional and declarative programming patterns.

    line 14
  3. Distinctive:

    Prefer iteration and modularization over code duplication

    line 15
  4. Very specific:

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

    line 16
  5. Distinctive:

    Use PascalCase for classes, types, and interfaces

    line 20
  6. Distinctive:

    Use camelCase for variables, functions, and methods

    line 21
  7. Distinctive:

    Use kebab-case for file and directory names

    line 22
  8. Distinctive:

    Use UPPERCASE for environment variables and constants

    line 23
  9. Distinctive:

    Use TypeScript for all code.

    line 28
  10. Very specific:

    Avoid any type; create precise type definitions

    line 29
  11. Distinctive:

    Use functional components with TypeScript interfaces

    line 30
  12. Distinctive:

    Avoid enums; use maps instead

    line 31
  13. Very specific:

    Use readonly for immutable properties

    line 32
  14. Very specific:

    Use as const for literal values

    line 33
  15. Distinctive:

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

    line 37
  16. Distinctive:

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

    line 38
  17. Distinctive:

    Use named functions for complex logic

    line 39
  18. Distinctive:

    Use default parameters instead of null/undefined checks

    line 41
  19. Distinctive:

    Prefer immutability where possible

    line 47
  20. Distinctive:

    Prefer composition over inheritance

    line 49
  21. Distinctive:

    Keep classes under 200 lines with fewer than 10 public methods

    line 50
  22. Distinctive:

    Use exceptions for unexpected errors

    line 54
  23. Distinctive:

    Create custom error types for consistency

    line 56
  24. Distinctive:

    Use guard clauses for preconditions

    line 57
  25. Distinctive:

    Use JSDoc for public classes and methods

    line 62
  26. Distinctive:

    Document all exports clearly

    line 63
  27. Distinctive:

    Keep documentation concise and accurate

    line 65

“Common” is measured: kept by at least 6 in 10 of the 27 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.