Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

data-client-setup数据客户端设置

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

652

周安装

28

GitHub Stars

1,995

下载量

228
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:data-client-setup(数据客户端设置)
来源仓库:https://github.com/reactive/data-client
仓库路径:skills/data-client-setup
安装命令:
npx skills add https://github.com/reactive/data-client --skill data-client-setup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/reactive/data-client --skill data-client-setup

简介

自动检测项目类型(NextJS/Expo/Vue/React Native)与通信协议。

  • 识别 npm/yarn/pnpm 包管理器并选择对应安装命令模板。
  • REST/GraphQL 等协议探测通过后触发专项配置技能调用链。
  • Plain React 项目需手动补充资源定义否则仅启用基础缓存功能。
  • Expo 环境需额外配置 native 模块桥接与热重载兼容性处理。

SKILL.md

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 → use yarn add
  • pnpm-lock.yaml → use pnpm add
  • package-lock.json or bun.lockb → use npm install or bun add

2. Detect Project Type

Check package.json dependencies:

CheckProject Type
"next" in dependenciesNextJS
"expo" in dependenciesExpo
"vue" in dependenciesVue
"react-native" in dependencies (no expo)React Native
"react" in dependenciesPlain 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, superagent in package.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-tag in package.json
  • .graphql or .gql files 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

FrameworkCore 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:

  1. Install @data-client/rest
  2. Offer to create a custom BaseEndpoint class extending RestEndpoint
  3. Configure common behaviors: urlPrefix, authentication, error handling

GraphQL APIs

Apply skill "data-client-graphql-setup" which will:

  1. Install @data-client/graphql
  2. Create and configure GQLEndpoint instance
  3. Set up authentication headers

Custom Async Operations

Apply skill "data-client-endpoint-setup" which will:

  1. Install @data-client/endpoint
  2. Offer to wrap existing async functions with new Endpoint()
  3. 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/nextjs for 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:

  1. Define data schemas using Entity - see skill "data-client-schema"
  2. Use hooks like useSuspense, useQuery, useController - see skill "data-client-react" or "data-client-vue"
  3. Define REST resources - see skill "data-client-rest"

References

For detailed API documentation, see the references directory:

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.57%
按下载量换算77

Claude

28.81%
按下载量换算66

Cursor

21.24%
按下载量换算48

Gemini CLI

9.61%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills