> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talosjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# rate-limit:create

> Generate a new rate limiter class.

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

```bash theme={null}
talos rate-limit:create [options]
```

## Examples

```bash theme={null}
talos rate-limit:create
```

```bash theme={null}
talos rate-limit:create --name=Api
```

```bash theme={null}
talos rate-limit:create --name=LoginAttempts --module=auth --override
```

## Options

| Option       | Description                                                         | Default             |
| ------------ | ------------------------------------------------------------------- | ------------------- |
| `--name`     | Resource name (the `RateLimiter` suffix is appended automatically). | Prompted if omitted |
| `--module`   | Target module.                                                      | `shared`            |
| `--override` | Overwrite 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`.

<Tabs>
  <Tab title="Claude">
    ```bash theme={null}
    talos agent:skills:create
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    talos agent:skills:create
    ```
  </Tab>
</Tabs>
