Commandgeneral

/add-slice Command

Create a new Redux Toolkit slice with TypeScript

View Source

Follow the skill pattern in .claude/skills/add-slice.md to create a new Redux Toolkit slice with TypeScript.

Ask the user for:

  1. Slice name (e.g., "users")
  2. Feature location (default: src/features/)

Then create:

  • Slice file with types, initial state, reducers, async thunks, and selectors
  • Test file for the slice
  • Add the reducer to src/store/index.ts

Follow the normalized state pattern (byId/allIds) for entity collections. Follow all standards from CLAUDE.md and LLM_INSTRUCTIONS.md.