Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

convex-nextjsconvex Next.js 搜索

Agent Skill

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

总安装

1,112

周安装

45

GitHub Stars

公开资料未说明

下载量

349
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/tristanmanchester/agent-skills --skill convex-nextjs

简介

用于 Next.js 应用中集成 Convex 的完整端到端解决方案。

  • 支持 schema 设计、UI hooks 编写和认证流程配置。
  • 可诊断 provider 缺失、codegen 错误等典型集成故障。
  • 不适合纯前端 UI 开发或无 Convex 依赖的项目场景。
  • convex-nextjs 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Convex + Next.js

Use this skill to

  • Bootstrap Convex in a new or existing Next.js app.
  • Add a feature end to end: schema, indexes, functions, UI hooks, auth, and deployment.
  • Debug typical integration failures: missing provider, missing generated code, bad client/server boundaries, missing env vars.
  • Review whether Convex is a good fit for a realtime or collaborative Next.js feature.

Do not use this skill when

  • The task is plain Next.js UI work with no Convex dependency.
  • The backend is definitely not Convex and the user is not considering migration.
  • The problem is generic database theory with no Next.js/Convex implementation work.

Default posture

  • Use npx convex dev for development.
  • Keep reactive hooks in Client Components.
  • Prefer indexed queries over .filter(...).
  • Treat unbounded lists as paginated by default.
  • Put external I/O in actions; add "use node" only if Node APIs or unsupported packages are required.
  • Require input validation on public functions; add return validation unless there is a good reason not to.
  • Add explicit auth and ownership checks for user data.
  • Prefer helper functions or custom wrappers when the same auth/tenant checks repeat.

Starting questions to answer from the repo

  1. Is this a new app, an existing Next.js app, or a migration?
  2. App Router, Pages Router, or both?
  3. Does the feature need reactivity, SSR, server actions, or all three?
  4. Is the dataset bounded or should it paginate?
  5. Is auth already present? If yes, is it client-only or needed on the server too?
  6. Would a Convex component make this feature more reusable or isolated?

Workflow 1 — Choose the right starting path

A. Brand new project

Prefer:

npm create convex@latest

If the user already has a Next.js app structure they want to keep, use path B instead.

B. Existing Next.js app

Install Convex and start dev sync:

npm install convex
npx convex dev

Expected outcomes:

  • convex/ exists, or the custom functions directory from convex.json
  • generated files appear under _generated/
  • a dev deployment or local deployment is connected
  • NEXT_PUBLIC_CONVEX_URL is available for the frontend

See references/01-setup-and-decision-tree.md.

Workflow 2 — Model data for query patterns, not screen shapes

Before writing UI, define:

  • the tables
  • the ownership fields
  • the indexes needed for the main reads
  • whether lists are bounded or paginated
  • whether files should live in Convex File Storage instead of large documents

Rules:

  • Prefer flat relational-style documents over deep nested blobs.
  • Use v.id("table") for relationships.
  • Add indexes for every repeated filter/sort path you know you need.
  • If the query would scan an unbounded table, redesign the index or paginate it.

See references/02-schema-and-indexes.md.

Workflow 3 — Pick the correct Convex function shape

Query

Use for pure reads. Keep them small, indexed, and predictable.

Mutation

Use for writes and transactional read-write logic.

Action

Use for external APIs, long-running work, or non-transactional orchestration.

  • Stay in the default Convex runtime if fetch is enough.
  • Add "use node" only when you need Node-only APIs or unsupported packages.
  • Files with "use node" should contain actions only.

Detailed patterns: references/03-functions-and-safety.md

Workflow 4 — Enforce validation, auth, and ownership early

For public functions:

  • define args
  • usually define returns
  • call ctx.auth.getUserIdentity() when the function is protected
  • check ownership or team membership, not just authentication
  • move repeated checks into helpers or custom wrappers once duplication starts to spread

If auth or tenant checks repeat in many functions, consider:

  • convex/lib/auth.ts helpers
  • thin wrappers/custom functions for query, mutation, or action
  • shared policy helpers for tenant/resource checks

See references/05-auth-and-access-control.md.

Workflow 5 — Respect Next.js boundaries

  • useQuery, useMutation, useAction, usePaginatedQuery, and usePreloadedQuery belong in Client Components.
  • For reactive-first pages with good first paint, use preloadQuery in a Server Component and usePreloadedQuery in a Client Component.
  • For server-only reads, use fetchQuery.
  • For Server Actions or Route Handlers, use fetchMutation or fetchAction.

Do not call React hooks from Server Components.

See references/04-nextjs-client-and-server-boundaries.md.

Workflow 6 — Treat large lists as a pagination problem

Use pagination by default when:

  • the user says “all”, “feed”, “activity”, “history”, “messages”, “notifications”, “search results”, or “infinite scroll”
  • the table can grow without a natural hard limit
  • you would otherwise reach for .collect() on a user-facing list

Pattern:

  • backend query uses .paginate(paginationOpts)
  • React client uses usePaginatedQuery

See references/06-pagination-performance-and-realtime.md.

Workflow 7 — Consider components when the feature wants isolation

A Convex component is often worth it when the feature:

  • has its own schema, functions, and internal jobs
  • should be reusable across apps
  • would otherwise pollute the root convex/ folder with tightly-coupled code

Use normal app code when the feature is small and specific to one app.

See references/07-components-migrations-and-reuse.md.

Workflow 8 — Choose the right development mode

  • On your own machine or in a local coding agent, standard npx convex dev is usually right.
  • In remote or background agents that cannot log in, use Agent Mode.
  • For isolated local-only development, use local deployments.

See references/08-local-dev-agent-mode-and-cloud-agents.md.

Workflow 9 — Validate before you stop

Run:

python {baseDir}/scripts/validate_project.py --root .

Useful flags:

python {baseDir}/scripts/validate_project.py --root . --strict
python {baseDir}/scripts/validate_project.py --root . --json

The validator checks for the common failures this skill is designed to catch:

  • missing Convex installation or generated code
  • missing provider or env wiring
  • hook usage in non-client components
  • implicit table access
  • .collect() or .filter() smells in queries
  • missing validators on Convex functions
  • risky "use node" file mixes
  • scheduler calls aimed at public functions
  • missing TypeScript strictness or missing Convex ESLint plugin

Workflow 10 — Deploy cleanly

During normal development, keep using:

npx convex dev

For production or CI:

npx convex deploy

For Vercel builds, the common pattern is:

npx convex deploy --cmd "npm run build"

See references/09-deploy-ci-and-vercel.md.

What a strong final implementation usually includes

  • updated convex/schema.ts
  • new or updated indexes
  • public functions with args and usually returns
  • auth or ownership checks where needed
  • UI wired through the generated api
  • "use client" only where it is actually needed
  • paginated lists instead of unbounded collects
  • a note about required env vars
  • commands the user should run to verify the change

Response shape to prefer when making code changes

  1. State the files to add or edit.
  2. Explain the architectural choice in one sentence.
  3. Apply the code changes.
  4. Run the validator or describe the exact checks to run.
  5. Call out any follow-up env vars, auth setup, deploy steps, or migration concerns.

Reference map

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.8%
按下载量换算118

Claude

32.25%
按下载量换算113

Cursor

16.83%
按下载量换算59

Gemini CLI

9.28%
按下载量换算32

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills