redux — Claude Code skill: what it does, how to install
A Redux adapter for json-render: it points the renderer at a store slice instead of its own state. Useful when app state already lives in Redux.
npx skills add vercel-labs/json-render --skill redux -a claude-codeWhat redux does
The skill walks an agent through wiring Redux or Redux Toolkit into json-render. reduxStateStore adapts a slice of your store to the StateStore interface, so reads and writes from the renderer travel through Redux actions. The included example builds a ui slice with a replaceUiState reducer, creates the store with configureStore, then assembles the adapter and wraps the tree in <StateProvider store={store}>.
Three options are required: the store itself, a selector that picks the json-render slice out of the state tree, and dispatch, which replaces that slice with the next state. Skip one and there is nothing for the adapter to read or write. When the entire state tree is the model, the guide suggests (s) => s as the selector.
Install with npx skills add vercel-labs/json-render --skill redux -a claude-code; the file lands at ~/.claude/skills/redux/SKILL.md. Your project needs @json-render/redux, @json-render/core and @json-render/react, plus redux. With Redux Toolkit you swap that last package for @reduxjs/toolkit.
What it helps with
- build a
StateStoreon top of an existing Redux store - keep json-render state in its own
uislice - pull the right slice out of a large state tree with
selector - route renderer updates through a
dispatchcall
Example prompts for the agent
- wire `@json-render/redux` into my store: slice `ui`, selector `(state) => state.ui`
- wrap the app in `<StateProvider store={store}>` using the `reduxStateStore` adapter
- create the `ui` slice with a `replaceUiState` reducer and build the adapter from it
How to install redux
1Skills CLI (Vercel)
npx skills add vercel-labs/json-render --skill redux -a claude-code2Manually: put the files in place
~/.claude/skills/redux/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/redux/
1Skills CLI (Vercel)
npx skills add vercel-labs/json-render --skill redux -a codex2Manually: put the files in place
.agents/skills/redux/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add vercel-labs/json-render --skill redux -a cursor2Manually: put the files in place
.cursor/skills/redux/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install vercel-labs/json-render redux2Manually: put the files in place
.github/skills/redux/SKILL.md1Skills CLI (Vercel)
npx skills add vercel-labs/json-render --skill redux -a gemini-cli2Platform CLI
gemini skills install https://github.com/vercel-labs/json-render --path skills/reduxManually: put the files in place
.devin/skills/redux/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add vercel-labs/json-render --skill redux -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set20
The whole set →Similar
Questions about redux
How do I install the redux skill in Claude Code?
Run npx skills add vercel-labs/json-render --skill redux -a claude-code. The skill file ends up at ~/.claude/skills/redux/SKILL.md.
What does the redux skill do?
It tells the agent how to make a Redux store act as json-render's StateStore via reduxStateStore from @json-render/redux, and ships a worked example with a slice and a provider.
Do I have to pass store, selector and dispatch?
Yes, all three are required. dispatch receives the full next state model and the store, then replaces the selected slice with the new state.
Source text
SKILL.md · Apache-2.0
---
name: redux
description: Redux adapter for json-render's StateStore interface. Use when integrating json-render with Redux or Redux Toolkit for state management via @json-render/redux.
---
# @json-render/redux
Redux adapter for json-render's `StateStore` interface. Wire a Redux store (or Redux Toolkit slice) as the state backend for json-render.
## Installation
```bash
npm install @json-render/redux @json-render/core @json-render/react redux
# or with Redux Toolkit (recommended):
npm install @json-render/redux @json-render/core @json-render/react @reduxjs/toolkit
```
## Usage
```tsx
import { configureStore, createSlice } from "@reduxjs/toolkit";
import { reduxStateStore } from "@json-render/redux";
import { StateProvider } from "@json-render/react";
// 1. Define a slice for json-render state
const uiSlice = createSlice({
name: "ui",
initialState: { count: 0 } as Record<string, unknown>,
reducers: {
replaceUiState: (_state, action) => action.payload,
},
});
// 2. Create the Redux store
const reduxStore = configureStore({
reducer: { ui: uiSlice.reducer },
});
// 3. Create the json-render StateStore adapter
const store = reduxStateStore({
store: reduxStore,
selector: (state) => state.ui,
dispatch: (next, s) => s.dispatch(uiSlice.actions.replaceUiState(next)),
});
// 4. Use it
<StateProvider store={store}>
{/* json-render reads/writes go through Redux */}
</StateProvider>
```
## API
### `reduxStateStore(options)`
Creates a `StateStore` backed by a Redux store.
| Option | Type | Required | Description |
|--------|------|----------|-------------|
| `store` | `Store` | Yes | The Redux store instance |
| `selector` | `(state) => StateModel` | Yes | Select the json-render slice from the Redux state tree. Use `(s) => s` if the entire state is the model. |
| `dispatch` | `(nextState, store) => void` | Yes | Dispatch an action that replaces the selected slice with the next state |
The `dispatch` callback receives the full next state model and the Redux store.
© vercel-labs · Apache-2.0 · vercel-labs/json-render