Логотип Nestjs

Nestjs

Організація
nestjs
nestjs

NestJS, the TypeScript framework for Node.js backends. How to start a project non-interactively with the Nest CLI, the project layout and module system, where the current docs are, and the mistakes agents make in Nest apps that still pass their tests. Use when creating or extending a NestJS application.

Огляд

Видавецьnestjs
Репозиторійagent-skills
Назва навичкиnestjs
Зірки
176
Форки
5
Файли в пакеті
1
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 1

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: nestjs. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Nestjs у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/nestjs/agent-skills/tree/master/plugins/nestjs/skills/nestjs
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nestjs/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/plugins/nestjs/skills/nestjs .claude/skills/nestjs
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Nestjs в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Nestjs, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Nestjs не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

NestJS

Nest's APIs move faster than model training data, so what you remember may be a major version behind. Check before relying on memory:

  • Which version you're on: npm ls @nestjs/core in a project, npm view @nestjs/core version for the latest. Use the latest for a new project.

  • https://docs.nestjs.com/llms.txt indexes every chapter. Each chapter is plain markdown at its URL plus .md, e.g. https://docs.nestjs.com/controllers.md. Fetch the one chapter you need, not llms-full.txt. Find the page in the index rather than from memory: remembered paths (/techniques/...) are from older versions; most redirect to the current chapter, but some topics moved or split.

  • Nest has first-party packages for most backend needs (auth, permissions, databases, config, rate limiting, OpenAPI, health checks, queues, scheduling). Check them before writing your own or adding another library. The other skills in this package cover the common ones.

Start a project

In an empty folder:

bash
npx @nestjs/cli new . --skip-git --package-manager npm

Without a TTY (an agent's shell) it asks nothing: it creates an ESM project with Vitest and installs dependencies. --minimal creates a one-file app (src/main.ts). npm start runs nest start, which compiles first.

It also sets up @nestjs/observe (--no-observe skips it), which sends nothing until the project is linked. Once the project exists, tell the user to run npx @nestjs/observe link in it: they approve a code in the browser (signing up for free if needed), and it writes the key pair into .env. If they ask you to run it, run it with --no-browser in the background and pass on the address and the code it prints. Never write the keys yourself.

Write modules, controllers and services as files yourself (nestjs-feature shows the shape); register each in its module. nest generate is optional: npx nest g module|controller|service <name> --no-spec creates a stub and registers it, which helps when you're unsure where it goes. nest g resource makes a CRUD scaffold of stubs, DTOs and an entity class; use it only when you want exactly that, and pass --type rest --crud so it doesn't prompt.

The scaffold comes with an AGENTS.md; read it in an existing project, along with package.json and nest-cli.json.

Layout and module system

  • src/main.ts bootstraps (NestFactory.create(AppModule), global pipes, app.listen(process.env.PORT ?? 3000)); src/app.module.ts imports the feature modules.
  • One folder per feature: src/notes/notes.module.ts, notes.controller.ts (HTTP only), notes.service.ts (rules), a repository (queries), DTOs (CreateNoteDto) or schemas next to them. Share a provider by adding it to its module's exports and importing that module. Where code goes, how to split modules and what to avoid: nestjs-feature's references/structure.md.
  • Projects from nest new are ESM ("type": "module"), and Nest's packages are ESM only: relative imports end in .js (import { NotesService } from './notes.service.js'), there's no __dirname (use import.meta.dirname), tests use vi.fn(), not jest.fn(). Follow what an existing project uses.
  • Run through the Nest CLI or tsc, not tsx: tsx emits no decorator metadata, so providers injected by type arrive as undefined.
  • Never import type a class you inject. Dependency injection reads the constructor's parameter types at run time; a type-only import erases them, and the app stops at startup with Nest can't resolve dependencies of the NotesService (?). Linters and auto-fixers (consistent-type-imports) make this change on their own. The opposite holds for plain types in decorated signatures (Request from express, RawBodyRequest): with isolatedModules, TypeScript requires import type there (error TS1272).

Mistakes that pass tests

Coding agents make these in Nest apps whose tests all pass:

  • Sign-in leaks which emails exist. Hand-assembled sign-in (@nestjs/jwt + bcrypt) returns early for an unknown email (if (!user || !(await bcrypt.compare(...))) throw), so unknown emails answer faster. Use @nestjs/authentication's PasswordHasher.verify(password, user?.passwordHash), which checks a dummy hash when there's no user. See the nestjs-auth skill.
  • @Post() answers 201. A POST that creates nothing (sign-in, actions, searches) needs @HttpCode(200) or the code it means.
  • @IsOptional() lets null through. class-validator skips every rule for null, so {"title": null} reaches the database and fails with a 500. For "may be left out, not null", use @ValidateIf((_, value) => value !== undefined) instead. Zod's .optional() doesn't have this problem.
  • A short HS256 secret. @nestjs/authentication's accessToken.key needs at least 32 bytes and stops the app at startup otherwise. Never hash or pad a secret to fit: tokens are then signed with a different key and whatever verifies them with the real secret rejects them. The nestjs-auth skill covers a secret the task fixes.
  • The OpenAPI document leaves out its own route. SwaggerModule.setup() serves the document outside Nest's router, so it isn't listed. Add it if the contract says every route is documented (nestjs-production).
  • Stopping servers. Start a server in the background, note its PID (npm start > server.log 2>&1 & echo $!), and stop it with kill <pid>, or by its port: kill $(lsof -ti tcp:3000 -sTCP:LISTEN). Never pkill -f nest or pkill -f "npm start": they match other projects' processes on the machine.

A contract the task fixes (status codes, error bodies, secrets, field names) wins over a package's defaults. Adapt the package, or say what you couldn't do.

When a task says how to test, follow it. When it says nothing, cover the behaviour you change with focused tests rather than broad e2e suites.

Other skills in this package

  • nestjs-feature: modules, controllers, services, validation (Zod with @Body({ schema }), or class-validator), status codes, error bodies, Server-Sent Events.
  • nestjs-auth: @nestjs/authentication and @nestjs/authorization.
  • nestjs-data: @nestjs/drizzle and @nestjs/typeorm.
  • nestjs-testing: unit and e2e tests.
  • nestjs-production: config, logging, observability (NestJS Observe), health checks, rate limiting, OpenAPI, shutdown, deployment.

More detail: references/docs-map.md lists the docs chapter for each topic.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Nestjs?

NestJS, the TypeScript framework for Node.js backends. How to start a project non-interactively with the Nest CLI, the project layout and module system, where the current docs are, and the mistakes agents make in Nest apps that still pass their tests. Use when creating or extending a NestJS application.

Навіщо використовувати Nestjs у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Nestjs — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Nestjs у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/nestjs/agent-skills/tree/master/plugins/nestjs/skills/nestjs. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Nestjs?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Nestjs?

Зі скількома забажаєте. У TypingMind ви можете використовувати Nestjs із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Nestjs?

Так. На GitHub цю навичку публікує nestjs за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇