Install and set up @data-client/react or @data-client/vue in a project. Detects project type (NextJS, Expo, React Native, Vue, plain React) and protocol (REST, GraphQL, custom), then follows the bundled protocol-specific setup guide.
68
85%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Before installing, detect the project type and protocol by checking these files:
Check which lock file exists:
yarn.lock → use yarn addpnpm-lock.yaml → use pnpm addpackage-lock.json or bun.lockb → use npm install or bun addCheck package.json dependencies:
| Check | Project Type |
|---|---|
"next" in dependencies | NextJS |
"expo" in dependencies | Expo |
"vue" in dependencies | Vue |
"react-native" in dependencies (no expo) | React Native |
"react" in dependencies | Plain React |
Scan the codebase to determine which data-fetching protocols are used:
Look for these patterns:
fetch() calls with REST-style URLs (/api/, /users/, etc.)axios, ky, got, superagent in package.jsonapi.ts, client.ts, services/*.ts/users/:id, /posts/:postId/commentsmethod: 'GET', method: 'POST', .get(, .post(Look for these patterns:
@apollo/client, graphql-request, urql, graphql-tag in package.json.graphql or .gql files in the projectquery {, mutation {, subscription {/graphqlFor async operations that don't match REST or GraphQL:
Protocol setup guides are bundled in this skill, but defining and using data afterwards is covered by other Data Client skills. Install the ones that match what you detected, skipping any already installed:
| Detected | Skills |
|---|---|
| Always | data-client-schema, data-client-manager |
| React (NextJS, Expo, React Native, plain React) | data-client-react, data-client-react-testing |
| Vue | data-client-vue, data-client-vue-testing |
| REST | data-client-rest |
| GraphQL | None beyond Always (data-client-schema covers @data-client/graphql) |
| Custom async | None beyond Always (data-client-schema covers @data-client/endpoint) |
Use the installer that installed this skill. For OpenSkills and the skills CLI, add -g if this skill lives under your home directory rather than the project.
node_modules/): install nothing. Each skill ships inside the @data-client/* package it covers, so it arrives with the packages you install below; load them the way you loaded this one.~/.claude/plugins/): claude plugin install react@data-client or claude plugin install vue@data-client. Either includes every skill above.AGENTS.md lists skills in an <available_skills> block): npx openskills install reactive/data-client/.agents/skills/<skill>, once per skill.npx skills add reactive/data-client --yes --skill <skill> --skill <skill> ...Newly installed skills may not be loaded until the next session, so read their SKILL.md directly when this skill says to apply them.
| Framework | Core Package |
|---|---|
| React (all) | @data-client/react + dev: @data-client/test |
| Vue | @data-client/vue (testing included) |
React (NextJS, Expo, React Native, plain React):
npm install @data-client/react && npm install -D @data-client/test
yarn add @data-client/react && yarn add -D @data-client/test
pnpm add @data-client/react && pnpm add -D @data-client/testVue:
npm install @data-client/vue
yarn add @data-client/vue
pnpm add @data-client/vueAfter installing, add the provider at the top-level component.
Edit app/layout.tsx:
import { DataProvider } from '@data-client/react/nextjs';
export default function RootLayout({ children }) {
return (
<html>
<DataProvider>
<body>
{children}
</body>
</DataProvider>
</html>
);
}Important: NextJS uses @data-client/react/nextjs import path.
Edit app/_layout.tsx:
import { Stack } from 'expo-router';
import { DataProvider } from '@data-client/react';
export default function RootLayout() {
return (
<DataProvider>
<Stack>
<Stack.Screen name="index" />
</Stack>
</DataProvider>
);
}Edit entry file (e.g., index.tsx):
import { DataProvider } from '@data-client/react';
import { AppRegistry } from 'react-native';
const Root = () => (
<DataProvider>
<App />
</DataProvider>
);
AppRegistry.registerComponent('MyApp', () => Root);Edit entry file (e.g., index.tsx, main.tsx, or src/index.tsx):
import { DataProvider } from '@data-client/react';
import { createRoot } from 'react-dom/client';
createRoot(document.getElementById('root')!).render(
<DataProvider>
<App />
</DataProvider>,
);Edit main.ts:
import { createApp } from 'vue';
import { DataClientPlugin } from '@data-client/vue';
import App from './App.vue';
const app = createApp(App);
app.use(DataClientPlugin, {
// optional overrides
// managers: getDefaultManagers(),
// initialState,
// Controller,
// gcPolicy,
});
app.mount('#app');After provider setup, follow the guide for each detected protocol. These guides are bundled copies of the standalone protocol setup skills, so they need nothing else installed.
Follow references/data-client-rest-setup.md, which will:
@data-client/restBaseEndpoint class extending RestEndpointFollow references/data-client-graphql-setup.md, which will:
@data-client/graphqlGQLEndpoint instanceFollow references/data-client-endpoint-setup.md, which will:
@data-client/endpointnew Endpoint()If multiple protocols are detected, follow each protocol's guide. Each protocol package can be installed alongside others.
After setup, verify:
package.json@data-client/react/nextjs for NextJS)❌ Wrong:
import { DataProvider } from '@data-client/react';✅ Correct for NextJS:
import { DataProvider } from '@data-client/react/nextjs';The DataProvider must wrap all components that use data-client hooks. Place it at the topmost level possible.
In Vue, call app.use(DataClientPlugin) on the root app before app.mount().
After core setup and protocol-specific setup:
Entity - see skill "data-client-schema"useSuspense, useQuery, useController - see skill "data-client-react" or "data-client-vue"Vue projects: read <name>.vue.md instead of <name>.md when it exists.
For detailed API documentation, see the references directory:
DataClientPlugin instead; see installation)@data-client/rest setup and migration from axios, fetch, ky, superagent or got@data-client/graphql setup@data-client/endpointreactive/data-client
b475613
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.