.cursor/skills/convex-self-hosting/SKILL.md
Integrate Convex static self hosting into existing apps using the latest upstream instructions from get-convex/self-hosting every time. Use when setting up upload APIs, HTTP routes, deployment scripts, migration from external hosting, or troubleshooting static deploy issues across React, Vite, Next.js, and other frontends.
npx skillsauth add waynesutton/humanagent convex-self-hostingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to integrate Convex based static hosting in a repeatable way across projects.
Run this check before making any code changes or giving setup advice.
Preferred command:
bash skills/convex-self-hosting/scripts/check-upstream.sh
https://raw.githubusercontent.com/get-convex/self-hosting/main/INTEGRATION.mdhttps://github.com/get-convex/self-hosting?tab=readme-ov-file#manual-setup-1https://docs.convex.dev/llms.txtnpm view @convex-dev/self-hosting versionIf upstream docs conflict with local rules, follow upstream docs and explain what changed.
Ask these before implementing:
get-convex/self-hosting is the source of truth for this setup./app.Never assume unpublished package install details.
If npm package exists, use the package directly.
npm install @convex-dev/self-hosting
If package is missing on npm, use GitHub source and pin to commit or tag.
npm install github:get-convex/self-hosting#main
If project policy requires deterministic builds, ask for a commit SHA and pin to it.
Use the latest upstream file patterns from INTEGRATION.md.
convex/convex.config.tsimport { defineApp } from "convex/server";
import selfHosting from "@convex-dev/self-hosting/convex.config";
const app = defineApp();
app.use(selfHosting);
export default app;
convex/staticHosting.tsimport { components } from "./_generated/api";
import {
exposeUploadApi,
exposeDeploymentQuery,
} from "@convex-dev/self-hosting";
export const { generateUploadUrl, recordAsset, gcOldAssets, listAssets } =
exposeUploadApi(components.selfHosting);
export const { getCurrentDeployment } =
exposeDeploymentQuery(components.selfHosting);
convex/http.tsimport { httpRouter } from "convex/server";
import { registerStaticRoutes } from "@convex-dev/self-hosting";
import { components } from "./_generated/api";
const http = httpRouter();
registerStaticRoutes(http, components.selfHosting);
export default http;
Optional prefix mode:
registerStaticRoutes(http, components.selfHosting, {
pathPrefix: "/app",
spaFallback: true,
});
package.json scripts{
"scripts": {
"deploy": "npx @convex-dev/self-hosting deploy",
"deploy:static": "npx @convex-dev/self-hosting upload --build --prod"
}
}
npm install @convex-dev/self-hosting
npx @convex-dev/self-hosting setup
npx convex dev --once
npm run deploy
npm run deploy
npx convex deploy
npx @convex-dev/self-hosting upload --build --prod
Always use the tool driven build flow. Do not run npm run build first when using upload deploy commands.
--build flow as default.VITE_CONVEX_URL in the app build script as documented upstream.pathPrefix: "/app" for static hosting.If get-convex/convex-agent-plugins is present, follow its Convex rules with this skill:
Reference:
https://github.com/get-convex/convex-agent-plugins404 for static routes:
convex/http.ts exists and exports router.Cannot find module .../convex.config:
--build flow.npx convex dev once to push backend state.Before finishing, provide:
Never claim setup is complete without showing these four outputs.
https://github.com/get-convex/self-hostinghttps://raw.githubusercontent.com/get-convex/self-hosting/main/INTEGRATION.mdhttps://github.com/get-convex/self-hosting?tab=readme-ov-file#manual-setup-1https://docs.convex.dev/llms.txthttps://github.com/get-convex/convex-agent-pluginshttps://github.com/agentskills/agentskillsdocumentation
# Update project docs Use this skill after completing any feature, fix, or migration to keep the three core project tracking files in sync. Activate with: `@update` ## Step 1: Get real dates Run this first: ```bash git log --date=short -n 10 ``` Use actual commit dates. Never use placeholder dates or future months. ## Step 2: Update TASK.md Move completed items into `## Completed` with the date: ```markdown - [x] Feature name (YYYY-MM-DD) - [x] Sub-task detail - [x] Sub-task detail
testing
Integrate and maintain Robelest Convex Auth in apps by always checking upstream before implementation. Use when adding auth setup, updating auth wiring, migrating between upstream patterns, or troubleshooting @robelest/convex-auth behavior across projects.
tools
# Create a PRD Use this skill before any multi-file feature, architectural decision, or complex bug fix. Activate with: `@prd` ## Location and naming - All PRDs live in `prds/` folder - File name: `prds/<feature-or-problem-slug>.md` - Extension is always `.md`, not `.prd` - Use kebab-case for the filename (e.g., `prds/adding-email-auth.md`) ## Template Copy and fill in this template: ```markdown # [Feature or problem name] ## Summary 1-2 sentence description of what this is and why it m
development
Use when multiple workflows duplicate the same operational logic, when deciding what belongs in actions vs shared services, or when refactoring repeated operational blocks across domain flows. Use when adding new features that share mechanics with existing ones.