CtrlK
BlogDocsLog inGet started
Tessl Logo

evilissimo/naming-things

Reviews and improves **names** in code — variables, functions, classes, modules, parameters — for clarity, intent, and consistency with language/team conventions. Triggers when asked to review names, rename things, improve code readability, clean up confusing code, or when examining code with generic/vague names like "data", "info", "manager", "temp", "util". Does NOT trigger for general code review unrelated to naming, architecture design, debugging, or performance optimization. Identifies naming anti-patterns (generic names, misleading names, type-encoding, abbreviations), suggests role-based names that reveal intent, checks consistency with project/domain vocabulary, and flags misalignment with language culture.

91

1.05x
Quality

90%

Does it follow best practices?

Impact

94%

1.05x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

typescript.mdreferences/

TypeScript / JavaScript Naming Conventions

Based on common conventions in the TypeScript/JavaScript ecosystem.

Convention Table

ThingConventionExample
VariablecamelCaseuserName, totalCount
FunctioncamelCasecalculateTotal(), getUser()
ClassPascalCaseCustomerOrder, HttpClient
InterfacePascalCase (no I prefix)UserProps, OrderConfig
TypePascalCasePaymentStatus, JsonValue
EnumPascalCase (members: PascalCase)enum Color { Red, Green, Blue }
Module / filecamelCase or kebab-caseorderService.ts, user-utils.ts
Constant (module-level)SCREAMING_SNAKE_CASE or camelCaseMAX_RETRY_COUNT
React componentPascalCaseUserProfile, OrderList
React hookcamelCase, prefix useuseUser(), useFetch()
PrivatePrefix # or _ (convention)#privateField, _internal
Boolean propPrefix is, has, shouldisActive, hasError, shouldShow

Key Points

  • No I prefix on interfaces — modern TypeScript convention is just PascalCase: UserData, not IUserData
  • React component names are always PascalCase — lowercase elements are treated as HTML tags by JSX
  • Event handlers use on or handle prefix: onSubmit, handleClick, onChange
  • Boolean variables and props use is/has/can/should: isLoading, hasPermission, canSubmit
  • Avoid abbreviations unless universally known: btnbutton, cfgconfig, msgmessage
  • Async functions don't need special naming — the async keyword already signals this
  • Factory functions use create prefix: createClient(), createStore()
  • Array variables often plural: users, orders, items

TypeScript-Specific

  • Type parameters (generics) typically single uppercase: <T>, <K>, <V>, or descriptive: <TEntity>
  • Discriminated unions use descriptive literal type names: type Status = "idle" | "loading" | "success" | "error"
  • Utility types use T prefix for internal helpers, but prefer descriptive names for public APIs

Common Offenses

BadGoodReason
datauserData, responseData, ordersGeneric — what data?
infouserInfo, orderInfo, errorDetailsVague — info about what?
x (outside math)result, value, itemLoses meaning
IIndexableIndexableI prefix is legacy
process()processPayment(), processOrder()Too vague
handle()handleClick(), handleSubmit()Handle what?
thing / stuffName it for what it isNever acceptable

SKILL.md

tile.json