Skip to main content
Generates a rate limiter class with its test file in the target module. It writes modules/<module>/src/rate-limit/<Name>RateLimiter.ts and its matching test file, and installs the @talosjs/rate-limit dependency if it is missing. The generated class implements the IRateLimiter interface (with check, isLimited, and reset) so you can plug in a custom throttling strategy.

Usage

talos rate-limit:create [options]

Examples

talos rate-limit:create
talos rate-limit:create --name=Api
talos rate-limit:create --name=LoginAttempts --module=auth --override

Options

OptionDescriptionDefault
--nameResource name (the RateLimiter suffix is appended automatically).Prompted if omitted
--moduleTarget module.shared
--overrideOverwrite an existing file without confirmation.false

AI Skill

This command ships a matching rate-limit:create skill. Your AI agent uses it to generate a new rate limiter class and its test file, then complete a custom request-throttling strategy that implements the IRateLimiter interface from @talosjs/rate-limit.
talos agent:skills:create