·avoid-unnecessary-type-params
</>

avoid-unnecessary-type-params

marius-townhouse/effective-typescript-skills

Use when writing generic functions or types. Use when reviewing type signatures. Use when a type parameter only appears once. Use when tempted to add generics for "flexibility".

2Installs·0Trend·@marius-townhouse

Installation

$npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill avoid-unnecessary-type-params

SKILL.md

The "Golden Rule of Generics" states that type parameters should appear twice or more in a function signature. If a type parameter only appears once, it's not relating anything and is likely unnecessary. Unnecessary type parameters create a false sense of type safety and can make inference less successful.

This skill helps you identify and eliminate superfluous type parameters, resulting in cleaner, more maintainable code that TypeScript can infer more effectively.

Type parameters must appear twice or more to establish a relationship. If a type parameter only appears once, strongly reconsider if you need it.

Use when writing generic functions or types. Use when reviewing type signatures. Use when a type parameter only appears once. Use when tempted to add generics for "flexibility". Source: marius-townhouse/effective-typescript-skills.

View raw

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill avoid-unnecessary-type-params
Category
</>Dev Tools
Verified
First Seen
2026-02-05
Updated
2026-02-18

Quick answers

What is avoid-unnecessary-type-params?

Use when writing generic functions or types. Use when reviewing type signatures. Use when a type parameter only appears once. Use when tempted to add generics for "flexibility". Source: marius-townhouse/effective-typescript-skills.

How do I install avoid-unnecessary-type-params?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill avoid-unnecessary-type-params Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor

Where is the source repository?

https://github.com/marius-townhouse/effective-typescript-skills