跳到正文
Skillpedia
API 与服务器(后端)9.5k · #12254

convex-quickstart

它能做什么

这个技能会根据一个创意,使用 Convex 和 Next.js 网页应用创建一个简单的入门项目。适合希望在添加功能之前快速运行起一个东西的人。

适用场景

  • ✓当你有一个应用创意,并希望在电脑上运行一个入门项目时。
  • ✓当你想在添加登录或支付之前,先有一个可以继续开发的最简 Convex 应用时。
  • ✓当你需要一个快速的本地应用来测试创意时。

技能链接

https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-quickstart/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-quickstart/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为一个习惯追踪器搭建一个简单的 Convex 应用,让我可以在浏览器中看到它运行。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会运行一个设置流程,创建项目、安装依赖包,并启动本地后端和网页服务器。然后它会打开本地地址,并在添加更多功能之前提出计划。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

<!-- GENERATED from convex-agents content/capabilities/quickstart.json — do not edit by hand. -->

Quickstart: a barebones Convex template, running

Stand up a barebones Next.js + Convex template from the idea, locally, with an anonymous dev deployment. Minimal by design: local dev servers, no publish step, no pre-baked auth.

Workflow

  1. Run recipe quickstart-recipe@^2 with {idea, template} (the pack fetches + caches it; pinned offline fallback). It creates the project, installs deps, starts the backend (anonymous) and the web dev server.
  2. When it prints the dev URL, open it for the user.
  3. Present a short plan and CONFIRM before building features beyond the template.

Rules

  • Never re-run the recipe if it already reported success.
  • Delegate any code under convex/ to the convex-expert capability.
  • Don't add Postgres/Redis/Express — use Convex primitives.
  • Don't add hosting/publish or pre-baked auth here — keep the template minimal unless the user asks for more.
  • DEGRADATION RULE — if the scaffold cannot run (non-interactive session, no network, a sandboxed temp dir, or the user just wants code, not an app): skip the recipe and write a standard Convex project directly. ALL backend code goes under convex/ (schema.ts, functions) — NEVER at the project root; Convex functions only run from the convex/ directory. Write ZERO scaffold/documentation files (no START_HERE.md, ARCHITECTURE.md, MANIFEST.txt, README walls) unless explicitly asked. "Build me a backend" means code, not ceremony.
  • Data access + imports — before writing any convex/*.ts: never an unbounded .collect() on a table that can grow — use .withIndex(...) and .paginate(...)/.take(n). Use an index, not .filter(), for anything that would be a SQL WHERE. .withIndex(...) callbacks only have eq/gt/gte/lt/lte — there is no .range(...) method. Imports: query/mutation/action/internalQuery/internalMutation/internalAction come from ./_generated/server; api/internal come from ./_generated/api; NEVER import from convex/server in application code. v.literal("exact value") for fixed string/enum members, not a bare string. "use node" only at the top of action-only modules — never in a file that also exports a query or mutation. Never import a Node builtin (crypto/fs/path/http/child_process/os, with or without the node: prefix) into a file lacking "use node" — including http.ts route handlers; use Web Crypto (crypto.subtle) instead of importing crypto where possible.
  • Reserved names — never export const <jsReservedWord> = ... (e.g. delete, new, class, function, return) as a query/mutation/action export name; esbuild fails to parse it. Never a table or index name starting with _ (e.g. _migrations: defineTable(...)) — _ is reserved and errors at push as TableNameReserved/IndexNameReserved.
  • HTTP routes — httpRouter has no Express-style :param segments (path: "/users/:id" only matches that literal string and is dead code); use pathPrefix and parse the trailing segment yourself. Every http.route({...}) handler: must be wrapped in httpAction(...) from ./_generated/server — a bare async (ctx, request) => {...} type-checks but isn't a valid HTTP action.
  • ctx.runQuery/ctx.runMutation/ctx.runAction need a codegen'd function reference (api.foo.bar/internal.foo.bar), never a raw imported module member (import * as queries from "./queries"; ctx.runQuery(queries.getX, ...) compiles but fails at runtime).
  • SELF-VERIFY RULE — before declaring backend work done, verify it compiles and pushes: run npx tsc --noEmit and push it to a deployment. Prefer the project's existing one; otherwise npx convex dev --once when npx convex whoami succeeds, and CONVEX_AGENT_MODE=anonymous npx convex dev --once ONLY when it does not. Forcing anonymous on a signed-in user rebinds .env.local and costs them the persistent, publishable cloud deployment they expect. Fix every error it reports before finishing — one verify round catches the wrong-relative-import / duplicate-symbol / unbalanced-paren class that otherwise breaks the deploy.
常见问题

入门项目包含登录功能吗?

不包含。模板保持精简,除非你要求,否则不包含预先构建的登录功能。

它会把应用发布到线上吗?

不会。模板不包含发布步骤,因此只在本地运行。

如果无法运行设置怎么办?

技能会直接写入一个标准的 Convex 项目,其中的后端代码只位于 convex 文件夹内。

详情

作者的原始描述

Get a barebones Convex + web template running from a one-sentence idea.

repo: openclaw/clawhub

热度

GitHub 星标
9.5k
排名
#12254
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能