redux-toolkit Agent Skills & AI Rules

GitHub

The official, opinionated, batteries-included toolset for efficient Redux development

11,229 stars TypeScript TypeScript 1 file ยท ~131,599 tokens
RAW Rules
22 Discovered Rules โ€ข ~22,656 Estimated Tokens
Quick:
Loading skill content...

References Skill

packages/rtk-query-codegen-openapi/skills/manage-server-data/generate-rtk-query-from-openapi/references/codegen-overrides.md anthropic-skill ~274 tokens
Raw
# Codegen Overrides

## Common override targets

| Need                                            | Override                           |
| ----------------------------------------------- | ---------------------------------- |
| Query should really be a mutation               | `type: 'mutation'`                 |
| Header or optional parameters should be omitted | `parameterFilter`                  |
| Generated tags are too coarse                   | `providesTags` / `invalidatesTags` |

## Example: split one schema into multiple outputs

```ts
import type { ConfigFile } from '@rtk-query/codegen-openapi';

const config: ConfigFile = {
  schemaFile: './openapi.json',
  apiFile: './src/store/emptyApi.ts',
  apiImport: 'emptySplitApi',
  outputFiles: {
    './src/store/userApi.ts': {
      exportName: 'userApi',
      filterEndpoints: [/user/i],
      hooks: true,
    },
    './src/store/orderApi.ts': {
      exportName: 'orderApi',
      filterEndpoints: [/order/i],
      hooks: true,
    },
  },
};

export default config;
```

## Review checklist

- Does every generated endpoint belong in the shared API root?
- Did any query or mutation type need correction?
- Are generated tags specific enough for real invalidation needs?
- Did the schema force parameters into the signature that the app should hide?