What problem does it solve?
Hardcoded "magic numbers" and strings make code difficult to maintain, update, and understand. This Skill enforces a centralized approach to managing all application constants, improving code clarity, consistency, and discoverability.
Core Features & Use Cases
- No Magic Numbers or Strings: Eliminate hardcoded values by using named constants for timeouts, limits, Redis keys, and repeated string literals.
- Domain-Separated Organization: Organize constants logically into categories like
ai.ts, timing.ts, queue.ts, and discord.ts for easy navigation.
- Centralized Access: All constants are exported from
@tzurot/common-types, ensuring consistency and a single source of truth across all microservices.
- Documentation & Type Safety: Each constant includes JSDoc comments explaining its purpose and
as const for robust type inference and immutability.
Quick Start
Use the tzurot-constants skill to replace a hardcoded timeout value in your code with a named constant from common-types/constants/timing.ts, ensuring it has proper JSDoc.