rdc-setup
Provides automated installation and initialization for Data Client in frontend projects.
Install
mkdir -p .claude/skills/rdc-setup && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4627" && unzip -o skill.zip -d .claude/skills/rdc-setup && rm skill.zipInstalls to .claude/skills/rdc-setup
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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 hands off to protocol-specific setup skills.Key capabilities
- →Detect project type
- →Identify API protocol
- →Install core packages
- →Configure provider at root
- →Verify setup
How it works
The skill inspects project files to detect framework and protocol, then installs the appropriate packages and configures the provider component.
Inputs & outputs
When to use rdc-setup
- →Initialize Data Client in new project
- →Add Data Client to NextJS
- →Setup Data Client for Vue
- →Detect API protocol requirements
About this skill
Setup Reactive Data Client
Detection Steps
Before installing, detect the project type and protocol by checking these files:
1. Detect Package Manager
Check which lock file exists:
yarn.lock→ useyarn addpnpm-lock.yaml→ usepnpm addpackage-lock.jsonorbun.lockb→ usenpm installorbun add
2. Detect Project Type
Check 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 |
3. Detect Protocol Type
Scan the codebase to determine which data-fetching protocols are used:
REST Detection
Look for these patterns:
fetch()calls with REST-style URLs (/api/,/users/, etc.)- HTTP client libraries:
axios,ky,got,superagentinpackage.json - Files with REST patterns:
api.ts,client.ts,services/*.ts - URL patterns with path parameters:
/users/:id,/posts/:postId/comments - HTTP methods in code:
method: 'GET',method: 'POST',.get(,.post(
GraphQL Detection
Look for these patterns:
@apollo/client,graphql-request,urql,graphql-taginpackage.json.graphqlor.gqlfiles in the project- `gql`` template literal tags
- GraphQL query patterns:
query {,mutation {,subscription { - GraphQL endpoint URLs:
/graphql
Custom Protocol Detection
For async operations that don't match REST or GraphQL:
- Custom async functions returning Promises
- Third-party SDK clients (Firebase, Supabase, AWS SDK, etc.)
- IndexedDB or other local async storage
Installation
Core Packages
| Framework | Core Package |
|---|---|
| React (all) | @data-client/react + dev: @data-client/test |
| Vue | @data-client/vue (testing included) |
Install Command Examples
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/test
Vue:
npm install @data-client/vue
yarn add @data-client/vue
pnpm add @data-client/vue
Provider Setup
After installing, add the provider at the top-level component.
NextJS (App Router)
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.
Expo
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>
);
}
React Native
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);
Plain React (Vite, CRA, etc.)
Edit entry file (e.g., index.tsx, main.tsx, or src/index.tsx):
import { DataProvider } from '@data-client/react';
import ReactDOM from 'react-dom/client';
ReactDOM.createRoot(document.getElementById('root')!).render(
<DataProvider>
<App />
</DataProvider>,
);
Vue
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');
Protocol-Specific Setup
After provider setup, apply the appropriate skill based on detected protocol:
REST APIs
Apply skill "data-client-rest-setup" which will:
- Install
@data-client/rest - Offer to create a custom
BaseEndpointclass extendingRestEndpoint - Configure common behaviors: urlPrefix, authentication, error handling
GraphQL APIs
Apply skill "data-client-graphql-setup" which will:
- Install
@data-client/graphql - Create and configure
GQLEndpointinstance - Set up authentication headers
Custom Async Operations
Apply skill "data-client-endpoint-setup" which will:
- Install
@data-client/endpoint - Offer to wrap existing async functions with
new Endpoint() - Configure schemas and caching options
Multiple Protocols
If multiple protocols are detected, apply multiple setup skills. Each protocol package can be installed alongside others.
Verification Checklist
After setup, verify:
- Core packages installed in
package.json - Provider/Plugin wraps the app at root level
- Correct import path used (especially
@data-client/react/nextjsfor NextJS) - No duplicate providers in component tree
- Protocol-specific setup completed via appropriate skill
Common Issues
NextJS: Wrong Import Path
❌ Wrong:
import { DataProvider } from '@data-client/react';
✅ Correct for NextJS:
import { DataProvider } from '@data-client/react/nextjs';
Provider Not at Root
The DataProvider must wrap all components that use data-client hooks. Place it at the topmost level possible.
Next Steps
After core setup and protocol-specific setup:
- Define data schemas using
Entity- see skill "data-client-schema" - Use hooks like
useSuspense,useQuery,useController- see skill "data-client-react" or "data-client-vue" - Define REST resources - see skill "data-client-rest"
References
For detailed API documentation, see the references directory:
- DataProvider - Root provider component
- installation - Installation guide
- getDefaultManagers - Default managers
When not to use it
- →When the project does not use Data Client
- →When manual setup is preferred
Limitations
- →Requires standard project structure
How it compares
It automates the entire setup lifecycle based on project-specific detection, rather than requiring manual configuration.
Compared to similar skills
rdc-setup side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| rdc-setup (this skill) | 1 | 5mo | Review | Intermediate |
| ai-model-web | 1 | 2mo | Review | Intermediate |
| moai-domain-frontend | 1 | 3mo | No flags | Advanced |
| perf-web-optimization | 1 | 5mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by reactive
View all by reactive →You might also like
ai-model-web
TencentCloudBase
Use this skill when developing browser/Web applications (React/Vue/Angular, static websites, SPAs) that need AI capabilities. Features text generation (generateText) and streaming (streamText) via @cloudbase/js-sdk. Built-in models include Hunyuan (hunyuan-2.0-instruct-20251111 recommended) and DeepSeek (deepseek-v3.2 recommended). NOT for Node.js backend (use ai-model-nodejs), WeChat Mini Program (use ai-model-wechat), or image generation (Node SDK only).
moai-domain-frontend
modu-ai
Frontend development specialist covering React 19, Next.js 16, Vue 3.5, and modern UI/UX patterns with component architecture. Use when building web UIs, implementing components, optimizing frontend performance, or integrating state management.
perf-web-optimization
tech-leads-club
Optimize web performance: Core Web Vitals (LCP, CLS, INP), bundle size, images, caching. Use when site is slow, optimizing for Lighthouse scores, reducing bundle size, fixing layout shifts, or improving Time to Interactive. Triggers on: web performance, Core Web Vitals, LCP, CLS, INP, FID, bundle size, page speed, slow site.
astro
Anhvu1107
ALWAYS use this when the request matches Astro: Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.
frontend-developer
bonnguyenitc
Use when building web UI, designing component architecture, or reviewing frontend code — regardless of framework (React, Vue, Svelte, etc.)
a11y-audit
jarbitechture
Accessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA compliance across React, Next.js, Vue, Angular, Svelte, and plain HTML codebases. Use when auditing accessibility, fixing a11y violations, checking color contrast, generating compliance reports, or integrating acce