academic-writing
Write or revise thesis and paper prose section by section (abstract, introduction, related work, method, results, discussion,…
Package a Next.js app as a runtime-only container image with a health probe and a fast shutdown. Use when containerising a Next.js app, when its image is large or slow, or when a rolling update drops requests.
Claude Code
$ npx -y skills add KhaledSaeed18/dotclaude --skill nextjs-coolify-image --agent claude-code
Codex
$ npx skills add KhaledSaeed18/dotclaude --skill nextjs-coolify-image -a codex -y
Cursor
$ npx skills add KhaledSaeed18/dotclaude --skill nextjs-coolify-image -a cursor -y
Gemini CLI
$ npx skills add KhaledSaeed18/dotclaude --skill nextjs-coolify-image -a gemini-cli -y
GitHub Copilot
$ npx skills add KhaledSaeed18/dotclaude --skill nextjs-coolify-image -a github-copilot -y
OpenCode
$ npx skills add KhaledSaeed18/dotclaude --skill nextjs-coolify-image -a opencode -y
Windsurf
$ npx skills add KhaledSaeed18/dotclaude --skill nextjs-coolify-image -a windsurf -y
name: nextjs-coolify-image description: Package a Next.js app as a runtime-only container image with a health probe and a fast shutdown. Use when containerising a Next.js app, when its image is large or slow, or when a rolling update drops requests. argument-hint: "(optional) the app directory, its public API origin, and where it will run"
The image contains the standalone server and nothing else: the build runs natively in CI, the Dockerfile only copies output, and the container proves its own readiness and leaves within a second when asked. Those three properties make rolling updates safe and images small; everything below enforces them.
grep -n "output\|distDir\|rewrites\|headers" next.config.* grep -rn "process.env" app components lib proxy.ts middleware.ts 2>/dev/null | grep -v NEXT_PUBLIC_ | grep -v node_modules grep -rln "next/image" app components | head
Classify every env read as build-time (`NEXT_PUBLIC_*`, anything in `next.config`) or runtime (read on the server at request time). Note whether `next/image` optimises local images: sharp is traced into the standalone output automatically when installed, so the runtime image needs no extra packages, but the smoke test must prove it.
Copy and adapt, from `templates/`:
| File | Purpose | | --- | --- | | [Dockerfile](./templates/Dockerfile) | `node:<major>-slim`, copies the three output folders plus the two scripts, `USER node`, `HEALTHCHECK` on the probe, exit deadline preloaded | | [.dockerignore](./templates/dockerignore) | an allowlist: everything out except the build output | | [healthcheck.js](./templates/healthcheck.js) | fetches `/healthz` on `127.0.0.1` with a 4 s timeout, exit 0 or 1 | | [shutdown.cjs](./templates/shutdown.cjs) | exits half a second after SIGTERM or SIGINT; `NEXT_MANUAL_SIG_HANDLE=true` in the Dockerfile disables Next's own wait | | [healthz route](./templates/healthz-route.ts) | `app/healthz/route.ts`, static, `Cache-Control: no-store` |
In `next.config.*`: `output: "standalone"`, `poweredByHeader: false`, and send `Strict-Transport-Security` yourself (a platform edge used to add it; a self-hosted proxy does not). In the proxy or middleware matcher add `healthz` to the exclusions: `"/((?!api|healthz|_next|.*\\..*).*)"`. Add the new files to knip or lint ignores if the repo gates unused files.
NEXT_PUBLIC_API_BASE_URL=https://api.example.com pnpm build
jq -r '.rewrites.afterFiles[]?, .rewrites.beforeFiles[]?, .rewrites.fallback[]? | select(.source == "/api/:path*") | .destination' .next/routes-manifest.json
ls .next/standalone/node_modules/.pnpm | grep -c sharp # non-zero when next/image is used
docker build -t app:local . && docker image inspect app:local --format '{{.Size}}'Run the container with the memory limit and check, in order: Docker reports `healthy` within 30 s; `id -u` is not 0; `/healthz` 200; a page per locale (`dir="rtl"` present where expected); an unauthenticated protected route redirects to login; security headers present and `x-powered-by` absent; `/_next/image?url=...` returns `image/*` when the app optimises images; `docker stop -t 10` returns in about a second. Write curl output to files before grepping: `grep -q` closes the pipe early and fails curl under `pipefail`. The exact script is the image job in the `ghcr-coolify-pipeline` skill.
Report the image size, the verified rewrite destination, the smoke results, which env values are baked and which are runtime, and anything the app does that the probe does not cover (background jobs, streams). The Coolify side is the `coolify-image-app` skill; the general container rules the `dockerfile-best-practices` 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.