Token导航 LogoToken导航TokenDH.com
前端设计敏感数据github未标认证来源可访问许可证需确认审计通过

convex-tanstack凸 tanstack

Agent Skill

convex-tanstack 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

988

周安装

42

GitHub Stars

23

下载量

346
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/sstobo/convex-skills --skill convex-tanstack

简介

Convex + TanStack Start 提供全栈响应式应用开发指引,整合实时查询与 SSR 支持。

  • 适用于构建具有自动缓存失效、类型安全的 React 全栈项目,尤其适合 Better Auth 集成场景。
  • 涵盖查询、变更、路由配置与数据获取模式,推荐使用 useQuery 与 useMutation 管理状态。
  • 部署前需确认 TanStack Router 版本与 Convex SDK 兼容,避免因依赖冲突引发构建失败。
  • convex-tanstack 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Convex + TanStack Start

Overview

This skill provides guidance for building reactive, real-time full-stack applications using Convex (reactive backend-as-a-service) with TanStack Start (full-stack React meta-framework). The stack provides live-updating queries, type-safe end-to-end development, SSR support, and automatic cache invalidation.

When to Use This Skill

  • Implementing Convex queries, mutations, or actions
  • Setting up or troubleshooting Better Auth authentication
  • Configuring TanStack Router routes and loaders
  • Writing schema definitions and indexes
  • Implementing data fetching patterns (useQuery, useSuspenseQuery)
  • Working with file storage, scheduling, or cron jobs
  • Building AI agents with @convex-dev/agent
  • Debugging SSR or hydration issues

Quick Reference

Essential Imports

// Data fetching (always use cached version)
import { useQuery } from 'convex-helpers/react/cache'
import { useMutation, useAction } from 'convex/react'

// SSR with React Query
import { useSuspenseQuery } from '@tanstack/react-query'
import { convexQuery } from '@convex-dev/react-query'

// API and types
import { api } from '~/convex/_generated/api'
import type { Id, Doc } from '~/convex/_generated/dataModel'

// Backend functions
import { query, mutation, action } from "./_generated/server"
import { v } from "convex/values"

The Skip Pattern

Never call hooks conditionally. Use "skip" instead:

const user = useQuery(api.users.get, userId ? { userId } : "skip")
const org = useQuery(api.orgs.get, user?.orgId ? { orgId: user.orgId } : "skip")

Three-State Query Handling

if (data === undefined) return <Skeleton />  // Loading
if (data === null) return <NotFound />       // Not found
return <Content data={data} />               // Success

Function Syntax (Always Include Returns Validator)

export const getUser = query({
  args: { userId: v.id("users") },
  returns: v.union(
    v.object({ _id: v.id("users"), name: v.string() }),
    v.null()
  ),
  handler: async (ctx, args) => {
    return await ctx.db.get(args.userId)
  },
})

Index Best Practices

// Schema - name includes all fields
.index("by_organizationId_status", ["organizationId", "status"])

// Query - fields in same order as index
.withIndex("by_organizationId_status", (q) =>
  q.eq("organizationId", orgId).eq("status", "published")
)

Auth Check (Backend)

import { authComponent } from "./auth"

const user = await authComponent.getAuthUser(ctx)
if (!user) throw new Error("Not authenticated")

Core Principles

  1. Use queries for reads - Queries are reactive, cacheable, and consistent
  2. Keep functions fast - Finish in < 100ms, work with < a few hundred records
  3. Prefer queries/mutations over actions - Actions are for external API calls only
  4. Always use indexes - Never do table scans with .filter()
  5. Minimize client state - Rely on Convex's real-time sync

Common Anti-Patterns

WrongCorrect
import {useQuery} from 'convex/react'import {useQuery} from 'convex-helpers/react/cache'
if (id) useQuery(...)useQuery(..., id? {...}: "skip")
.filter(x => x.field === val).withIndex("by_field", q => q.eq("field", val))
Action with ctx.dbUse ctx.runQuery/runMutation
`count

Reference Files

Load the appropriate reference file based on the task:

FileUse When
references/01-setup.mdProject setup, config files, environment variables
references/02-router.mdRouter setup, root route, file-based routing, layouts
references/03-auth.mdBetter Auth setup, sign up/in/out, protected routes, SSR auth
references/04-data-fetching.mduseQuery, useSuspenseQuery, mutations, loaders, prefetching
references/05-backend.mdSchema, queries, mutations, actions, internal functions, HTTP endpoints
references/06-types.mdTypeScript patterns, validators, type mapping
references/07-storage.mdFile upload, download, metadata, deletion
references/08-scheduling.mdscheduler.runAfter, cron jobs
references/09-agents.mdAI agents, tools, RAG setup
references/10-frontend.mdComponent patterns, loading states, Tailwind/shadcn
references/11-permissions.mdRole hierarchy, feature access patterns
references/12-deployment.mdDev commands, Convex CLI, Vercel deployment
references/13-quick-reference.mdImport cheatsheet, common patterns summary

When to Load References

  • Starting a new project: Load 01-setup.md
  • Adding authentication: Load 03-auth.md
  • Writing backend functions: Load 05-backend.md
  • Implementing data fetching: Load 04-data-fetching.md
  • Building UI components: Load 10-frontend.md
  • Need quick syntax: Load 13-quick-reference.md

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.83%
按下载量换算124

Claude

29.22%
按下载量换算101

Cursor

17.92%
按下载量换算62

Gemini CLI

7.89%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills