React State Management
involvex/youtube-music-cli
Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query.
“RTK Query createApi best practices”
$ npx skills add LedgerHQ/ledger-live --skill rtk-query-api -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LedgerHQ/ledger-live rtk-query-api --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/rtk-query-api .claude/skills/rtk-query-api && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "rtk-query-api" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/rtk-query-api into .claude/skills/rtk-query-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rtk-query-api", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/rtk-query-apiType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LedgerHQ/ledger-live --skill rtk-query-api -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LedgerHQ/ledger-live rtk-query-api --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/rtk-query-api .agents/skills/rtk-query-api && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rtk-query-api" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/rtk-query-api into .agents/skills/rtk-query-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rtk-query-api", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LedgerHQ/ledger-live --skill rtk-query-api -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LedgerHQ/ledger-live rtk-query-api --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/rtk-query-api .cursor/skills/rtk-query-api && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rtk-query-api" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/rtk-query-api into .cursor/skills/rtk-query-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rtk-query-api", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LedgerHQ/ledger-live.git --path .agents/skills/rtk-query-api--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LedgerHQ/ledger-live --skill rtk-query-api -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LedgerHQ/ledger-live rtk-query-api --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/rtk-query-api .gemini/skills/rtk-query-api && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rtk-query-api" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/rtk-query-api into .gemini/skills/rtk-query-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rtk-query-api", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LedgerHQ/ledger-live rtk-query-apiInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LedgerHQ/ledger-live --skill rtk-query-api -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/rtk-query-api .github/skills/rtk-query-api && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rtk-query-api" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/rtk-query-api into .github/skills/rtk-query-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rtk-query-api", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LedgerHQ/ledger-live --skill rtk-query-api -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LedgerHQ/ledger-live rtk-query-api --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LedgerHQ/ledger-live.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/rtk-query-api .opencode/skills/rtk-query-api && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rtk-query-api" agent skill from https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/rtk-query-api into .opencode/skills/rtk-query-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rtk-query-api", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rtk-query-apiRtk Query API is a skill in LedgerHQ/ledger-live (621 stars). Its SKILL.md is about 1.6k tokens. Licence: MIT.
Read from SKILL.md and the folder at commit a3861a2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
redux-toolkit.js.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Rtk Query API loads about 1.6k tokens when it runs. Until then it costs about 12 tokens; SKILL.md has 570 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from LedgerHQ/ledger-live at commit a3861a2, republished under its MIT licence (© LedgerHQ). 570 words, ~1,599 tokens.
.claude/skills/rtk-query-api/SKILL.md (or your agent's skills folder).createApi calls against the same backend// ✅ GOOD - state-manager/api.ts
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
import { EntityTags } from "./types";
export const myApi = createApi({
reducerPath: "myApi",
baseQuery: fetchBaseQuery({ baseUrl: "/api" }),
tagTypes: [EntityTags.Entity, EntityTags.Entities],
endpoints: (build) => ({
getEntity: build.query<Entity, string>({
query: (id) => `entities/${id}`,
providesTags: [EntityTags.Entity],
}),
}),
});
export const { useGetEntityQuery } = myApi;Define tags as enums in state-manager/types.ts:
export enum EntityTags {
Entity = "Entity",
Entities = "Entities",
}In domain/api/, this is the default — not something you reach for once a second use case appears.
Always split reaching the backend from what you ask it for:
| Half | Owner | Contains |
|---|---|---|
| Reaching a backend | @shared/api-services — one dir per backend | Base URL, base query, retry, reducerPath, extraArgument contract |
| What you ask it for | @domain/api-<name> | Endpoints, wire schemas, transforms, cache tags, hooks |
Doing it upfront costs nothing and means the second use case is a one-line addition rather than a
migration. Two createApi calls against one backend would give you two store slices, two caches and
two middlewares for one service.
The shared half declares an empty api. The use-case half adds to it with
injectEndpoints
for endpoints and enhanceEndpoints({ addTagTypes }) for tags. Both mutate and return the same api
object, so one reducer, one middleware and one cache serve every use case.
There are no exceptions. If a backend's base query currently needs use-case knowledge — mock handlers
keyed by endpoint URL, endpoint-name lookups, response types from its own wire schemas — that is a
problem to fix in the base query, not a reason to keep a second createApi.
// ✅ GOOD - the service api: base query + config. No endpoints, no tags.
export const myServiceApi = createApi({
reducerPath: "myServiceApi",
baseQuery: myServiceBaseQuery,
tagTypes: [],
endpoints: () => ({}),
});// ✅ GOOD - a use case adds its own tags, then its endpoints
export const FIRST_USE_CASE_TAGS = ["Entity"] as const;
export const firstUseCaseApi = myServiceApi
.enhanceEndpoints({ addTagTypes: FIRST_USE_CASE_TAGS })
.injectEndpoints({
endpoints: build => ({
getEntity: build.query<Entity, string>({
query: id => `entities/${id}`,
providesTags: [...FIRST_USE_CASE_TAGS],
}),
}),
});
export const { useGetEntityQuery } = firstUseCaseApi;injectEndpoints does not accept
tagTypes, which makes it tempting to declare every tag upfront in the shared file — don't.
enhanceEndpoints({ addTagTypes }) widens the tag union in place, so a tag stays next to the
endpoints that provide it and adding a use case never means editing a shared file.injectEndpoints cannot retype the original.@shared/api-services in order to call endpoints on it.State. Type such
helpers on the service api.overrideExisting defaults to false — injecting an endpoint name that already exists is
silently ignored unless you opt in.build.query for GET requestsbuild.mutation for POST/PUT/DELETEbuild.query<ResponseType, ArgType>void for no arguments: build.query<Data[], void>types.tsprovidesTags on queries for cache invalidationinvalidatesTags on mutations to trigger refetchkeepUnusedDataFor for custom cache durationendpoints: (build) => ({
getItems: build.query<Item[], void>({
query: () => "items",
providesTags: [ItemTags.Items],
keepUnusedDataFor: 60, // seconds
}),
addItem: build.mutation<Item, Partial<Item>>({
query: (body) => ({ url: "items", method: "POST", body }),
invalidatesTags: [ItemTags.Items],
}),
}),transformResponse to reshape API datatransformErrorResponse for custom error handlinggetItems: build.query<Item[], void>({
query: () => "items",
transformResponse: (response: ApiResponse) => response.data.items,
}),baseQuery or queryFn{ data } on success, { error } on failure// ✅ GOOD - errors are caught and returned
queryFn: async (arg) => {
try {
const data = await fetchData(arg);
return { data };
} catch (error) {
return { error: { status: "CUSTOM_ERROR", data: error } };
}
},Register APIs in reducers/rtkQueryApi.ts, keyed by reducerPath. For a shared backend, register the
service api — its endpoints arrive via the use-case packages the view-models import. The registry
then reads as a list of the backends the app talks to:
const APIs = {
[myApi.reducerPath]: myApi,
[myServiceApi.reducerPath]: myServiceApi,
};Two entries whose reducerPath resolves to the same string is a compile error
(TS1117: An object literal cannot have multiple properties with the same name), even for computed
properties — which is what catches an accidental double-registration of one backend.
© LedgerHQ, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/rtk-query-api of LedgerHQ/ledger-live.
Open the folder on GitHubat commit a3861a2
Rtk Query API next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Rtk Query API this skillLedgerHQ/ledger-live | 621 | — | ~1.6k | Automated safety check: Pass | MIT | |
| React State Managementinvolvex/youtube-music-cli | 456 | 12 repos | ~3k | Automated safety check: Pass | MIT | |
| Frontendredis/RedisInsight | 8.9k | — | ~3.2k | Automated safety check: Pass | Custom licence | |
| Reactvalkey-io/valkey-admin | 148 | — | ~766 | Automated safety check: Pass | Apache-2.0 | |
| Nekocap Redux Featurenopol10/nekocap | 105 | — | ~939 | Automated safety check: Pass | GPL-3.0 | |
| React ExpertJeffallan/claude-skills | 12k | — | ~1.4k | Automated safety check: Pass | MIT |
involvex/youtube-music-cli
Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query.
redis/RedisInsight
React/Redux frontend development patterns for RedisInsight UI: component folder structure, styled-components, hooks, named exports, barrel files, layout components, and theme usage.
valkey-io/valkey-admin
Guidance for React frontend work. An agent skill from valkey-io/valkey-admin.
nopol10/nekocap
A skill your agent uses when adding or modifying a Redux feature folder in the nekocap frontend — creating slices, writing sagas, defining selectors, changing persisted state shape, or touching…
Jeffallan/claude-skills
Builds React 19 components in TypeScript with Server Components, useActionState forms, custom hooks and state libraries, checked with tsc and React Testing Library.
getsentry/sentry-for-ai
Full Sentry SDK setup for React. An agent skill from getsentry/sentry-for-ai.
LedgerHQ/ledger-live
Find which open PRs are impacted by a migration/sunset/refactor and notify their authors — blocking review when the old path is already gone from develop, heads-up comment when it is only deprecated…
LedgerHQ/ledger-live
Write, review or debug a cloudSyncModule.ts — a CloudSyncDataManager that syncs one slice of user data through Ledger Sync (Cloud Sync).
LedgerHQ/ledger-live
Maintain CODEOWNERS file and team directories. An agent skill from LedgerHQ/ledger-live.
LedgerHQ/ledger-live
Coin-specific families logic must live in families/. An agent skill from LedgerHQ/ledger-live.
LedgerHQ/ledger-live
Structure a Ledger Wallet data layer where one API response serves several entities.
LedgerHQ/ledger-live
Investigate native React Native crashes (Fabric/Hermes/iOS) in ledger-live-mobile when JS error logs are missing or unhelpful.
Works with
Categories
Run `npx skills add LedgerHQ/ledger-live --skill rtk-query-api -a claude-code`. Or copy the skill folder (.agents/skills/rtk-query-api in LedgerHQ/ledger-live) into .claude/skills/rtk-query-api in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LedgerHQ/ledger-live --skill rtk-query-api -a codex`. Or copy the skill folder (.agents/skills/rtk-query-api in LedgerHQ/ledger-live) into .agents/skills/rtk-query-api in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LedgerHQ/ledger-live --skill rtk-query-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rtk-query-api, .gemini/skills/rtk-query-api, .github/skills/rtk-query-api and .opencode/skills/rtk-query-api in your project.
SKILL.md names no scripts, command-line tools or credentials: Rtk Query API is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: redux-toolkit.js.org. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Rtk Query API is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Rtk Query API: React State Management (involvex/youtube-music-cli, 456 stars), Frontend (redis/RedisInsight, 8.9k stars), React (valkey-io/valkey-admin, 148 stars) and Nekocap Redux Feature (nopol10/nekocap, 105 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LedgerHQ (a GitHub organization) maintains it in LedgerHQ/ledger-live, which has 621 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 7, 2026.
Source: LedgerHQ/ledger-live on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.