Token导航 LogoToken导航

Agent Skill · 研究检索

web-server-state-react-query(WEB server state React query 搜索)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

web-server-state-react-query 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 66,285。

总安装 267周安装 11GitHub Stars 5下载 87核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:web-server-state-react-query(WEB server state React query 搜索)
来源仓库:https://github.com/agents-inc/skills
仓库路径:skills/web-server-state-react-query
安装命令:
npx skills add https://github.com/agents-inc/skills --skill web-server-state-react-query
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/agents-inc/skills --skill web-server-state-react-query

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构或定位布局问题。需结合项目现有设计系统、路由和构建方式,避免生成孤立片段;涉及页面改动时应配合本地预览确认效果。

安装命令:npx skills add https://github.com/agents-inc/skills --skill web-server-state-react-query。建议确认权限范围和维护状态,检查是否会触发联网或文件读写操作。

来源仓库内路径:skills/web-server-state-react-query

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/agents-inc/skills --skill web-server-state-rea…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

web-server-state-react-query 怎么安装?

在终端执行 npx skills add https://github.com/agents-inc/skills --skill web-server-state-react-query。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

web-server-state-react-query 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

web-server-state-react-query 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

web-server-state-react-query 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

web-server-state-react-query 用的人多吗?

公开数据是累计安装 267 次,近一周安装 11 次,下载 87 次,GitHub 5 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

web-server-state-react-query 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
web-server-state-react-query

WEB server state React query 搜索 · 本页

2675接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

React Query + hey-api Patterns

Quick Guide: Generate type-safe React Query hooks from OpenAPI specs using hey-api. Never write custom query hooks or manual type definitions -- use generated query options (getFeaturesOptions() pattern) and generated types. Configure the client once via environment variables. All timeouts/retries use named constants.

<critical_requirements>

CRITICAL: Before Using This Skill

All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering, import type, named constants)

(You MUST use generated query options from hey-api -- NEVER write custom React Query hooks)

(You MUST regenerate client code when OpenAPI schema changes)

(You MUST use named constants for ALL timeout/retry values -- NO magic numbers)

(You MUST configure API client base URL via environment variables)

</critical_requirements>


Auto-detection: OpenAPI schema, hey-api, openapi-ts, generated React Query hooks, query options, getFeaturesOptions, useQuery, useMutation, QueryClient, QueryClientProvider, staleTime, gcTime, queryKey

When to use:

  • Generating type-safe API client from OpenAPI specs with hey-api
  • Using generated React Query query options in components
  • Configuring QueryClient defaults, error handling, retry policies
  • Debouncing queries, handling dependent/conditional fetching

When NOT to use:

  • No OpenAPI spec available (consider writing one or using tRPC)
  • GraphQL API (use a GraphQL client)
  • Real-time WebSocket APIs (use a WebSocket solution)
  • Simple one-off fetches where React Query overhead isn't justified

Philosophy

OpenAPI-first development ensures a single source of truth for your API contract. The hey-api code generator (@hey-api/openapi-ts) transforms your OpenAPI schema into fully typed client code, React Query hooks, and query options -- eliminating manual type definitions and reducing bugs.

Core Principles:

  1. Single source of truth -- OpenAPI schema drives types, client code, and mocks
  2. Zero manual typing -- Generated code eliminates type drift
  3. Consistent patterns -- All API calls use generated query options, never custom hooks
  4. Centralized configuration -- One place to configure client behavior

Core Patterns

Pattern 1: hey-api Code Generation

Configure @hey-api/openapi-ts to generate TypeScript client code and React Query hooks from your OpenAPI spec. Since v0.73.0, client packages are bundled -- no separate installation needed.

// openapi-ts.config.ts
import { defineConfig } from "@hey-api/openapi-ts";

export default defineConfig({
  input: "./openapi.yaml",
  output: "src/api-client",
  plugins: [
    "@hey-api/typescript",
    "@hey-api/sdk",
    "@tanstack/react-query",
    // "@hey-api/client-fetch" -- optional, Fetch is the default client since v0.73
  ],
});

Key points: @hey-api/typescript generates types (renamed from @hey-api/types), @hey-api/sdk generates service functions (renamed from @hey-api/services). Fetch client is bundled by default since v0.73 -- only add @hey-api/client-fetch explicitly to customize its options. Run generation via npx openapi-ts or add as a build script.

See examples/core.md Pattern 1 for generated output structure and usage.


Pattern 2: Client Configuration

Configure the API client base URL and QueryClient defaults once in a provider component. Use environment variables for the base URL so it works across environments without code changes.

const FIVE_MINUTES_MS = 5 * 60 * 1000;

// In your provider component:
const [queryClient] = useState(
  () =>
    new QueryClient({
      defaultOptions: {
        queries: { staleTime: FIVE_MINUTES_MS, refetchOnWindowFocus: false },
      },
    }),
);

client.setConfig({ baseUrl: process.env.API_BASE_URL ?? "" });

Key points: hey-api's client.setConfig() merges with existing config (doesn't replace). Named constants for all time values. Set auth option or use interceptors for auth headers.

See examples/core.md Pattern 2 for full provider setup and auth configuration.


Pattern 3: Using Generated Query Options

Use generated query options directly -- never write custom React Query hooks. Options are fully typed and include generated query keys.

import { useQuery } from "@tanstack/react-query";
import { getFeaturesOptions } from "./api-client/@tanstack/react-query.gen";

// Direct usage -- fully typed
const { data, isPending, error } = useQuery(getFeaturesOptions());

// With overrides -- spread and customize
const TEN_MINUTES_MS = 10 * 60 * 1000;
const { data } = useQuery({
  ...getFeaturesOptions(),
  staleTime: TEN_MINUTES_MS,
  enabled: someCondition,
});

Why good: Zero boilerplate, type-safe, consistent patterns, query keys auto-namespaced, easy to customize by spreading

See examples/core.md Pattern 3 for component examples and bad patterns to avoid.


Pattern 4: Error Handling

React Query v5 removed onError/onSuccess/onSettled callbacks from useQuery. Use component-level isPending/error states, useEffect for error side effects, or global handlers via QueryCache/MutationCache.

// Global error handling (v5 pattern)
new QueryClient({
  queryCache: new QueryCache({
    onError: (error, query) => {
      if (query.state.data !== undefined) {
        showNotification(`Something went wrong: ${error.message}`);
      }
    },
  }),
  mutationCache: new MutationCache({
    onError: (error) => {
      showNotification("Operation failed. Please try again.");
    },
  }),
});

See examples/error-handling.md for component-level handling, retry with exponential backoff, and error boundaries.


Pattern 5: Debounced Queries

Debounce search/filter queries to prevent excessive API calls on every keystroke.

const DEBOUNCE_DELAY_MS = 500;
const MIN_SEARCH_LENGTH = 0;

const debouncedTerm = useDebounce(searchTerm, DEBOUNCE_DELAY_MS);
const { data } = useQuery({
  queryKey: ["search", debouncedTerm],
  queryFn: () => searchAPI(debouncedTerm),
  enabled: debouncedTerm.length > MIN_SEARCH_LENGTH,
});

Why good: Prevents excessive API calls, query key includes debounced term for proper cache management, enabled prevents empty queries


Detailed Resources:


<red_flags>

RED FLAGS

High Priority Issues:

  • Writing custom React Query hooks instead of using generated query options -- creates inconsistent patterns and loses type safety
  • Manual TypeScript interfaces for API responses -- drift from OpenAPI schema causes runtime errors
  • Magic numbers for timeouts/retries -- use named constants (FIVE_MINUTES_MS, MAX_RETRY_ATTEMPTS)
  • Hardcoded API URLs -- use environment variables for multi-environment deploys
  • Using onError/onSuccess callbacks on useQuery -- removed in React Query v5

Medium Priority Issues:

  • Mutating global client config inside query functions -- causes race conditions in concurrent requests
  • Missing error boundaries -- unhandled query errors crash entire component tree
  • retry: true in development with mocks -- should be false to fail fast
  • Not cleaning up AbortController timeouts -- memory leak

Gotchas & Edge Cases:

  • cacheTime was renamed to gcTime in v5 (garbage collection time)
  • isLoading was renamed to isPending in v5
  • keepPreviousData replaced with placeholderData: (prev) => prev
  • useInfiniteQuery now requires initialPageParam option
  • Server-side retry defaults to 0 in v5 (was 3 in v4)
  • client.setConfig() merges with existing config, doesn't replace it
  • Generated query keys are immutable tuples (safe for React Query key equality)
  • Fetch timeout is different from React Query's staleTime/gcTime
  • Generated types change when OpenAPI schema changes -- commit generated files to catch breaking changes in review
  • React Query v5 requires React 18.0+

</red_flags>


<critical_reminders>

CRITICAL REMINDERS

All code must follow project conventions in CLAUDE.md

(You MUST use generated query options from hey-api -- NEVER write custom React Query hooks)

(You MUST regenerate client code when OpenAPI schema changes)

(You MUST use named constants for ALL timeout/retry values -- NO magic numbers)

(You MUST configure API client base URL via environment variables)

Failure to follow these rules will cause type drift, inconsistent patterns, and production bugs.

</critical_reminders>

平台分布

Codex

35.38%
按下载量换算31

Claude

30.75%
按下载量换算27

Cursor

18.91%
按下载量换算16

Gemini CLI

7.97%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills