Agent skill

Nestjs Deployment

by HoangNguyen0403 in HoangNguyen0403/agent-skills-standard

Containerize NestJS apps with multi-stage Docker builds, tune Node.js memory, and implement graceful shutdown hooks.

MITAuto-check passedDevOps & Cloud

Install Nestjs Deployment

skills CLI
$ npx skills add HoangNguyen0403/agent-skills-standard --skill nestjs-deployment -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HoangNguyen0403/agent-skills-standard nestjs-deployment --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HoangNguyen0403/agent-skills-standard.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/nestjs/nestjs-deployment .claude/skills/nestjs-deployment && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nestjs-deployment
GitHub stars
572
Token cost
~692 tokens
SKILL.md length
276 words
Files
3 (incl. references)
Skills in repo
211
Repo updated
First seen
Licence
MIT

At a glance

Containerize NestJS apps with multi-stage Docker builds, tune Node.js memory, and implement graceful shutdown hooks.

  • Works in 5 steps: Write multi-stage Dockerfile — Build… → Set non-root user — Add USER node to… → Tune memory — Set --max-old-space-size… → …
  • Writing Dockerfiles
  • SKILL.md covers Priority: P1 (HIGH), Workflow: Containerize NestJS…, Dockerfile Example and Runtime Tuning (Node.js), plus 3 more sections
  • Calls node and npm

What it does

Nestjs Deployment is an agent skill from HoangNguyen0403/agent-skills-standard. Containerize NestJS apps with multi-stage Docker builds, tune Node.js memory, and implement graceful shutdown hooks. Use when writing Dockerfiles, configuring K8s deployments, or adding shutdown hooks for NestJS.

Its SKILL.md is about 690 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `evals/evals.json` and `references/example.md`).

It sits in DevOps & Cloud, covering Containers, Deployment and Container orchestration. It works with NestJS, Docker, Kubernetes and Node.js. The repository describes itself as: A collection of Agent Skills Standard and Best Practice for Programming Languages, Frameworks that help our AI Agent follow best practies on frameworks and programming laguages. The licence is MIT.

When your agent uses it

  • Writing Dockerfiles
  • Configuring K8s deployments
  • Adding shutdown hooks for NestJS

Example prompts

  • “/nestjs-deployment”

Requirements

  • Node.js
  • Docker

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Write multi-stage Dockerfile — Build stage installs devDeps and runs nest build; run stage copies only dist and pruned node_modules.
  2. Set non-root user — Add USER node to Dockerfile.
  3. Tune memory — Set --max-old-space-size to ~75% of container memory limit.
  4. Enable shutdown hooks — Call app.enableShutdownHooks() in main.ts.
  5. Add K8s pre-stop — Configure 5-10s sleep pre-stop hook for LB draining.

What it can do on your machine

Read from SKILL.md and the folder at commit b529c2d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nestjs Deployment loads about 692 tokens when it runs, and up to ~791 if it reads all its reference files. Until then it costs about 58 tokens; SKILL.md has 276 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~692
With references · SKILL.md plus every file in references/, read only if the agent opens them
~791

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HoangNguyen0403/agent-skills-standard at commit b529c2d, republished under its MIT licence (© HoangNguyen0403). 276 words, ~692 tokens.

Download SKILL.mdSave it as .claude/skills/nestjs-deployment/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
nestjs-deployment
description
Containerize NestJS apps with multi-stage Docker builds, tune Node.js memory, and implement graceful shutdown hooks. Use when writing Dockerfiles, configuring K8s deployments, or adding shutdown hooks for NestJS.

Deployment & Ops Standards

Priority: P1 (HIGH)

Workflow: Containerize NestJS App

  1. Write multi-stage Dockerfile — Build stage installs devDeps and runs nest build; run stage copies only dist and pruned node_modules.
  2. Set non-root user — Add USER node to Dockerfile.
  3. Tune memory — Set --max-old-space-size to ~75% of container memory limit.
  4. Enable shutdown hooks — Call app.enableShutdownHooks() in main.ts.
  5. Add K8s pre-stop — Configure 5-10s sleep pre-stop hook for LB draining.

Dockerfile Example

See implementation examples

Runtime Tuning (Node.js)

  • Memory Config: Container memory != Node memory.
  • Rule: Explicitly set Max Old Space.
  • Command: node --max-old-space-size=XXX dist/main
  • Calculation: Set to ~75-80% of Kubernetes Limit. (Limit: 1GB -> OldSpace: 800MB).
  • Graceful Shutdown:
  • Signal: Listen to SIGTERM.
  • NestJS: app.enableShutdownHooks() mandatory.
  • Sleep: Add "Pre-Stop" sleep in K8s (5-10s) to allow Load Balancer to drain connections before Node process stops accepting traffic.

Init Patterns

  • Database Migrations:
  • Anti-Pattern: Running migration in main.ts on startup.
  • Pro Pattern: Use Init Container in Kubernetes that runs npm run typeorm:migration:run before app container starts.

Environment Variables & CI/CD

  • CI/CD Pipelines (GitHub, GitLab, Azure, etc.):
  • If you modify src/config/env.validation.ts to add new environment variable, you MUST map it explicitly in your deployment pipeline/infrastructure-as-code.
  • Platform Context:
  • Cloud Run/ECS: Variables must explicitly passed in service definition.
  • Kubernetes: New variables must added to Deployment manifest or ConfigMap/Secret.
  • Lambda/Serverless: Must added to serverless.yml or provider console.
  • Fundamental Rule: Application code configuration changes "breaking changes" for infrastructure layer. Never assume environment inheritance.

Anti-Patterns

  • No migrations in main.ts: Use K8s Init Containers or pre-deploy CI steps for migration runs.
  • No root user in Docker: Always add USER node to Dockerfile; running as root security risk.
  • No unbounded Node heap: Set --max-old-space-size to ~75% of container memory limit.

© HoangNguyen0403, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/nestjs/nestjs-deployment of HoangNguyen0403/agent-skills-standard.

  • SKILL.md
  • evals/evals.json
  • references/example.md

Open the folder on GitHubat commit b529c2d

Compare with similar skills

Nestjs Deployment next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nestjs Deployment compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nestjs Deployment this skillHoangNguyen0403/agent-skills-standard572—~692Automated safety check: PassMIT
LangBot Deployment Guidelangbot-app/LangBot18k—~1.5kAutomated safety check: NotesApache-2.0
Debug Openshell ClusterNVIDIA/OpenShell16k—~20kAutomated safety check: NotesApache-2.0
Deploymentmatrixorigin/memoria610—~1.6kAutomated safety check: NotesApache-2.0
Onboarding Validationopen-edge-platform/edge-ai-suites140—~3.3kAutomated safety check: PassApache-2.0
Agenticx DeployerDemonDamon/AgenticX364—~866Automated safety check: PassApache-2.0

Similar skills

  • LangBot Deployment Guide

    langbot-app/LangBot

    Deploys and configures a LangBot instance with Docker Compose or Kubernetes, covering config.yaml, the Box sandbox runtime, the plugin runtime and the global API key.

    18k GitHub stars~1.5k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Debug Openshell Cluster

    NVIDIA/OpenShell

    Official

    Debug why an OpenShell gateway deployment is unhealthy, unreachable, or unable to create sandboxes.

    16k GitHub stars~20k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Deployment

    matrixorigin/memoria

    Deploy Memoria with Docker Compose or Kubernetes. An agent skill from matrixorigin/memoria.

    610 GitHub stars~1.6k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Onboarding Validation

    open-edge-platform/edge-ai-suites

    Validate the get-started experience of Open Edge Platform (OEP) software components from the perspective of a first-time user.

    140 GitHub stars~3.3k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Agenticx Deployer

    DemonDamon/AgenticX

    Guide for deploying AgenticX agents to production including Docker containerization, Kubernetes orchestration, Volcengine AgentKit cloud deployment, and API server setup.

    364 GitHub stars~866 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Aspire Deployment

    CommunityToolkit/Aspire

    WORKFLOW SKILL — Deploy Aspire apps from AppHost models to Docker Compose, Kubernetes, Azure, AWS, or preview Radius.

    627 GitHub stars~4.5k tokensUpdated 2 days ago
    DevOps & CloudAuto-check: notes

More from HoangNguyen0403/agent-skills-standard

All 211 skills in this repo
  • Subagent-Driven Development

    HoangNguyen0403/agent-skills-standard

    Runs a multi-task implementation plan by sending each task to a fresh implementer subagent, reviewing it independently, then reviewing the whole branch.

    572 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • draw.io Architecture Diagramming

    HoangNguyen0403/agent-skills-standard

    Draws architecture diagrams as editable draw.io files from a JSON spec, with a fixed house style, one C4 level per diagram and evidence-tagged shapes.

    572 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Android Navigation 3 Guide

    HoangNguyen0403/agent-skills-standard

    Implements and migrates to Jetpack Navigation 3 in Compose: NavDisplay, typed route objects, a state-list back stack, deep links, multiple back stacks and dialog scenes.

    572 GitHub stars~687 tokensUpdated yesterday
    Auto-check passed
  • Angular HttpClient Standards

    HoangNguyen0403/agent-skills-standard

    Sets rules for Angular HTTP code: functional interceptors, typed requests, services that own every call, and httpResource for reactive data loading in Angular 17+.

    572 GitHub stars~652 tokensUpdated yesterday
    Auto-check passed
  • Angular Tooling

    HoangNguyen0403/agent-skills-standard

    Angular CLI usage, code generation, build configuration, and bundle optimization.

    572 GitHub stars~743 tokensUpdated yesterday
    Auto-check passed
  • Common Code Review

    HoangNguyen0403/agent-skills-standard

    Conduct high-quality, persona-driven code reviews. An agent skill from HoangNguyen0403/agent-skills-standard.

    572 GitHub stars~772 tokensUpdated yesterday
    Auto-check passed

Questions about Nestjs Deployment

What does Nestjs Deployment do?

Containerize NestJS apps with multi-stage Docker builds, tune Node.js memory, and implement graceful shutdown hooks. Nestjs Deployment is an agent skill from HoangNguyen0403/agent-skills-standard.js memory, and implement graceful shutdown hooks.

When should I use Nestjs Deployment?

Nestjs Deployment fits situations like: writing Dockerfiles; configuring K8s deployments; adding shutdown hooks for NestJS.

How do I install Nestjs Deployment in Claude Code?

Run `npx skills add HoangNguyen0403/agent-skills-standard --skill nestjs-deployment -a claude-code`. Or copy the skill folder (skills/nestjs/nestjs-deployment in HoangNguyen0403/agent-skills-standard) into .claude/skills/nestjs-deployment in your project. Claude Code loads it when a task matches its description.

How do I install Nestjs Deployment in Codex?

Run `npx skills add HoangNguyen0403/agent-skills-standard --skill nestjs-deployment -a codex`. Or copy the skill folder (skills/nestjs/nestjs-deployment in HoangNguyen0403/agent-skills-standard) into .agents/skills/nestjs-deployment in your project. Codex loads it when a task matches its description.

Can I use Nestjs Deployment in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HoangNguyen0403/agent-skills-standard --skill nestjs-deployment -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nestjs-deployment, .gemini/skills/nestjs-deployment, .github/skills/nestjs-deployment and .opencode/skills/nestjs-deployment in your project.

What does Nestjs Deployment need to run?

Going by SKILL.md and its folder, Nestjs Deployment needs the command-line tools its instructions call (node and npm). Our summary lists: Node.js; Docker.

Does Nestjs Deployment access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Nestjs Deployment safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nestjs Deployment use?

Nestjs Deployment is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nestjs Deployment use?

About 692 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 99 tokens, read only when the agent opens those files.

What are the alternatives to Nestjs Deployment?

Skills that share tags, products or a category with Nestjs Deployment: LangBot Deployment Guide (langbot-app/LangBot, 18k stars), Debug Openshell Cluster (NVIDIA/OpenShell, 16k stars), Deployment (matrixorigin/memoria, 610 stars) and Onboarding Validation (open-edge-platform/edge-ai-suites, 140 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nestjs Deployment?

HoangNguyen0403 (a GitHub user) maintains it in HoangNguyen0403/agent-skills-standard, which has 572 GitHub stars. The repository holds 211 skills in this directory. The repository was last updated on October 9, 2026.

Source: HoangNguyen0403/agent-skills-standard on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.