academic-writing
Write or revise thesis and paper prose section by section (abstract, introduction, related work, method, results, discussion,…
Package an Express and Prisma API as a runtime-only image that migrates its Postgres database at start. Use when containerising a Node API with a database, or when migrations, readiness or shutdown misbehave in production.
Claude Code
$ npx -y skills add KhaledSaeed18/dotclaude --skill express-prisma-coolify-image --agent claude-code
Codex
$ npx skills add KhaledSaeed18/dotclaude --skill express-prisma-coolify-image -a codex -y
Cursor
$ npx skills add KhaledSaeed18/dotclaude --skill express-prisma-coolify-image -a cursor -y
Gemini CLI
$ npx skills add KhaledSaeed18/dotclaude --skill express-prisma-coolify-image -a gemini-cli -y
GitHub Copilot
$ npx skills add KhaledSaeed18/dotclaude --skill express-prisma-coolify-image -a github-copilot -y
OpenCode
$ npx skills add KhaledSaeed18/dotclaude --skill express-prisma-coolify-image -a opencode -y
Windsurf
$ npx skills add KhaledSaeed18/dotclaude --skill express-prisma-coolify-image -a windsurf -y
name: express-prisma-coolify-image description: Package an Express and Prisma API as a runtime-only image that migrates its Postgres database at start. Use when containerising a Node API with a database, or when migrations, readiness or shutdown misbehave in production. argument-hint: "(optional) the API directory, its port and route prefix"
The image carries compiled code, production dependencies and the migrations, applies pending migrations before it listens, and reports ready only when it can reach its database. Because a rolling update runs the new container beside the old one, every migration must be compatible with the previous release: expand, migrate, contract.
cat package.json | jq '{scripts, engines, packageManager}'
ls prisma prisma/migrations | head; cat prisma.config.ts 2>/dev/null
grep -rn "process.env" src/config | head -40
grep -rn "health" src/routes src/modules 2>/dev/null | headList the runtime variables the app validates at boot (database URL, secrets, allowed origins, feature switches) and which have safe values for a smoke test. Note native or downloaded dependencies (a headless browser, image libraries): they must be fetched on the runner and copied in, with their shared libraries installed in the image.
| File | Purpose | | --- | --- | | [Dockerfile](./templates/Dockerfile) | `node:<major>-slim`, copies `node_modules`, `dist`, `prisma`, config and entrypoint; `USER node`; `HEALTHCHECK` on the probe | | [docker-entrypoint.sh](./templates/docker-entrypoint.sh) | `prisma migrate deploy` when migrations exist, then `exec node dist/server.js` | | [healthcheck.ts](./templates/healthcheck.ts) | compiled with the app; fetches the readiness route with a 4 s timeout | | [.dockerignore](./templates/dockerignore) | keeps sources, tests, docs and env files out; `node_modules` and `dist` deliberately stay in |
Readiness route: `GET <prefix>/health/ready` runs `SELECT 1` through Prisma and answers `{status: "ok", checks: {database: "up"}}` with 200, or 503. Liveness `GET <prefix>/health` answers without touching the database.
In this order, because an in-place `--prod` install leaves dev tooling in pnpm's store:
pnpm install --frozen-lockfile --ignore-scripts pnpm run build # tsc -p tsconfig.build.json, prisma generate rm -rf node_modules && pnpm install --prod --frozen-lockfile --ignore-scripts ls node_modules/.pnpm/@prisma+engines@*/node_modules/@prisma/engines/schema-engine-* # the migrate engine must be present
The schema engine is downloaded by the Prisma CLI on first use; the container cannot download it at start as an unprivileged user over root-owned files, so prove it exists before `docker build`.
In CI, a `postgres` service on a non-default port; locally, `docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=... postgres:17-alpine`. Start the image with `--network host`, a `DATABASE_URL` pointing at it, and safe values for every required variable. Loop `docker exec <c> node dist/healthcheck.js` until it exits 0 (migrations applied, database reachable), check `id -un` is `node`, then `docker stop -t 30` must return within 10 s with exit code 0. The full script is the image job in the `ghcr-coolify-pipeline` skill; the migration guard and the `migrate diff --exit-code` schema check belong in its quality job.
Report the image size, the migration state the smoke test reached, the list of runtime variables Coolify must carry (names only), and any compatibility note for the next release (a column added now, removed later). Migration safety itself is the `db-migration-safety` skill.
Reusable Claude Code extension registry. skills, subagents, slash commands, and hooks for engineering, git, testing, and security workflows. Distributed as a shadcn GitHub registry and as installable plugins.
Write or revise thesis and paper prose section by section (abstract, introduction, related work, method, results, discussion,…
Report computational benchmarks and experimental comparisons the way examiners and reviewers expect: fair baselines run under the…
Maintain the thesis .bib file as a single source of truth: fetch verified BibTeX from a DOI, arXiv id, or title via CrossRef and…
Expand a set of key papers into the literature around them by walking the citation graph with the Semantic Scholar and OpenAlex…
Audit every citation in a chapter, paper, or proposal against the .bib file and the real world: each cite key must exist, each…
Structure a thesis whose contribution is a built artifact (tool, system, method, model) using design science research: explicit…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.