/si-coder:sc-convexfrom si-coder
Deploys and maintains self-hosted Convex backends on Dokploy: deploy compose template, rotate admin key, push schema, configure @convex-dev/auth (JWT_PRIVATE_KEY + JWKS), and probe api-, site-, dash- subdomains.
Ships in si-coder. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use this skill when the user wants to deploy, debug, or maintain a self-hosted Convex backend running on Dokploy. The repo lives at https://github.com/rahmanef63/si-coder-agent.
Credential-dependent local helper scripts must run through sc run -- ... when their Dokploy/Convex access lives in SI-Coder named connections. This lets one child process receive the selected provider connections without writing them to the parent shell. The command examples below show script arguments; prefix them with sc run -- unless the caller already provides the required environment.
For self-hosted Convex projects the Convex CLI (v1.27+) auto-detects the backend from .env.local (CONVEX_SELF_HOSTED_URL + CONVEX_SELF_HOSTED_ADMIN_KEY). The schema/function push happens automatically via the sc-git pre-push hook installed by /sc-all. Do not instruct the user to run npx convex deploy, pnpm convex:deploy, convex:push, or any Convex CLI command interactively. If the hook is not installed, install it yourself (node ~/.claude/skills/sc-git/scripts/hook.js install --repo <name>) instead of asking.
If the hook is genuinely unable to deploy (admin key invalid, backend unreachable), debug it with scripts/check-backend.js and fix root cause — do not punt the convex CLI call to the user.
DOKPLOY_API_URL, DOKPLOY_API_KEY — Dokploy adminCONVEX_ADMIN_KEY (or generated on the fly from the running container)HOSTINGER_API_TOKEN for DNS A-record automationIf anything is missing, route the user to /sc-onboarding.
@convex-dev/auth for new projects unless the user explicitly asks for Clerk.convex/_generated is checked in: never run npx convex codegen inside Dockerfile. Generate locally with npx convex dev --once and commit the folder.CONVEX_ADMIN_KEY) and the repo's local env file in a single pass. Never leave them out-of-sync.npx convex env set JWT_PRIVATE_KEY "-----BEGIN..." breaks because -- is parsed as a flag. Use scripts/set-auth-env.js (admin REST /api/update_environment_variables) instead.NEXT_PUBLIC_CONVEX_URL at build time: NEXT_PUBLIC_* is inlined at next build. If the Dockerfile uses a dummy URL, the deployed JS connects to the wrong server — see ## Dockerfile pattern below.## Password hashing below.auth:* actions via HTTP: WebSocket reconnect mid-flight aborts in-flight actions. Wrap the Convex client so auth:* goes via ConvexHttpClient — see ## Frontend pattern below.These live as Dokploy Compose env (NOT in .env.local):
| Variable | Format | Purpose |
|---|---|---|
JWT_PRIVATE_KEY | PEM PKCS8 RSA | Signs JWT via importPKCS8() |
JWKS | JSON {"keys":[{...}]} | Served at /.well-known/jwks.json |
CONVEX_SITE_ORIGIN | URL | Maps to process.env.CONVEX_SITE_URL |
CONVEX_CLOUD_ORIGIN | URL | Maps to process.env.CONVEX_CLOUD_URL |
INSTANCE_SECRET | hex | Preserve across redeploys |
INSTANCE_NAME | string | App name |
All scripts live in ~/.claude/skills/sc-convex/scripts/ (symlink from this repo).
deploy-convex.jsDeploy or update a Convex compose service on Dokploy. Idempotent — finds existing compose by name or deploys the Convex template, then sets api-/site-/dash- domains + INSTANCE_SECRET + auth env.
node scripts/deploy-convex.js \
--project <PROJECT_NAME> \
--app <APP_NAME> \
--domain <root-domain.tld> \
[--with-auth-keys] # also generate JWT_PRIVATE_KEY + JWKS
check-backend.jsProbe api-/site-/dash- subdomains + /version + /.well-known/jwks.json + admin-key validity. Prints a status table.
node scripts/check-backend.js --domain <root-domain.tld> [--admin-key "$CONVEX_ADMIN_KEY"] [--expect-auth]
--expect-auth makes a missing/non-200 JWKS (/.well-known/jwks.json) fatal; omit it and JWKS is advisory only (informational, non-fatal) — a backend deployed without @convex-dev/auth legitimately has no JWKS.
rotate-admin-key.jsGenerate a fresh admin key from the running backend container, write to Dokploy Compose env, optionally update local .env.
node scripts/rotate-admin-key.js --compose-name <APP_NAME>-db [--env-file ./.env.local]
SC_DOCKER_SUDO—1force sudo for docker,0forbid, unset = auto-detect (used bydockerExec,lib/proc.js).
set-auth-env.jsSet JWT_PRIVATE_KEY and JWKS (and any extra vars) on a self-hosted backend via admin REST API. Avoids the CLI -- parsing bug.
node scripts/set-auth-env.js --domain <root-domain.tld> --admin-key "$CONVEX_ADMIN_KEY" [--generate]
--generate makes new RS256 keypair; omit to pull from JWT_PRIVATE_KEY / JWKS env.
NEXT_PUBLIC_CONVEX_URL)# ❌ WRONG — dummy URL inlined into JS
ENV NEXT_PUBLIC_CONVEX_URL=https://dummy-for-build.convex.cloud
# ✅ CORRECT — ARG default + ENV; Dokploy build-arg overrides
ARG NEXT_PUBLIC_CONVEX_URL=https://api-<appname>.<your-domain>
ENV NEXT_PUBLIC_CONVEX_URL=$NEXT_PUBLIC_CONVEX_URL
ConvexClientProvider.tsx)"use client";
import { ConvexReactClient } from "convex/react";
import { ConvexHttpClient } from "convex/browser";
import { ConvexAuthProvider } from "@convex-dev/auth/react";
import { type ReactNode, useState } from "react";
export function ConvexClientProvider({ children }: { children: ReactNode }) {
const [convex] = useState(() => {
const client = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!);
const http = new ConvexHttpClient(process.env.NEXT_PUBLIC_CONVEX_URL!);
const orig = client.action.bind(client);
(client as any).action = (ref: any, args?: any) => {
const name = (ref as any)?._name ?? String(ref);
if (typeof name === "string" && name.startsWith("auth:")) return http.action(ref as any, args);
return orig(ref, args);
};
return client;
});
return <ConvexAuthProvider client={convex}>{children}</ConvexAuthProvider>;
}
// convex/auth.ts — inside Password({ ... })
crypto: {
async hashSecret(password: string) {
const salt = crypto.getRandomValues(new Uint8Array(16));
const enc = new TextEncoder();
const km = await crypto.subtle.importKey("raw", enc.encode(password), "PBKDF2", false, ["deriveBits"]);
const hb = await crypto.subtle.deriveBits({ name: "PBKDF2", salt, iterations: 10000, hash: "SHA-256" }, km, 256);
const hex = (b: Uint8Array) => Array.from(b).map(x => x.toString(16).padStart(2, "0")).join("");
return `pbkdf2_${hex(salt)}_${hex(new Uint8Array(hb))}`;
},
async verifySecret(password: string, hash: string) {
if (hash.startsWith("pt_")) return hash === `pt_${password}`;
const parts = hash.split("_");
if (parts[0] !== "pbkdf2" || parts.length !== 3) return false;
const salt = new Uint8Array(parts[1].match(/.{2}/g)!.map(b => parseInt(b, 16)));
const enc = new TextEncoder();
const km = await crypto.subtle.importKey("raw", enc.encode(password), "PBKDF2", false, ["deriveBits"]);
const hb = await crypto.subtle.deriveBits({ name: "PBKDF2", salt, iterations: 10000, hash: "SHA-256" }, km, 256);
const hex = Array.from(new Uint8Array(hb)).map(b => b.toString(16).padStart(2, "0")).join("");
return hex === parts[2];
},
},
WebSocket reconnect during in-flight action. The server may have completed the work (user visible in dashboard!) but the client never got the response. Common causes for self-hosted Dokploy, in order of likelihood:
| Cause | Symptom | Fix |
|---|---|---|
NEXT_PUBLIC_CONVEX_URL dummy at build | Users in DB, browser errors | Fix Dockerfile (see above) |
Missing JWT_PRIVATE_KEY on backend | Action crashes before creating user | scripts/set-auth-env.js --generate |
Missing JWKS on backend | /.well-known/jwks.json returns 500 | scripts/set-auth-env.js --generate |
| Dokploy idle WS timeout | Error only after sitting | Route auth:* via HTTP (see above) |
| Scrypt/bcrypt timeout | Action >60s, proxy kills WS | Use PBKDF2 pattern (see above) |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
27 skills in this plugin
/scMain SI-Coder entry point for non-technical users. Turn a plain-language idea or existing web app into a working product, improve frontend quality across UI/UX/DX/AX, and publish it. Route automatically while keeping technical details optional./sc-allTurn a plain-language web-app goal into a working live app. Designed for non-technical users: choose architecture and hosting automatically, connect accounts safely, create/publish code, data, domain and verification end-to-end, delegate user-facing frontend quality to sc-fe, and expose technical details only when needed or requested./sc-axSI-Coder Agent Experience (AX) skill. Make projects, tools, workflows, and frontend actions easy for coding agents to discover, understand, invoke correctly, observe, recover, resume, and verify with low context/token waste./sc-buildBuild a web app from a plain-language idea for a non-technical user. Ask at most three short business/product questions one at a time, infer everything already stated, choose technical defaults automatically, create a first working version, gather product feedback, then publish through /sc-all./sc-cfCloudflare DNS automation — idempotent per-record A/AAAA/CNAME/TXT writes via the Cloudflare v4 API, DNS-only (grey cloud) by default so Let's Encrypt works. Use this provider whenever the domain's nameservers actually delegate to Cloudflare; it mirrors the lib/hostinger.js contract so /sc-all can swap providers. Workers/Pages/R2/tunnel still stubs./sc-clerk(STUB / NOT IMPLEMENTED YET) Clerk auth setup for projects that explicitly use Clerk instead of @convex-dev/auth. Configures instance, sets allowed origins, creates JWT template for Convex integration. Pairs with Clerk MCP (clerk @ mcp.clerk.com/mcp) for SDK snippet generation.Generated from the plugin's indexed repository (rahmanef63/si-coder-agent) — no native marketplace selected
npx claudepluginhub p/rahmanef63-si-coderOther plugins' skills for the same job